Home > Software design >  Could not find any usable binding services in WSDL with PHP Soap
Could not find any usable binding services in WSDL with PHP Soap

Time:09-12

So I have a wsdl file that I want to use via soap and I am able to parse it via an online parser which shows me the service and all the functions but am unable to do so via PHP and was wondering where it was going wrong because it's clearly something I need to be doing in PHP because I cannot edit the wsdl file.

The error I am getting in PHP is:

SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.

So this is the call to the client:

$this->client = new SoapClient('https://itd.dx-track.com/DespatchManager.API.Service.DM6Lite_Test/DM6LiteService.svc?wsdl', array(
            'trace'         => 1,
            'exceptions'    => true,
            'cache_wsdl'    => WSDL_CACHE_NONE,
        ));

CodePudding user response:

Try using non-WSDL mode and see if it works.

$URL = 'https://itd.dx-track.com/DespatchManager.API.Service.DM6Lite_Test/DM6LiteService.svc?wsdl';

$client = new SoapClient(null, array(
    'location' => $URL,
    'uri'      => "https://itd.dx-track.com/DespatchManager.API.Service.DM6Lite_Test/",
    'trace'    => 1,
    ));
  • Related