Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP SOAP-ERROR:解析模式:can';t从xsd导入架构_Php_Xml_Web Services_Soap_Xsd - Fatal编程技术网

PHP SOAP-ERROR:解析模式:can';t从xsd导入架构

PHP SOAP-ERROR:解析模式:can';t从xsd导入架构,php,xml,web-services,soap,xsd,Php,Xml,Web Services,Soap,Xsd,我正在运行一些使用soap编写的web服务 一些web服务正在运行,但是那些尝试导入本地xsd的web服务失败了 <faultcode>WSDL</faultcode> <faultstring> SOAP-ERROR: Parsing Schema: can't import schema from 'http://localhost/myproject/_xsd/1' </faultstring> 另外值得一提的是xsd1导入xsd2

我正在运行一些使用soap编写的web服务

一些web服务正在运行,但是那些尝试导入本地xsd的web服务失败了

<faultcode>WSDL</faultcode>
<faultstring>
    SOAP-ERROR: Parsing Schema: can't import schema from 'http://localhost/myproject/_xsd/1'
</faultstring>
另外值得一提的是xsd1导入xsd2

<xs:import namespace="{{ param1 }}" schemaLocation="{{ param2 }}xsd/2"/>

我不确定问题可能是什么。任何帮助都将不胜感激

解决

问题是用于定位xsd文件的路径不正确,因为它已进入/myproject/文件夹,不需要我手动添加/myproject/的位置

public function _xsdAction($xsd) {
        $this->response->setHeader("Content-Type", "text/xml");

        $this->view->pick('server/_xsd' . $xsd);

        $this->view->setVars(array(
            'param1' => Server::config('param1'),
            'param2'  => Server::config('param2'),
        ));
}
<xs:import namespace="{{ param1 }}" schemaLocation="{{ param2 }}xsd/2"/>