Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAP - load local WSDL file

Tags:

php

soap

wsdl

xml

How to load a local WSDL file into SoapClient?

$wsdl = __DIR__.'/wsdl.wsdl';
$this->client = new SoapClient($wsdl);

$xsd = __DIR__.'/wsdl/xsd/xmldsig-core-schema.xsd';

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

relative path to XSD file from WSDL file: ./xsd/xmldsig-core-schema.xsd

WSDL

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >
    <wsdl:types>
</wsdl:definitions>
like image 488
clarkk Avatar asked Aug 17 '18 10:08

clarkk


People also ask

How do I import a WSDL file?

Select the WSDL file to import from your workspace, or from an external URL, then click Next. Select the bindings to import, then click Finish. For each binding that you import, a message root is created for every global element that is used by a part in the operations of the binding.


1 Answers

In your WSDL file,

<soap:binding style="document" transport="https://schemas.xmlsoap.org/soap/https"/>

should be

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
like image 142
Guillaume Boudreau Avatar answered Oct 10 '22 21:10

Guillaume Boudreau