Click to See Complete Forum and Search --> : Error calling SimpleXMLElement


mschiefmaker
05-17-2009, 03:18 PM
Hi

I am new to XML and SOAP and am having trouble using SimpleXMLElement. :confused:

I am tring to call a webservice with a method CreateOrder that has 2 paramaeter Auth (String) and CustomerOrder (string). I have replicated some code from what has been used before but I must have an error as when I run the code below I get the error "String could not be parsed as XML"

$result_xml = $client->CreateOrder(array(
'Auth' => $this->config->ws->auth,
'CustomerOrder' => $xml
))->CreateResult;

$result = new SimpleXMLElement($result_xml);

Any ideas what is wrong

Thanks in advance

MM

jkmyoung
05-19-2009, 02:21 PM
Could you output the string, and tell us what you get?