ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
217
217
EMPFEHLEN
-
Hallo,
ich möchte gerne einen Webservice in PHP benutzen, der folgendes Format erwartet
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style"> <soapenv:Header/> <soapenv:Body> <urn:ZPph0SerialsPut> <ImTSerials> <!--Zero or more repetitions:--> <item> <Aufnr>?</Aufnr> <Lfdnr>?</Lfdnr> <Zzserfrom>?</Zzserfrom> <Zzserto>?</Zzserto> </item> </ImTSerials> </urn:ZPph0SerialsPut> </soapenv:Body> </soapenv:Envelope>
mein Aufruf in php sieht folgendermaßen aus
Code :1 2 3
$wsdl = new SOAP_WSDL("......wsdl", array 'user'=>'..','pass'=>'...')); $proxy = $wsdl->getProxy(); $result = $proxy->ZPph0SerialsPut(array('Aufnr'=>'57003465','Lfdnr'=>'1','Zzserfrom'=>'1','Zzserto'=>'2'));
habs auch schon mit folgendem Aufruf probiert
Code :1
$result = $proxy->ZPph0SerialsPut(array('ImTSerials'=>array('item'=>array('Aufnr'=>'57003465','Lfdnr'=>'1','Zzserfrom'=>'1','Zzserto'=>'2'))));
als Fehlermeldung bekomme ich dann immer folgendes:
Code :1
(string:145) CX_ST_MATCH_ELEMENT:XSLT Exception bei Offset 630, XPath SOAP-ENV:Envelope(1)SOAP-ENV:Body(1)ns4:ZPph0SerialsPut(1).Element 'ImTSerials' erwartet
hat jemand nen tip für mich? komme an dieser stelle nicht weiter.
vielen Dank
-
so jetzt gehts, ich habe einfach vor den tags item, Aufnr, Lfdnr, Zzserfrom, Zzserto den namespace ns4: (warum auch immer der da hinkommt) entfernt
vorher:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(string:637) <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope 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:ns4="urn:sap-com:document:sap:soap:functions:mc-style" > <SOAP-ENV:Body> <ns4:ZPph0SerialsPut> <ns4:ImTSerials> <ns4:item> <ns4:Aufnr>57003465</ns4:Aufnr> <ns4:Lfdnr>1</ns4:Lfdnr> <ns4:Zzserfrom>1</ns4:Zzserfrom> <ns4:Zzserto>2</ns4:Zzserto></ns4:item></ns4:ImTSerials></ns4:ZPph0SerialsPut> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
nachher:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(string:589) <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope 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:ns4="urn:sap-com:document:sap:soap:functions:mc-style" > <SOAP-ENV:Body> <ns4:ZPph0SerialsPut> <ImTSerials> <item> <Aufnr>57003465</Aufnr> <Lfdnr>1</Lfdnr> <Zzserfrom>1</Zzserfrom> <Zzserto>2</Zzserto></item></ImTSerials></ns4:ZPph0SerialsPut> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
kann mir jemand sagen wie ich das richtig mache? will nicht ständig das xml durchlaufen und ns4 ersetzen
danke!
Ähnliche Themen
-
Problem: PHP-SOAP Client -> JBoss EJB SOAP Webservice : Statful Beans passiviert?
Von gorefest im Forum PHPAntworten: 1Letzter Beitrag: 22.01.11, 12:10 -
Soap Webservice Timeout
Von BillaBong im Forum PHPAntworten: 0Letzter Beitrag: 16.09.08, 15:32 -
PEAR::SOAP versus NuSoap
Von Mororu im Forum PHPAntworten: 2Letzter Beitrag: 05.11.07, 09:50 -
PEAR::SOAP Abfrage
Von Sebastiano06 im Forum PHPAntworten: 0Letzter Beitrag: 27.03.07, 18:05 -
Datenbankanbindung und Webservice / Soap
Von Hetthornie im Forum JavaAntworten: 4Letzter Beitrag: 18.03.04, 13:22





Zitieren
Login






[PHP][Snippet] Array zu XML konvertieren