Advertisement
Guest User

Untitled

a guest
Jun 19th, 2012
1,693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. <?php
  2. class SneakyFauxSoap extends SoapClient {
  3.     public $response;
  4.     function __doRequest($val){
  5.         return $this->response;
  6.     }
  7. }
  8. $x = '<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:vms_ws_list_filesResponse xmlns:ns1="http://tempuri.org"><return xsi:type="xsd:string">SomeText</return></ns1:vms_ws_list_filesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>';
  9. $soap = new SneakyFauxSoap(null,
  10.     array(
  11.         'uri' =>'something',
  12.         'location'=>'something',
  13.         'soap_version' => SOAP_1_1));
  14. $soap->response = $x;
  15. var_dump($soap->somerandomfunction());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement