Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. class request {
  2.  
  3. public $request;
  4.  
  5. public function __construct() {
  6. $this->request = new data();
  7. }
  8.  
  9. }
  10.  
  11. class data {
  12.  
  13. public $EntityCode = 10324;
  14. public $TicketId = 6610042;
  15.  
  16. }
  17.  
  18. $webService = "https://test1.e-collect.com/d_Express/webservice/eCollectWebservicesv2.asmx";
  19. $wsdl = "https://test1.e-collect.com/d_Express/webservice/eCollectWebservicesv2.asmx?wsdl";
  20. $customer = new SoapClient($wsdl, array('trace' => true, 'debug' => true));
  21. $req = new request();
  22.  
  23. $request = new SoapVar($req, SOAP_ENC_OBJECT, 'request', 'http://www.avisortech.com/eCollectWebservices');
  24. try {
  25. //$result=$customer->__soapCall('getTransactionInformation', new SoapParam($request,'request'));
  26. $result = $customer->getTransactionInformation(new SoapParam($request, 'request'));
  27. } catch (Exception $exc) {
  28. echo $exc->getMessage();
  29. }
  30. var_dump($customer->__getLastRequest());
  31. echo($result);
  32.  
  33. <?xml version="1.0" encoding="UTF-8"?>
  34. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.avisortech.com/eCollectWebservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  35. <SOAP-ENV:Body>
  36. <ns1:getTransactionInformation xsi:type="ns1:request">
  37. <request>
  38. <EntityCode>10324</EntityCode>
  39. <TicketId>6610042</TicketId>
  40. </request>
  41. </ns1:getTransactionInformation>
  42. </SOAP-ENV:Body>
  43. </SOAP-ENV:Envelope>
  44.  
  45. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ecol="http://www.avisortech.com/eCollectWebservices">
  46. <soapenv:Header/>
  47. <soapenv:Body>
  48. <ecol:getTransactionInformation>
  49. <ecol:request>
  50. <ecol:EntityCode>10324</ecol:EntityCode>
  51. <ecol:TicketId>6610042</ecol:TicketId>
  52. </ecol:request>
  53. </ecol:getTransactionInformation>
  54. </soapenv:Body>
  55. </soapenv:Envelope>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement