POST A request overriding a saved request

This method is similar to GET Response from saved request. Its advantage is that it lets you override the saved request in order to alter its values before they are actually sent to the SOAP Web service.

Resource url:

  • https://api.wsdlotphp.com/rest/request/v1/send/[API_TOKEN]/[REQUEST_ID][/FULL][RESPONSE_FORMAT]

Parameters:

Example request:

  • http://api.wsdltophp.com/rest/request/v1/send/53d5dbf25871fddb417ca10105ee06ba2022f2a2/846.php: the response does not contain the saved request details
  • http://api.wsdltophp.com/rest/request/v1/send/53d5dbf25871fddb417ca10105ee06ba2022f2a2/846/1.php: the response does contain the saved request details

POST data:

$posts = array( 'parameters'=>array( 1=>array( 1=>array( 4=>112))), 'soapheaders'=>array( 'mustunderstand'=>array( 1=>1)), 'soapoptions'=>array( 'wsdl_url'=>__DIR__ . '/../../wsdl/112.0/PayPalSvc.wsdl'), 'httpheaders'=>array( 'name'=>array( 'X-FROM', 'X-TO'), 'value'=>array( 'ME', 'YOU'))); $url = 'https://api.wsdltophp.com/rest/request/v1/send/53d5dbf25871fddb417ca10105ee06ba2022f2a2/846/1.php'; $http = new HttpRequest($url,HTTP_METH_POST); $http->setPostFields($posts); $data = $http->send(); print_r(unserialize($data->body));

Example response (full response):

a:5:{ s:10:"error_code";i:0; s:5:"error";b:0; s:12:"error_reason";N; s:13:"output_format";s:3:"php"; s:4:"data";a:3:{ s:8:"soapcall";a:7:{ s:2:"id";s:3:"846"; s:5:"title";s:45:"Request sent on 13 February 2014 at 22h58m46s"; s:11:"description";s:73:"Call of PayPalServiceGet::GetBalance, nouvelle version PSR-2 de WsdlToPhp"; s:7:"created";s:10:"1392328700"; s:11:"packagename";s:6:"PayPal"; s:11:"servicename";s:16:"PayPalServiceGet"; s:10:"methodname";s:10:"GetBalance"; } s:8:"requests";a:4:{ s:11:"soapoptions";a:2:{ s:8:"wsdl_url";s:49:"https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl"; s:8:"location";s:30:"https://api-3t.paypal.com/2.0/"; } s:11:"soapheaders";a:6:{ s:9:"namespace";a:1:{ i:1;s:22:"urn:ebay:api:PayPalAPI"; } s:4:"name";a:1:{ i:1;s:20:"RequesterCredentials"; } s:14:"mustunderstand";a:1:{ i:1;s:1:"0"; } s:5:"actor";a:1:{ i:1;s:0:""; } s:9:"data_type";a:1:{ i:1;s:36:"PayPalStructCustomSecurityHeaderType"; } s:4:"data";a:1:{ i:1;a:3:{ i:1;s:0:""; i:2;s:0:""; i:3;a:8:{ i:1;s:0:""; i:2;s:0:""; i:3;s:0:""; i:4;s:26:"************************"; i:5;s:16:"************************"; i:6;s:56:"************************************************"; i:7;s:0:""; i:8;s:0:""; } } } } s:11:"httpheaders";a:2:{ s:4:"name";a:1:{ i:0;s:0:""; } s:5:"value";a:1:{ i:0;s:0:""; } } s:10:"parameters";a:1:{ i:1;a:1:{ i:1;a:5:{ i:1;s:1:"1"; i:2;s:15:"VALUE_RETURNALL"; i:3;s:0:""; i:4;s:3:"112"; i:5;s:0:""; } } } } s:9:"responses";a:7:{ s:10:"xmlrequest";s:885:"<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents" xmlns:ns2="urn:ebay:api:PayPalAPI"> <SOAP-ENV:Header> <ns2:RequesterCredentials> <ns1:Credentials> <ns1:Username>************************</ns1:Username> <ns1:Password>************************</ns1:Password> <ns1:Signature>************************************************</ns1:Signature> </ns1:Credentials> </ns2:RequesterCredentials> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns2:GetBalanceReq> <ns2:GetBalanceRequest> <ns1:DetailLevel>ReturnAll</ns1:DetailLevel> <ns1:Version>109</ns1:Version> <ns2:ReturnAllCurrencies>1</ns2:ReturnAllCurrencies> </ns2:GetBalanceRequest> </ns2:GetBalanceReq> </SOAP-ENV:Body> </SOAP-ENV:Envelope>"; s:11:"xmlresponse";s:2036:"<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI"> <SOAP-ENV:Header> <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"/> <RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType"> <Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType"> <Username xsi:type="xs:string"/> <Password xsi:type="xs:string"/> <Signature xsi:type="xs:string"/> <Subject xsi:type="xs:string"/> </Credentials> </RequesterCredentials> </SOAP-ENV:Header> <SOAP-ENV:Body id="_0"> <GetBalanceResponse xmlns="urn:ebay:api:PayPalAPI"> <Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2014-04-30T22:03:25Z</Timestamp> <Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack> <CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">bf94944050c34</CorrelationID> <Version xmlns="urn:ebay:apis:eBLBaseComponents">109</Version> <Build xmlns="urn:ebay:apis:eBLBaseComponents">10277387</Build> <Balance xsi:type="cc:BasicAmountType" currencyID="EUR">996.79</Balance> <BalanceTimeStamp xsi:type="xs:dateTime">2014-04-30T22:03:25Z</BalanceTimeStamp> <BalanceHoldings xsi:type="cc:BasicAmountType" currencyID="EUR">996.79</BalanceHoldings> </GetBalanceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>"; s:17:"httpheaderrequest";a:6:{ s:4:"Host";s:17:"api-3t.paypal.com"; s:10:"Connection";s:10:"Keep-Alive"; s:10:"User-Agent";s:14:"PHP-SOAP/5.3.5"; s:12:"Content-Type";s:23:"text/xml; charset=utf-8"; s:10:"SOAPAction";s:2:""""; s:14:"Content-Length";s:3:"770"; } s:18:"httpheaderresponse";a:5:{ s:4:"Date";s:29:"Wed, 30 Apr 2014 22:03:25 GMT"; s:6:"Server";s:6:"Apache"; s:14:"Content-Length";s:4:"1940"; s:10:"Connection";s:5:"close"; s:12:"Content-Type";s:23:"text/xml; charset=utf-8"; } s:10:"phprequest";a:1:{ i:0;O:25:"PayPalStructGetBalanceReq":6:{ s:17:"GetBalanceRequest";O:33:"PayPalStructGetBalanceRequestType":10:{ s:19:"ReturnAllCurrencies";s:1:"1"; s:11:"DetailLevel";s:9:"ReturnAll"; s:13:"ErrorLanguage";N; s:7:"Version";s:3:"109"; s:3:"any";N; s:23:"PayPalWsdlClassresult";N; s:26:"PayPalWsdlClasslastError";a:0:{} s:37:"PayPalWsdlClassinternArrayToIterate";N; s:44:"PayPalWsdlClassinternArrayToIterateIsArray";N; s:43:"PayPalWsdlClassinternArrayToIterateOffset";N; } s:23:"PayPalWsdlClassresult";N; s:26:"PayPalWsdlClasslastError";a:0:{} s:37:"PayPalWsdlClassinternArrayToIterate";N; s:44:"PayPalWsdlClassinternArrayToIterateIsArray";N; s:43:"PayPalWsdlClassinternArrayToIterateOffset";N; } } s:11:"phpresponse";O:34:"PayPalStructGetBalanceResponseType":14:{ s:7:"Balance";O:27:"PayPalStructBasicAmountType":7:{ s:10:"currencyID";s:3:"EUR"; s:1:"_";s:6:"996.79"; s:23:"PayPalWsdlClassresult";N; s:26:"PayPalWsdlClasslastError";N; s:37:"PayPalWsdlClassinternArrayToIterate";N; s:44:"PayPalWsdlClassinternArrayToIterateIsArray";N; s:43:"PayPalWsdlClassinternArrayToIterateOffset";N; } s:16:"BalanceTimeStamp";s:20:"2014-04-30T22:03:25Z"; s:15:"BalanceHoldings";a:1:{ i:0;O:27:"PayPalStructBasicAmountType":7:{ s:10:"currencyID";s:3:"EUR"; s:1:"_";s:6:"996.79"; s:23:"PayPalWsdlClassresult";N; s:26:"PayPalWsdlClasslastError";N; s:37:"PayPalWsdlClassinternArrayToIterate";N; s:44:"PayPalWsdlClassinternArrayToIterateIsArray";N; s:43:"PayPalWsdlClassinternArrayToIterateOffset";N; } } s:9:"Timestamp";s:20:"2014-04-30T22:03:25Z"; s:3:"Ack";s:7:"Success"; s:13:"CorrelationID";s:13:"bf94944050c34"; s:6:"Errors";N; s:7:"Version";s:3:"112"; s:5:"Build";s:8:"10277387"; s:23:"PayPalWsdlClassresult";N; s:26:"PayPalWsdlClasslastError";N; s:37:"PayPalWsdlClassinternArrayToIterate";N; s:44:"PayPalWsdlClassinternArrayToIterateIsArray";N; s:43:"PayPalWsdlClassinternArrayToIterateOffset";N; } s:9:"soapfault";s:0:""; } } }