Reputation: 117
I am using Soap protocol with WSDL on server side. For some reason PHP is not able to import the schema. But the schema import links are opening in browser without any problem. The schema links are https links, but I have enabled openssl in PHP.
PHP Code:
<?php
$client = new SoapClient("https://domain:460/path/RemittanceRequest1.wsdl");
Error
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'https://domain:460/Service/mex2.xsd', unexpected 'targetNamespace'='http://schemas.datacontract.org/2004/07/RMTService' in E:\xampp\htdocs\wsdl\GetCurrencyCodesReq.php:3
PHP Version - 7.0.4
Upvotes: 0
Views: 4182
Reputation: 21
Do you have an imported xsd file ?
It's usually related to a mismatch between the attributes: namespace from the <import>
tag and the targetNamespace from the schema tag in the imported xsd file.
Upvotes: 1