Can you plz tell me how to call PHP web service in asp.net application
am calling third party php webservice in my asp.net application.
LocalhostXYZ srvLogin = new Localhost.XYZ();
Localhost.LogonResponseArray arryObj = new LogonResponseArray();
arryObj = srvLogin.logon("abc", "pqr", "xyz");
Where logon() is API from Php Web service.
Return type of logon() method is LogonResponseArray class which is of array type.
I am facing one problem that arryObj returns null value.
So can any one tell me how can i get proper value.
Also i have made on proxy class of this web service but again i am facing same problem
let me know if you have any solution
WSDL is like this
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://10.10.11.234/ws/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://10.10.11.234/ws/">
- <types>
- <xsd:schema targetNamespace="http://10.10.11.234/ws/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
- <xsd:complexType name="ResponseHeader">
- <xsd:sequence>
<xsd:element name="ResponseCode" type="xsd:string" />
<xsd:element name="ErrorCode" type="xsd:string" />
<xsd:element name="ErrorDesc" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="LogonResponseArray">
- <xsd:sequence>
<xsd:element name="ResponseHeader" type="tns:ResponseHeader" />
<xsd:element name="SessionKey" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="LogonRequestType">
- <xsd:all>
<xsd:element name="ID" type="xsd:string" />
<xsd:element name="AuthKey" type="xsd:string" />
<xsd:element name="Channel" type="xsd:string" />
</xsd:all>
</xsd:complexType>
- <xsd:complexType name="LogonResponseType">
- <xsd:all>
<xsd:element name="LogonResponse" type="tns:LogonResponseArray" />
</xsd:all>
<message name="LogonRequest">
<part name="parameters" element="tns:Logon" />
</message>
- <message name="LogonResponse">
<part name="parameters" element="tns:LogonResponse" />
</message>
<portType name="ECC-WSPortType">
- <operation name="Logon">
<documentation>Establish/reestablish host connection if down. No effect if up.</documentation>
<input message="tns:LogonRequest" />
<output message="tns:LogonResponse" />
</operation>
<binding name="ECC-WSBinding" type="tns:ECC-WSPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="Logon">
<soap:operation soapAction="http://10.10.11.234/ws/ws.php/Logon" style="document" />
- <input>
<soap:body use="literal" namespace="http://10.10.11.234/ws/" />
</input>
- <output>
<soap:body use="literal" namespace="http://10.10.11.234/ws/" />
</output>
</operation>
</binding>
- <service name="ECC-WS">
+ <port name="ECC-WSPort" binding="tns:ECC-WSBinding">
<soap:address location="http://10.10.11.234/ws/ws.php" />
</port>
</service>
</definitions>
Thanks ,
Vivek
|