开发者

Proxy between BasicHttpBinding and WsHttpBinding

开发者 https://www.devze.com 2022-12-20 10:11 出处:网络
For an important customer, I\'ve to implement a SoapClient in PHP to connect to a .Net webservice setup in WsHttpBinding.

For an important customer, I've to implement a SoapClient in PHP to connect to a .Net webservice setup in WsHttpBinding.

I know PHP SoapClient doesn't support it. So my goal is to develop a proxy software written in C# which will be a 'bridge' between BasicHttpBinding and WsHttpBinding. So PHP will communicate only with BasicHttpBinding side of the proxy, the proxy will translate the request to the real WS with WsHttpBinding and return to PHP an answer into BasicHttpBinding format.

That's my goal, but I'm just starting in C# ... so I need help to do this.

开发者_开发技巧Is someone can help me or give me advice ?

Thanks,


You could expose two endpoints in your WCF service:

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

Your PHP client will point to http://mycompany.com/myservice.svc/simple and other client to http://mycompany.com/myservice.svc/advanced.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号