Guest User

Untitled

a guest
Dec 23rd, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. public function doxml($action, $xml)
  2.     {
  3.  
  4.         $actionresponse = $action."Response";
  5.         $xml = "<?xml version='1.0' encoding='UTF-8'?>
  6.         <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='urn:vim25' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  7.         <SOAP-ENV:Body>
  8.         <ns1:$action>
  9.         $xml
  10.         </ns1:$action>
  11.         </SOAP-ENV:Body>
  12.         </SOAP-ENV:Envelope>";
  13.         //echo $xml;
  14.         $response = $this->__doRequest($xml, $this->location, "urn:vim25/5.1", 1, $one_way = 0);
  15.         $soap = simplexml_load_string($response);
  16.         return $soap->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children()->$actionresponse;
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment