Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class SneakyFauxSoap extends SoapClient {
- public $response;
- function __doRequest($val){
- return $this->response;
- }
- }
- $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>';
- $soap = new SneakyFauxSoap(null,
- array(
- 'uri' =>'something',
- 'location'=>'something',
- 'soap_version' => SOAP_1_1));
- $soap->response = $x;
- var_dump($soap->somerandomfunction());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement