代码之家  ›  专栏  ›  技术社区  ›  Sebastien Malot

BasicHttpBinding和WsHttpBinding之间的代理

  •  0
  • Sebastien Malot  · 技术社区  · 15 年前

    对于一个重要的客户,我必须在PHP中实现SoapClient,以连接到WsHttpBinding中的.netwebservice设置。

    因此PHP只与代理的BasicHttpBinding端通信,代理将请求用WsHttpBinding转换成真实的WS,并将应答返回给PHP为BasicHttpBinding格式。

    这是我的目标,但我刚从C开始。。。所以我需要帮助。

    有人能帮我还是给我建议?

    谢谢,

    1 回复  |  直到 15 年前
        1
  •  1
  •   Darin Dimitrov    15 年前

    您可以在WCF服务中公开两个端点:

    <service name="MyCompany.MyService">
        <endpoint
          address="/advanced"
          binding="wsHttpBinding"
          contract="MyCompany.IMyContract" />
        <endpoint
          address="/simple"
          binding="basicHttpBinding"
          contract="MyCompany.IMyContract" />
        <endpoint
          address="mex"
          binding="mexHttpBinding"
          contract="IMetadataExchange"/>
      </service>
    

    http://mycompany.com/myservice.svc/simple 以及其他客户 http://mycompany.com/myservice.svc/advanced

    推荐文章