开发者

How to consume WCF WebServices from PHP?

开发者 https://www.devze.com 2022-12-25 12:38 出处:网络
I have to consume a WCF WebServices but the WSDL contains bindings t开发者_C百科hat PHP doesn\'t support also.

I have to consume a WCF WebServices but the WSDL contains bindings t开发者_C百科hat 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?


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.


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"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>
0

精彩评论

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

关注公众号