PHP SOAP-ERROR:解析模式:can';t从xsd导入架构
我正在运行一些使用soap编写的web服务 一些web服务正在运行,但是那些尝试导入本地xsd的web服务失败了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
<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"/>