Estoy conectandome a un webservices
el cual tiene la oepracion consultar con los siguientes parametros:
$Vec = array('idsus' => '8070037','clasus' => '77MSEe','tipoid' => '1','id' => '98663305','papellido' => 'escobar');
este es el codigo que implemente:
Código:
Pero cuando lo ejecuto no me trae nada.require_once('n/nusoap-0.9.5/lib/nusoap.php'); $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : ''; $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : ''; $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : ''; $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : ''; $client = new nusoap_client('http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl', 'wsdl', $proxyhost, $proxyport, $proxyusername, $proxypassword); //&debug=1 $err = $client->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $Vec = array('idsus' => '8070037','clasus' => '77MSEe','tipoid' => '1','id' => '98663305','papellido' => 'escobar'); $call = 'consultar'; $result = $client->call($call, $Vec); echo '<h2>Resultado</h2><pre>'; print_r($result); echo '</pre>'; // Check for a fault if ($client->fault) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { // Display the result echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
solo me muestra
Código HTML:
Resultado Array ( [faultcode] => soapenv:Server.userException [faultstring] => java.lang.NullPointerException [detail] => Array ( [hostname] => web-pruebas ) ) Fault Array ( [faultcode] => soapenv:Server.userException [faultstring] => java.lang.NullPointerException [detail] => Array ( [hostname] => web-pruebas ) ) Request POST /dhws.demo/services/DHService HTTP/1.0 Host: 172.24.14.29:8080 User-Agent: NuSOAP/0.9.5 (1.123) Content-Type: text/xml; charset=ISO-8859-1 SOAPAction: "" Content-Length: 809 <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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/" xmlns:ns6580="http://ws.hc.dc.com"><SOAP-ENV:Body><ns6580:consultar xmlns:ns6580="http://ws.hc.dc.com"><idsus xsi:type="SOAP-ENC:string">8070037</idsus><clasus xsi:type="SOAP-ENC:string">77MSEe</clasus><tipoid xsi:type="SOAP-ENC:string">1</tipoid><id xsi:type="SOAP-ENC:string">98663305</id><papellido xsi:type="SOAP-ENC:string">escobar</papellido><paramFormulario xsi:nil="true" xsi:type="SOAP-ENC:string"/></ns6580:consultar></SOAP-ENV:Body></SOAP-ENV:Envelope> Response HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=iso-8859-1 Date: Fri, 16 Jul 2010 02:04:47 GMT Connection: close <?xml version="1.0" encoding="ISO-8859-1"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>java.lang.NullPointerException</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">web-pruebas</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> Debug 2010-07-15 22:04:44.402436 nusoap_client: ctor wsdl=wsdl timeout=0 response_timeout=30 endpoint=string(58) "http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl" 2010-07-15 22:04:44.402721 nusoap_client: will use lazy evaluation of wsdl from http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl 2010-07-15 22:04:44.402899 nusoap_client: call: operation=consultar, namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc, use=encoded, endpointType=wsdl params=array(5) { ["idsus"]=> string(7) "8070037" ["clasus"]=> string(6) "77MSEe" ["tipoid"]=> string(1) "1" ["id"]=> string(8) "98663305" ["papellido"]=> string(7) "escobar" } headers=bool(false) 2010-07-15 22:04:44.403113 nusoap_client: instantiating wsdl class with doc: http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl 2010-07-15 22:04:44.403306 wsdl: ctor wsdl= timeout=0 response_timeout=30 2010-07-15 22:04:44.403488 wsdl: parse and process WSDL path= 2010-07-15 22:04:44.403652 wsdl: setCredentials username= authtype= certRequest= array(0) { } 2010-07-15 22:04:44.403852 wsdl: parse and process WSDL path=http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl 2010-07-15 22:04:44.404003 wsdl: parse WSDL at path=http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl 2010-07-15 22:04:44.404157 wsdl: getting WSDL http(s) URL http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl 2010-07-15 22:04:44.404362 soap_transport_http: ctor url=http://172.24.14.29:8080/dhws.demo/services/DHService?wsdl use_curl= curl_options: array(0) { } 2010-07-15 22:04:44.404577 soap_transport_http: parsed URL scheme = http 2010-07-15 22:04:44.404738 soap_transport_http: parsed URL host = 172.24.14.29 2010-07-15 22:04:44.404900 soap_transport_http: parsed URL port = 8080 2010-07-15 22:04:44.405060 soap_transport_http: parsed URL path = /dhws.demo/services/DHService 2010-07-15 22:04:44.405219 soap_transport_http: parsed URL query = wsdl 2010-07-15 22:04:44.405423 soap_transport_http: set header Host: 172.24.14.29:8080 2010-07-15 22:04:44.405598 soap_transport_http: set header User-Agent: NuSOAP/0.9.5 (1.123) 2010-07-15 22:04:44.405773 soap_transport_http: set header Accept-Encoding: gzip, deflate 2010-07-15 22:04:44.405934 soap_transport_http: set header Connection: close 2010-07-15 22:04:44.406097 soap_transport_http: entered send() with data of length: 0 2010-07-15 22:04:44.406256 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host 172.24.14.29, port 8080 2010-07-15 22:04:44.406427 soap_transport_http: calling fsockopen with host 172.24.14.29 connection_timeout 0 2010-07-15 22:04:44.428380 soap_transport_http: set response timeout to 30 2010-07-15 22:04:44.428588 soap_transport_http: socket connected 2010-07-15 22:04:44.428767 soap_transport_http: HTTP request: GET /dhws.demo/services/DHService?wsdl HTTP/1.1 2010-07-15 22:04:44.429017 soap_transport_http: HTTP header: Host: 172.24.14.29:8080 2010-07-15 22:04:44.429172 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.9.5 (1.123) 2010-07-15 22:04:44.429320 soap_transport_http: HTTP header: Accept-Encoding: gzip, deflate 2010-07-15 22:04:44.429468 soap_transport_http: HTTP header: Connection: close 2010-07-15 22:04:44.429889 soap_transport_http: wrote data to socket, length = 161 2010-07-15 22:04:44.471439 soap_transport_http: read line of 17 bytes: HTTP/1.1 200 OK 2010-07-15 22:04:44.471661 soap_transport_http: read line of 27 bytes: Server: Apache-Coyote/1.1 2010-07-15 22:04:44.471867 soap_transport_http: read line of 38 bytes: Content-Type: text/xml;charset=utf-8 2010-07-15 22:04:44.472064 soap_transport_http: read line of 37 bytes: Date: Fri, 16 Jul 2010 02:04:47 GMT 2010-07-15 22:04:44.472246 soap_transport_http: read line of 19 bytes: Connection: close 2010-07-15 22:04:44.472412 soap_transport_http: read line of 2 bytes:
depronto alguien me podria colaborar o dar una luz sobre por que no esta funcionando.
de nuevo mil gracias y disculpen la molestia.