Call WCF WebService in PHP via wsHttpBinding

I have a WCF web service with which I can connect via basicHttp but not wsHttp. I am trying to connect to it through wshttp as follows:

$service = new SoapClient ("http://service.companyname.local:6666/Service/?wsdl", array( "location" => "http://service.companyname.local:6666/Service/WCF", "trace" => true, 'soap_version' => SOAP_1_2 ) ); 

A call to the SoapClient constructor returns a penalty. When I try to call it using $ client-> FunctionName, the page just sits there for quite some time and ultimately returns the "Error Fetching http headers" error. What exactly does this mean and how can I fix it? (Consuming a service from a .Net client works fine.)

+4
source share
2 answers

The default config in wsHttpBinding uses advanced WS-Security and WS-Addressing features that are not understood by vanilla PHP SoapClient. There are other PHP available to SOAP clients that can work (Apache Axis2 + Rampart / C, for example), or you can try disabling some of the incompatible wsHttpBinding functions (message security is probably the first). Not to say that this will not work, but you will probably need a trial version and an error for all of this to work correctly.

+6
source

The last time I checked, php did not support wsHttpBinding

0
source

All Articles