Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/01/2013, 10:57
Avatar de pierxo
pierxo
 
Fecha de Ingreso: septiembre-2012
Mensajes: 20
Antigüedad: 11 años, 7 meses
Puntos: 0
Consumir un Web service.Net en Java

Saludos,
Estoy intentando consumir un web services hecho en c#.Net a traves de otro Web Services hecho en Java, pero me sale este error:

937 ERROR [STDERR] AxisFault
faultCode: {http://schemas.microsoft.com/net/2005/12/windowscommunicationfounda
tion/dispatcher}DeserializationFailed
faultSubcode:
faultString: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'insertarDatos'. End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' expected. Found element 'multiRef' from namespace ''. Line 1, position 3691.



Código Java:
Ver original
  1. final String endpoint = "http://localhost:21657/WS_prueba/Service.svc";
  2.            
  3.             Service service = new Service();
  4.             try {
  5.                 //1.Creamos un llamada
  6.                 Call llamadaServicio = (Call) service.createCall();
  7.            
  8.                
  9.                 //2. Especificar la direccion del servicio al que vamos a llamar
  10.                 llamadaServicio.setTargetEndpointAddress(new java.net.URL(endpoint));
  11.                
  12.                 //3.Especificar la operacion que vamos a consumir
  13.                                 llamadaServicio.setOperationName(new QName("http://tempuri.org/","insertarDatos"));
  14.                 llamadaServicio.setSOAPActionURI("http://tempuri.org/IServiceTraije/insertarDatos");
  15.                
  16.                
  17.                 //5.Especificar nuestra llamada al servicio
  18.                 llamadaServicio.addParameter("idServ", XMLType.XSD_STRING, ParameterMode.IN);
  19.                 llamadaServicio.addParameter("idTriaje", XMLType.XSD_STRING, ParameterMode.IN);
  20.                 llamadaServicio.addParameter("fecCarga", XMLType.XSD_DATETIME, ParameterMode.IN);
  21.                 llamadaServicio.addParameter("fecLectura", XMLType.XSD_DATETIME, ParameterMode.IN);
  22.                
  23.                 //6. Especificar el valor de retorno - en este caso un BEAN
  24.        
  25.                 llamadaServicio.setReturnType(XMLType.XSD_INT);
  26.                 llamadaServicio.invoke(new Object[] {idServ, idTriaje, fecCarga, fecLectura});         
  27.                
  28.                
  29.             } catch (ServiceException e) {
  30.                 // TODO Auto-generated catch block
  31.                 e.printStackTrace();
  32.             } catch (RemoteException e) {
  33.                 // TODO Auto-generated catch block
  34.                 e.printStackTrace();
  35.             } catch (MalformedURLException e) {
  36.                 // TODO Auto-generated catch block
  37.                 e.printStackTrace();
  38.             }

Alguien podría ayudarme?