Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deserialization Exception while using string[]

sudheshna Iyer
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using dynamic stubs to invoke web service that returns String[].

I am having the problem:

javax.xml.rpc.JAXRPCException: failed to invoke operation 'getXXX' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure for xml type ['java:language_builtins.lang']:ArrayOfString and java interface javax.xml.soap.SOAPElement]StackTrace[

Here is the code:
// Setup the global JAX-RPC service factory
System.setProperty( "javax.xml.rpc.ServiceFactory",

// create service factory
ServiceFactory factory = ServiceFactory.newInstance();

// define qnames
String targetNamespace = "http://localhost:7001/SaWS";

QName serviceName =
new QName(targetNamespace,

QName portName =
new QName(targetNamespace,

QName operationName = new QName(targetNamespace,

URL wsdlLocation =
new URL("http://localhost:7001/SaWS/SaWSURI?wsdl");

// create service
Service service = factory.createService(wsdlLocation, serviceName);

Call call = service.createCall(portName, operationName);

TypeMappingRegistry registry = service.getTypeMappingRegistry();

TypeMapping typemapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);

new QName("", "ArrayOfString"),
new language_builtins.lang.ArrayOfStringCodec(),
new language_builtins.lang.ArrayOfStringCodec()

String cust_number = "40230505";
Object[] res = (Object[]) call.invoke(new Object[]{cust_number} );
System.out.println( "res.length : " + res.length );
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic