PHP SOAP调用格式(PHP SOAP Call Format)

编程入门 行业动态 更新时间:2024-10-09 10:23:51
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" ...

更多推荐

本文发布于:2023-08-04 02:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1408626.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:格式   SOAP   PHP   Call   Format

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!