tags:

views:

97

answers:

2

I have to consume a WCF WebServices but the WSDL contains bindings that PHP doesn't support also.

SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://schemas.microsoft.com/soap/named-pipe'

How to bypass this problem?

+2  A: 

It would seem that you are exposing the service using the net named pipe binding. This more than likely isn't going to work with php because it doesn't know how to speak SOAP/WS over named pipes.

Rather, you will want to use either the basic HTTP binding or the WS HTTP binding to expose your service and then consume it in PHP.

casperOne
It happens that I expose multiple bindings, including the ones you recommended for PHP. The problem is that my PHP client doesn't want the uncompatible ones to appear in the WSDL, and I don't know how to remove them from the WSDL.
Jader Dias
@estourodepilha.com: You can turn off the MEX endpoints while getting the WSDL for the PHP client. Note here that the PHP client should really ignore this, it's not necessarily a fault of WCF.
casperOne
A: 

If you have control of the WCF services a solution is to remove manually the unsupported bindings from the WSDL and save the WSDL in another location and point to it using:

<system.serviceModel>
  <behaviors>
    <serviceBehaviors>
      <behavior name="test">
        <serviceMetadata 
           externalMetadataLocation="http://YourServer/Service/MyService.wsdl"/&gt;
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>
Jader Dias