PHP Soap 标头帮助
我有一个相当简单的 php/soap 标头问题。
这就是我需要的。
<ns1:Identity token="123456789"></ns1:Identity>
这就是我得到的...
<ns1:Identity><item><key>token</key><value>123456789</value></item></ns1:Identity>
使用这段代码...
$headers[] = new SoapHeader('http://qpricer.com/Services/Pricing','Identity',array('token'=> '123456789'));
$client->__setSoapHeaders($headers);
使用soapui,我已经将问题范围缩小到了这里。
如何从第二个转到第一个?
如果您能提供帮助,我们将不胜感激,感谢您的宝贵时间。
I have a fairly simple php/soap header question.
Here's what I need.
<ns1:Identity token="123456789"></ns1:Identity>
Here's what I get...
<ns1:Identity><item><key>token</key><value>123456789</value></item></ns1:Identity>
using this code...
$headers[] = new SoapHeader('http://qpricer.com/Services/Pricing','Identity',array('token'=> '123456789'));
$client->__setSoapHeaders($headers);
Using soapui, I have narrowed my issue down to this right here.
How do I go from the second one to the first one?
An help would be greatly appreciated, thanks for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为这是我必须设置的唯一标头,所以我能够使用以下代码修复它。
这生成了以下 XML
并且它起作用了!
Because this was the only header I had to set, I was able to fix it using the following code.
This produced the following XML
and it worked!