PHP SOAP-ERROR: Parsing Schema: can't import schema from xsd



I am running some web services which are written using soap.


Some of the web services are running however those that try to import a local xsd are failing



<faultcode>WSDL</faultcode>
<faultstring>
SOAP-ERROR: Parsing Schema: can't import schema from 'http://localhost/myproject/_xsd/1'
</faultstring>


The following is an extract from my wsdl



<definitions
xmlns:wsu="http://ift.tt/Hm2joJ"
xmlns:wsp="http://ift.tt/18dhY7h"
xmlns:wsp1_2="http://ift.tt/Hm2joK"
xmlns:wsam="http://ift.tt/18dhVIG"
xmlns:soap="http://ift.tt/KIQHA2"
xmlns:tns="http://ift.tt/1GjYE8p"
xmlns:xsd="http://ift.tt/tphNwY"
xmlns="http://ift.tt/LcBaVt"
targetNamespace="http://ift.tt/1GjYE8p"
name="PlatformControllerWSService">
<types>
<xsd:schema>
<xsd:import
namespace="http://mysite/"
schemaLocation="http://localhost/myproject/1" />
</xsd:schema>
<xsd:schema>
<xsd:import
namespace="http://somesite/"
schemaLocation="http://localhost/myproject/_xsd/2" />
</xsd:schema>
</types>


Loading the xsd files goes to a php function



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'),
));
}


Also worth mentioning is that xsd1 imports xsd2



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


I am not sure what the issue might be. Any help would be appreciated


No comments:

Post a Comment