Ich hab einen kleinen Webservice mittels SOAP realisiert (Java). Die WSDL sieht folgendermaßen aus:
Alles anzeigen
Ich möchte den Service via PHP nutzen:
Leider erhalte ich dann folgende Fehlermeldung:
Quellcode
- <?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://yo/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://yo/" name="MyWebserviceService">
- <types>
- <xsd:schema>
- <xsd:import schemaLocation="http://localhost:8080/services?xsd=1" namespace="http://jaxb.dev.java.net/array"></xsd:import>
- </xsd:schema>
- </types>
- <message name="hello">
- <part name="arg0" type="xsd:string"></part>
- <part xmlns:ns1="http://jaxb.dev.java.net/array" name="arg1" type="ns1:intArray"></part>
- </message>
- <message name="helloResponse"></message>
- <portType name="TestService">
- <operation name="hello" parameterOrder="arg0 arg1">
- <input message="tns:hello"></input>
- <output message="tns:helloResponse"></output>
- </operation>
- </portType>
- <binding name="TestServicePortBinding" type="tns:TestService">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
- <operation name="hello">
- <soap:operation soapAction=""></soap:operation>
- <input>
- <soap:body use="literal" namespace="http://yo/"></soap:body>
- </input>
- <output>
- <soap:body use="literal" namespace="http://yo/"></soap:body>
- </output>
- </operation>
- </binding>
- <service name="MyWebserviceService">
- <port name="TestServicePort" binding="tns:TestServicePortBinding">
- <soap:address location="http://localhost:8080/services"></soap:address>
- </port>
- </service>
- </definitions>
Ich möchte den Service via PHP nutzen:
Leider erhalte ich dann folgende Fehlermeldung:
Fatal error: Uncaught SoapFault exception: [soapenv:Server] unexpected element name: expected=arg1, actual: param1 in D:\Development\PHP\xampplite\htdocs\SOAP_Test\soap.php:12 Stack trace: #0 D:\Development\PHP\xampplite\htdocs\SOAP_Test\soap.php(12): SoapClient->__soapCall('hello', Array) #1 {main} thrown in D:\Development\PHP\xampplite\htdocs\SOAP_Test\soap.php on line 12