PHP SOAP调用格式(PHP SOAP Call Format)
我需要对另一个系统进行SOAP调用。 我使用SoapClient用我的wsdl文件调用它并得到了这个$soap->__getLastRequest() :
<ns1:getData> <sqlName xsi:type="xsd:string">getDataBESTAND</sqlName> <sqlParameter xsi:type="xsd:string">MANDANT=029</sqlParameter> <ziel xsi:type="xsd:string">PISTEST</ziel> </ns1:getData>但目标系统无法读取它。 我被告知它应该更喜欢这样:
<vas:getData xmlns:vas="vasws.Query" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <sqlName xsi:type="xsd:string">getDataBESTAND</sqlName> <sqlParameter xsi:type="xsd:string">MANDANT=029</sqlParameter> <ziel xsi:type="xsd:string">PISTEST</ziel> </vas:getData>我可以将PHP SOAP客户端配置为这种格式,或者我如何获得此格式?
I need to make an SOAP call to another system. I used SoapClient called it with my wsdl file and got this $soap->__getLastRequest():
<ns1:getData> <sqlName xsi:type="xsd:string">getDataBESTAND</sqlName> <sqlParameter xsi:type="xsd:string">MANDANT=029</sqlParameter> <ziel xsi:type="xsd:string">PISTEST</ziel> </ns1:getData>But the target system can't read it. I was told it should like more like this:
<vas:getData xmlns:vas="vasws.Query" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <sqlName xsi:type="xsd:string">getDataBESTAND</sqlName> <sqlParameter xsi:type="xsd:string">MANDANT=029</sqlParameter> <ziel xsi:type="xsd:string">PISTEST</ziel> </vas:getData>Can I configure the PHP SOAP Client to this format or how would I get this?
最满意答案
结果是客户给了我错误的请求网址。 两个查询都有效。
对于第一个ns1必须在<SOAP-ENV:Envelope xmlns:ns1="vasws.Query" ...
Turns out the customer gave me the wrong URL for the request. Both query do work.
For the first ns1 must be defined in the <SOAP-ENV:Envelope xmlns:ns1="vasws.Query" ...
更多推荐
发布评论