SOAP: PHP WebService and .Net

lineay

New Member
I have to connect with PHP WebService via SOAP from a .Net (C#, WPF) application. I added reference to this service, some proxies were generated.When I invoked some function:\[code\]var client = new someAPIPortTypeClient();XmlNode[] response = client.status(arg1, arg2); \[/code\]I got response:\[code\]SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:nakopitel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:statusResponse> <statusReturn xsi:type="ns2:Map"> <item> <key xsi:type="xsd:string">is_active</key> <value xsi:type="xsd:boolean">true</value> </item> <item> <key xsi:type="xsd:string">allow_add_paid</key> <value xsi:type="xsd:boolean">false</value> </item> <item> <key xsi:type="xsd:string">allow_search_free</key> <value xsi:type="xsd:boolean">true</value> </item> <item> <key xsi:type="xsd:string">allow_add_free</key> <value xsi:type="xsd:boolean">true</value> </item> </statusReturn> </ns1:statusResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>\[/code\]It interpreted like XmlNode[]...How can I get normal proxy-classes to work with this SOAP-service? I can ask the service author to change something if it requires.Update. WSDL for status function.\[code\]<?xml version='1.0' encoding='UTF-8'?><definitions name="something" targetNamespace="urn:something" xmlns:typens="urn:something" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="status"> <part name="terminal" type="xsd:integer"/> <part name="code" type="xsd:string"/> </message> <message name="statusResponse"> <part name="statusReturn" type="xsd:anyType"/> </message> <portType name="someAPIPortType"> <operation name="status"> <documentation> Get status </documentation> <input message="typens:status"/> <output message="typens:statusResponse"/> </operation> </portType> <binding name="someAPIBinding" type="typens:someAPIPortType"> <operation name="status"> <soap:operation soapAction="urn:someAPIAction"/> <input> <soap:body namespace="urn:something" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body namespace="urn:something" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="somethingService"> <port name="someAPIPort" binding="typens:someAPIBinding"> <soap:address location="http://something/soap/"/> </port> </service></definitions>\[/code\]
 
Back
Top