无法从phpClient使用WCF wshttpBinding服务

时间:2011-12-06 09:07:18

标签: c# php wcf soap-client

我可以使用basichttp绑定,但我无法使用ws-addressing消耗服务。

这就是我的请求的样子。

<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing"xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
  <a:Action s:mustUnderstand="1">http://tempuri.org/IService1/GetToken</a:Action>
  <a:MessageID>urn:uuid:5cf2a178-a552-4e64-a68f-4575445cfac0</a:MessageID>
  <a:ReplyTo>
    <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
  </a:ReplyTo>
</s:Header>

1 个答案:

答案 0 :(得分:1)

我确实尝试使用wshttpbinding调用WCF服务,我的请求如图所示

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
</a:Action>
<a:MessageID>urn:uuid:24f56d58-5ef5-41f4-8062-42934b9a36b5</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
    <a:To s:mustUnderstand="1">http://localhost/WsHttpExample/Service1.svc</a:To>
</s:Header>

来自C#客户端。现在确定它是如何在PHP中完成的。希望它可以帮到你。