Rustam1234
Новичок
Добрый день!
Как на PHP реализовать несколько сервисов которые описаны в одном wsdl файле? (С одним сервисом все нормально работает)
Пример wsdl :
Вариант с несколькими портами не подходит(есть готовые клиенты к подобному конфигу)
Как на PHP реализовать несколько сервисов которые описаны в одном wsdl файле? (С одним сервисом все нормально работает)
Пример wsdl :
HTML:
<?xml version="1.0"?>
<definitions name="MyDefinition" targetNamespace="urn:myTargetNamespace"
xmlns:tns="urn:myTns"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="myRequest">
<part name="reqParam" type="xsd:string"/>
</message>
<message name="myResponse">
<part name="resParam" type="xsd:string"/>
</message>
<portType name="MyPortType">
<operation name="hello">
<input message="tns:myRequest"/>
<output message="tns:myResponse"/>
</operation>
</portType>
<portType name="MyPortType2">
<operation name="hello2">
<input message="tns:myRequest"/>
<output message="tns:myResponse"/>
</operation>
</portType>
<binding name="MyBinding" type="tns:MyPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="hello">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded" namespace="urn:myInputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:myOutputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<binding name="MyBinding2" type="tns:MyPortType2">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="hello2">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded" namespace="urn:myInputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:myOutputNamespace"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="MyService">
<port name="MyPort" binding="tns:MyBinding">
<soap:address location="http://localhost/example/HelloServerWsdl.php"/>
</port>
</service>
<service name="MyService2">
<port name="MyPort2" binding="tns:MyBinding2">
<soap:address location="http://localhost/example/HelloServerWsdl.php"/>
</port>
</service>
</definitions>