Hola, este es mi primer post en el foro, asi que me disculpo si esto ya habia sido prguntado antes.
Lo que pasa es que tengo que hacer un Web Service en PHP y debo hacer el cliente en Java, para el desarrollo del cliente utilize NetBeans 6.1, el asunto es que aunque toma bien la referencia y lo demas, cuando voy a probar el servicio me da esta excepción (la pongo completa por si sirve de algo)
InvocationTargetException
org.netbeans.modules.websvc.registry.ui.Reflection Helper.callMethodWithParams(ReflectionHelper.java: 540) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.invokeMethod(TestWebServiceMethodDlg .java:466) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.access$500(TestWebServiceMethodDlg.j ava:92) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg$3.run(TestWebServiceMethodDlg.java:4 09) org.openide.util.RequestProcessor$Task.run(Request Processor.java:561) org.openide.util.RequestProcessor$Processor.run(Re questProcessor.java:986) Next Exception Layer null sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.registry.ui.Reflection Helper.callMethodWithParams(ReflectionHelper.java: 534) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.invokeMethod(TestWebServiceMethodDlg .java:466) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.access$500(TestWebServiceMethodDlg.j ava:92) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg$3.run(TestWebServiceMethodDlg.java:4 09) org.openide.util.RequestProcessor$Task.run(Request Processor.java:561) org.openide.util.RequestProcessor$Processor.run(Re questProcessor.java:986) Next Exception Layer Error de transporte HTTP: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?; nested exception is: Error de transporte HTTP: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response? webservice.HolaWSPortType_Stub.dimeHola(HolaWSPort Type_Stub.java:87) webservice.HolaWSClient.holawsportDimeHola(HolaWSC lient.java:22) sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.registry.ui.Reflection Helper.callMethodWithParams(ReflectionHelper.java: 534) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.invokeMethod(TestWebServiceMethodDlg .java:466) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.access$500(TestWebServiceMethodDlg.j ava:92) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg$3.run(TestWebServiceMethodDlg.java:4 09) org.openide.util.RequestProcessor$Task.run(Request Processor.java:561) org.openide.util.RequestProcessor$Processor.run(Re questProcessor.java:986) Next Exception Layer Error de transporte HTTP: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response? com.sun.xml.rpc.client.http.HttpClientTransport.in voke(HttpClientTransport.java:140) com.sun.xml.rpc.client.StreamingSender._send(Strea mingSender.java:96) webservice.HolaWSPortType_Stub.dimeHola(HolaWSPort Type_Stub.java:70) webservice.HolaWSClient.holawsportDimeHola(HolaWSC lient.java:22) sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.registry.ui.Reflection Helper.callMethodWithParams(ReflectionHelper.java: 534) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.invokeMethod(TestWebServiceMethodDlg .java:466) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg.access$500(TestWebServiceMethodDlg.j ava:92) org.netbeans.modules.websvc.registry.ui.TestWebSer viceMethodDlg$3.run(TestWebServiceMethodDlg.java:4 09) org.openide.util.RequestProcessor$Task.run(Request Processor.java:561) org.openide.util.RequestProcessor$Processor.run(Re questProcessor.java:986)
El código del servicio es este:
<?php
require_once('lib/nusoap.php');
$soap_action = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"];
$s = new soap_server;
$s->configureWSDL('holaWS','urn:ion');
$s->wsdl->schemaTargetNamespace = 'urnface-surprise.png n';
$s->register('DimeHola',
array('nombre' => 'xsd:string'),
array('return' => 'xsd:string'),
'urn:ion',
$soap_action
);
function DimeHola($nombre){
return "Hola ".$nombre." desde ".$_SERVER["SERVER_NAME"];
}
$s->service($HTTP_RAW_POST_DATA);
?>
Soy nuevo en esto de hacer web services con PHP asi que les agradezco toda la ayuda que me puedan brindar ^^.