简体   繁体   中英

PHP Soap client issue in importing schema from WSDL : Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM