无法从 phpClient 使用 WCF wshttpBinding 服务

发布于 2024-12-19 15:19:02 字数 556 浏览 1 评论 0原文

我可以使用 basichttp 绑定,但无法使用 ws 寻址来使用服务。

这就是我的请求的样子。

<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>

i can consume basichttp binding, but i am unable to consume services with ws-addressing.

These is how my request looks like.

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦在深巷 2024-12-26 15:19:02

我确实尝试使用 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 中完成的。希望对您有帮助。

I did try to invoke a WCF service with wshttpbinding and my request looks as shown

<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>

Its from a C# client. Now sure on how it is done in php. Hope it helps you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文