sc_web_service with soap server

Hi ,

I using sc_web_service command to read order detail , I receive the right infos but I cannot parse this contents to array.

$muser=“xxxxxx”;
$mpwd=“yyyyyy”;

$postxml=’<?xml version=“1.0” encoding=“utf-8”?>
<soap:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Header>
<AuthHeader xmlns=“http://tempuri.org/”>
<UserName>’.$muser.’</UserName>
<Password>’.$mpwd.’</Password>
</AuthHeader>
</soap:Header>
<soap:Body>
<GetAllMessages xmlns=“http://tempuri.org/” />
</soap:Body>
</soap:Envelope>’;

$response = sc_webservice(“curl”, “http://messaging.yemeksepeti.com/MessagingWebService/Integration.asmx”, 80, “POST”,
$postxml,
array(CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(‘Content-Type: text/xml; charset=utf-8’ ),
CURLOPT_SSL_VERIFYPEER=>false), 30);
var_dump($response);

I tried simpleXMlElement, tried with DomDocument, with xpath …
normally, $response must be an array because of last parameter in sc_web_service, but var_dump($response) gives :

Thanks
Nac

The problem is with simpleXMLElement it cause bad results with soap I think

This working code for who needs

$dom=new domDocument;
$dom->loadXML($response);
$xml=simplexml_load_string($dom->textContent);

Nac