PGPProtector
14 years agoNew Contributor
Confused & Lost
1) Thanks for creating this program, it's been helpful in learning SOAP & WSDL
Now for the fun
I've got 3 Servers I'm testing my code on,
1) Windows 7 with Apache & PHP & mySQL (In house testing)
2) Ubuntu 11.04 Server (Remote Testing)
3) Web Host Running on Shared Server.
the WSDL File I'm using is.
With the only changes between the servers is the location 192.168.1.17 being changed to the correct address / domain names.
the PADL_Server.php is the same for all three environments.
Now the problem I'm having
Two environments return what I'm thinking is the correct data (At least my C# App can process the data correctly)
Envelop returned
The third server though returns this
I think the reason that my C# app can't handled it is the extra xsi:type information in <CardReturn> & Sub Data.
But what's causing it given it's the same file for all 3 servers ?

Now for the fun

I've got 3 Servers I'm testing my code on,
1) Windows 7 with Apache & PHP & mySQL (In house testing)
2) Ubuntu 11.04 Server (Remote Testing)
3) Web Host Running on Shared Server.
the WSDL File I'm using is.
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:se="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://192.168.1.17"
targetNamespace="http://192.168.1.17"
name="PADL"
>
<types>
<xs:schema targetNamespace = "http://192.168.1.17" xmlns = "http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ACard">
<xs:sequence>
<xs:element name="sCardID" type="xs:string"/>
<xs:element name="sCardName" type="xs:string"/>
<xs:element name="sCardDescription" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfCards">
<xs:sequence>
<xs:element name="ACard" type="tns:ACard" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="CardResponse" >
<part name="CardReturn" type="tns:ACard"/>
</message>
<message name="AllCardResponse">
<part name="AllCardReturn" type="tns:ArrayOfCards"/>
</message>
<message name="ServerResponse">
<part name="Return" type="xs:string" />
</message>
<message name="FullNameInput">
<part name="FirstName" type="xs:string" />
<part name="LastName" type="xs:string" />
</message>
<message name="LastNameInput">
<part name="LastName" type="xs:string"/>
</message>
<message name="FirstNameInput">
<part name="FirstName" type="xs:string"/>
</message>
<message name="NULLInput"></message>
<message name="NULLOutput"></message>
<portType name="HelloClassPortType">
<operation name="GetAllCards">
<documentation> Returns All Cards Information </documentation>
<input message="tns:NULLInput"/>
<output message="tns:AllCardResponse"/>
</operation>
<operation name="GetCardType">
<documentation> Returns Card Information </documentation>
<input message="tns:NULLInput"/>
<output message="tns:CardResponse"/>
</operation>
<operation name="HelloFirstName">
<documentation> Uses the First Name Only, Saves it in Memory </documentation>
<input message="tns:FirstNameInput"/>
<output message="tns:ServerResponse"/>
</operation>
<operation name="MemoryRecall">
<documentation> Returns What has been previously processed </documentation>
<input message="tns:NULLInput"/>
<output message="tns:ServerResponse"/>
</operation>
<operation name="HelloLastName">
<documentation> Uses the Last Name Only, Saves it in Memory</documentation>
<input message="tns:LastNameInput"/>
<output message="tns:ServerResponse"/>
</operation>
<operation name="HelloFullName">
<documentation> Uses the Full Name (First and Last), Saves it in Memory</documentation>
<input message="tns:FullNameInput"/>
<output message="tns:ServerResponse"/>
</operation>
</portType>
<binding name="HelloClassBinding" type="tns:HelloClassPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetAllCards"><soap:operation soapAction="GetAllCards"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
<operation name="GetCardType"><soap:operation soapAction="GetCardType"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
<operation name="HelloFirstName"> <soap:operation soapAction="HelloFirstName"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
<operation name="MemoryRecall"> <soap:operation soapAction="MemoryRecall"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
<operation name="HelloLastName"> <soap:operation soapAction="HelloLastName"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
<operation name="HelloFullName"> <soap:operation soapAction="HelloFullName"/>
<input>
<soap:body namespace="http://192.168.1.17" use="literal" />
</input>
<output>
<soap:body namespace="http://192.168.1.17" use="literal" />
</output>
</operation>
</binding>
<service name="sPADL">
<documentation>
This is the PADL Class
</documentation>
<port name="HelloClass" binding="tns:HelloClassBinding">
<soap:address location="http://192.168.1.17/PADL/PADL_server.php"/>
</port>
</service>
</definitions>
With the only changes between the servers is the location 192.168.1.17 being changed to the correct address / domain names.
the PADL_Server.php is the same for all three environments.
Now the problem I'm having
Two environments return what I'm thinking is the correct data (At least my C# App can process the data correctly)
Envelop returned
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.customvbapps.com">
<SOAP-ENV:Body>
<ns1:GetCardTypeResponse>
<CardReturn>
<sCardID>PHP4139</sCardID>
<sCardName>A 4139 Card</sCardName>
<sCardDescription>Quad Die Card</sCardDescription>
</CardReturn>
</ns1:GetCardTypeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The third server though returns this
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:HelloService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.gw4y.com" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:GetCardTypeResponse>
<CardReturn xsi:type="ns2:ACard">
<sCardID xsi:type="xsd:string">PHP4139</sCardID>
<sCardName xsi:type="xsd:string">A 4139 Card</sCardName>
<sCardDescription xsi:type="xsd:string">Quad Die Card</sCardDescription>
</CardReturn>
</ns1:GetCardTypeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I think the reason that my C# app can't handled it is the extra xsi:type information in <CardReturn> & Sub Data.
But what's causing it given it's the same file for all 3 servers ?

