简体   繁体   中英

Proxy between BasicHttpBinding and 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM