Hey!
I'm having problems connecting / calling a SOAP server.
Background:
I have a generated XML-file to be sent to a SOAP-server. The XML-file is generated to a variable. (Templated using sprintf from an UTF-8 encoded file)
I connect to the SOAP server using a WDSL file, no exception is caught here.
I then try to use __SoapCall.
Errors:
I get errors using two different scenarios:
1. Sending the xml file-variable as is
I get the following error:
SOAP-ERROR: Encoding: string <my xml file here.. atleast the first 30%>
1. Sending the xml file-variable as encoded UTF-8
The server (my local test server) disconnects me, and no output is given)
(I've tried both mb string and utf8_encode
Extra info:
This is the soapCall code:
$response = parent::__soapCall("AnsoegningGem", $request = array(
'Brugernavn' => "Myrealusername",
'Password' => "Myrealpassword",
'AnsoegningInd' => $xmlfile));
'This is an excerpt from the WSDL-file:
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="AnsoegningGem">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Brugernavn" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="AnsoegningInd" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Why isn't this working? If you need additional info, I'll provide it.