Answer the question
In order to leave comments, you need to log in
How to write a soap request in php for a given wsdl?
There is a wsdl file
<?xml version="1.0" encoding="UTF-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
name="esia_usl"
targetNamespace="urn:TFOMS-EsiaUsl"
xmlns:tns="urn:TFOMS-EsiaUsl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
<types>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:TFOMS-EsiaUsl"
elementFormDefault="qualified"
xmlns:tns="urn:TFOMS-EsiaUsl"
>
<xs:complexType name="InputParams">
<xs:sequence>
<xs:element name="fam" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="im" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="ot" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="dr" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="dmin" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="dmax" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Usl">
<xs:sequence>
<xs:element name="lpu" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="nmlpu" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="smo" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="nmusl" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="uslok" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="ds" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="dtbeg" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="dtend" type="xs:string" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="sum" type="xs:decimal" minOccurs="1" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="UslData">
<xs:sequence>
<xs:element name="usl" type="tns:Usl" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="request_msg">
<part name="input_params" type="tns:InputParams"/>
</message>
<message name="response_msg">
<part name="usl_list" type="tns:UslData"/>
</message>
<portType name="EsiaUslType">
<operation name="getUsl">
<input message="tns:request_msg"/>
<output message="tns:response_msg"/>
</operation>
</portType>
<binding name="EsiaUslBinding" type="tns:EsiaUslType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getUsl">
<soap:operation soapAction="" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="EsiaUslService">
<port name="EsiaUslPort" binding="tns:EsiaUslBinding">
<soap:address location="http://site/server_esia.php"/>
</port>
</service>
</definitions>
$client = new SoapClient("http://site/esia.wsdl");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question