1

I am trying to consume a WSDL from WCF using PHPs SoapClient. When using the following code

$client = new SoapClient('http://subdomain.xxxxxxx.com:7575/?WSDL');

I get the following error :

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load     from 'http://localhost:7575/?wsdl=wsdl0' : failed to load external entity "http://localhost:7575/?wsdl=wsdl0"

For the service configuration file for the WSDL the specific port that the WSDL is using, specifies:

    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:7574" />
        <add baseAddress="http://localhost:7575" />
      </baseAddresses>
    </host>

The problem is that the WSDL is redirecting to http://localhost:7575 for the wsdl=wsdl0 file... then all the XSD locations are also listing http://localhost:7575.... is there a PHP Soap function that I can use to change that to http://subdomain.xxxxxxx.com:7575/?wsdl=wsdl0

hakre
  • 193,403
  • 52
  • 435
  • 836
JoeyH
  • 335
  • 2
  • 10

1 Answers1

0

If you have control of the WCF service, it may be easier to configure it to produce "flattened" WSDL. This SO question & answer explains how to configure it to a single WSDL document.

If that isn't possible, may be you can have them (or possibly by you, locally) manually construct a single WSDL document and have them host it on their site so your PHP client can consume it as-is.

Community
  • 1
  • 1
Sixto Saez
  • 12,610
  • 5
  • 43
  • 51