Hello,
I am using php version 5.1.0.
I am attempting to execute a web service, which has the wsdl structure shown below:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="..." xmlns:xsd="..." xmlns:soap="...">
<soap:Header>...</soap:Header>
<soap:Body>
<SaveItem xmlns="...">
<ItemXml>xml</ItemXml>
<PropertyView>string</PropertyView>
</SaveItem>
</soap:Body>
</soap:Envelope>
I have an existing SoapClient object, and I have been able to successfully execute other web services. However, when I attempt the aforementioned request 'SaveItem' (with an xml param), I am having many problems.
As shown in the wsdl, the ItemXml requires xml as its content. I have tried using an domelement, domdocument, xml-string etc. but so far all have failed. When I use domelement or domdocument as the 'ItemXml' param the soapCall() function kills the execution immediately. On the other hand, when I use a string-xml representation I get a custom 'Invalid XML' message from the server, and on viewing the getLastRequest() data, it is evident that the 'ItemXml' param is null as shown below:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="..." xmlns:ns1="...">
<SOAP-ENV:Header>...</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:SaveItem>
<ns1:ItemXml/>
<ns1ropertyView>website</ns1
ropertyView>
</ns1:SaveItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The __soapCall() function is as shown below:
$params = array("ItemXml" => $itemxml, "PropertyView" => $propertyview);
$result = $this->soapclient->__soapCall($function, array("parameters"=>$params), $options, $this->soapheaders);
I am totally unsure what to do! I have not been able to work this out