Java - Error con ur-type

 
Vista:

Error con ur-type

Publicado por Omar Ramirez (1 intervención) el 01/10/2009 21:39:40
Hola, tengo un cliente soap el cual me arroja el siguiente error:

No Deserializer found to deserialize a 'http://www.w3.org/1999/XMLSchema:ur-type' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'

Este es el codigo de la clase

import java.io.*;
import java.net.*;
import java.util.*;
import org.w3c.dom.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.encoding.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.encoding.soapenc.*;

public class clientSoap {
//public int addAccount (int account_id, Hashtable account_spec) throws Exception {
public static void main(String[] args) throws Exception {
URL url = new URL ("http://dev:8085/SOAP/Case");

Call call = new Call();
call.setTargetObjectURI("urn:SOAP/Case");
call.setMethodName("List");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
String session_key = "7WqE3OF0kQK9t8CKn5nuxS1SnSObr280O257O3g9Pakvk0P05r0L5n55H72ki3hf";
int account_id = 14;
int many = 1;

params.addElement (new Parameter("session_key", String.class, session_key, null));
params.addElement (new Parameter("account_id", Integer.class, account_id, null));
params.addElement (new Parameter("many", Integer.class, many, null));


call.setParams (params);
// invoke the soap method
// the invoke() method returns a SOAP Response object which encapsulates all the information related to the SOAP Response

// try{
Response resp = call.invoke(url, "");

if (resp.generatedFault ( )) {
Fault fault = resp.getFault ( );
System.out.println ("\nOuch, the call failed: ");
System.out.println (" Fault Code = " + fault.getFaultCode ( ));
System.out.println (" Fault String = " + fault.getFaultString ( ));
//return 0;
} else {
System.out.println(resp);
Parameter result = resp.getReturnValue();
// System.out.println(result);
//return 1;
}
// }catch(SOAPException e)
// {
// System.out.println("Caught SOAPException (" + e.getFaultCode() + "): "+ e.getMessage());
// }

}
}

y este es el xml que regresa la peticion:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ListResponse xmlns="urn:SOAP/Case">
<START xsi:type="xsd:int">0</START>
<MANY xsi:type="xsd:int">1</MANY>
<LIST soapenc:arrayType="xsd:ur-type[1]" xsi:type="soapenc:Array">
<item>
<link xsi:type="xsd:string">sub1</link>
<PT xsi:type="xsd:string">Servicos</PT>
</item>
</LIST>
<COUNT xsi:type="xsd:int">229</COUNT>
</ListResponse>
</soap:Body>
</soap:Envelope>

Si alguien puede ayudarme porfavor
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Error con ur-type

Publicado por Fer (1 intervención) el 21/12/2009 18:17:58
Si te ayuda lo que siguio a SOAP APACHE es AXIS...yo lo hizo de este modo ante ese error

call.setReturnClass(String.class);
call.addParameter("version",new QName("urn:", "GetBalance") , ParameterMode.IN);
call.addParameter("terminalId",new QName("urn:", "GetBalance") , ParameterMode.IN);
call.addParameter("merchantId",new QName("urn:", "GetBalance") , ParameterMode.IN);

String r = (String)call.invoke( new Object[]{version,p2,p3} );

r contiene el XML de respuesta
saludous
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar