Guest User

Untitled

a guest
Apr 24th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. POST /servicios/estadocarros.asmx HTTP/1.1
  2. Host: www.carritosonline.com
  3. Content-Type: text/xml; charset=utf-8
  4. Content-Length: length
  5. SOAPAction: "http://100.8.97.00/webservices/estadocarros"
  6.  
  7. <?xml version="1.0" encoding="utf-8"?>
  8. <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  9. <soap:Header>
  10. <AuthHeader xmlns="http://100.8.97.00/webservices/">
  11. <Username>string</Username>
  12. <Password>string</Password>
  13. <Empresa>string</Empresa>
  14. </AuthHeader>
  15. </soap:Header>
  16. <soap:Body>
  17. <estadocarros xmlns="http://100.8.97.00/webservices/">
  18. <empresa>string</empresa>
  19. <listaMatriculas>
  20. <string>string</string>
  21. <string>string</string>
  22. </listaMatriculas>
  23. </estadocarros>
  24. </soap:Body>
  25. </soap:Envelope>
  26.  
  27. <?xml version="1.0" encoding="UTF-8"?>
  28. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://100.8.97.00/webservices/">
  29. <SOAP-ENV:Header>
  30. <ns1:AuthHeader>
  31. <ns1:Username>username</ns1:Username>
  32. <ns1:Password>password</ns1:Password>
  33. <ns1:Empresa>empresa</ns1:Empresa>
  34. </ns1:AuthHeader>
  35. </SOAP-ENV:Header>
  36. <SOAP-ENV:Body>
  37. <ns1:estadocarros/>
  38. <empresa>empresa</empresa>
  39. <listaMatriculas>
  40. <string>placa vehiculo</string>
  41. </listaMatriculas>
  42. </SOAP-ENV:Body>
  43. </SOAP-ENV:Envelope>
  44.  
  45. <?php
  46. ini_set("soap.wsdl_cache_enabled", "0");
  47.  
  48. $wsdl = "http://www.carrosonline.com/servicios/estadocarros.asmx?WSDL";
  49. $ns = "http://100.8.97.00/webservices/";
  50.  
  51. $soapClient = new SoapClient($wsdl, array("trace" => 1));
  52.  
  53. $authentication = new stdClass();
  54. $authentication->Username = "username";
  55. $authentication->Password = "password";
  56. $authentication->Empresa = "empresa";
  57.  
  58. $header = new SoapHeader($ns, "AuthHeader", $authentication);
  59. $soapClient->__setSoapHeaders($header);
  60.  
  61. $data = null;
  62. @$data->string = 4000;
  63.  
  64. echo "<pre>";
  65.  
  66. $soapParams=array(null,
  67. new SoapParam('mei', 'empresa'),
  68. new SoapParam($data, 'listaMatriculas'));
  69.  
  70. $respuesta = $soapClient->__soapCall("estadocarros", $soapParams);
  71.  
  72.  
  73. echo "<h2>Consulta al servidor:</h2>n" . htmlentities(str_ireplace("><", ">n<", $soapClient->__getLastRequest())) . "n";
  74.  
  75. echo "<h2>Respuesta del servidor:</h2>n" . htmlentities(str_ireplace("><", ">n<", $soapClient->__getLastResponse())) . "n";
  76.  
  77. echo "n<br><hr><br><h2>WS:</h2>";
  78. var_dump($soapClient->__getFunctions());
  79. echo "<br><hr><br>";
  80. var_dump($soapClient->__getTypes());
Add Comment
Please, Sign In to add comment