views:

487

answers:

1

Hi all,

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,

A: 

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.

Darin Dimitrov
Thanks for your answer.Unfortunately wsHttpBinding is a constraint imposed on me. I can not ignore or change it.So the 'proxy' is the only method I found to pass over.
Sebastien M.