When initializing the SoapClient class with proxy-options, the WSDL and its methods are accessed over proxy correctly:
$client = new SoapClient(
WSDL_URL,
array(
'proxy_host' => PROXY_HOST,
'proxy_port' => PROXY_PORT
)
);
Schemas (schemaLocation) however are not getting accessed over the specified proxy:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xs:import namespace="http://example.com/webservice/cisbase" schemaLocation="http://example.com/ws/cis_base.xsd"/>
<xs:import namespace="http://de.ws.example" schemaLocation="http://example.com/ws/is_base_de.xsd"/>
</xs:schema>
This leads to:
SOAP-ERROR: Parsing Schema: can't import schema from ...
So basically the SoapClient is trying to access the cis_base.xsd and is_base_de.xsd without proxy which is failing.
Is there a reason why the PHP SoapClient behaves like this and is there a workaround?