- define: documentation ( source)
<?php
$xml = '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:getBundles">
<soapenv:Header>
<soapenv:Body>
<urn:getBundles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<request xsi:type="urn:getBundlesRequest" xmlns:urn="urn:SelfcareWebservice">
<userid>hexa</userid>
<password>hexa123</password>
<requestid>000</requestid>
<msisdn>60182003838</msisdn>
<productname xsi:type="xsd:string"></productname>
<bundlename xsi:type="xsd:string"></bundlename>
</request>
</urn:getBundles>
</soapenv:Body>
</soapenv:Envelope>';
$sxe = new SimpleXMLElement($xml);
// Define some short identifiers for namespaces without relying on their prefix in the XML
define('NS_ENV', 'http://schemas.xmlsoap.org/soap/envelope/');
define('NS_SFORCE', 'getBundlesResponse');
// $sxe already represents the soapenv:Envelope node, so we don't need to mention that
$result = $sxe->children(NS_ENV)->Body->children(NS_SFORCE)->loginResponse->result->serverUrl;
echo $result;