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 of complex types with array as attribute

Marek Lapin
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
In my WS client i try to deserialize a result object (complex type) from a web service method call. it works fine if there are only basic types as attributes . if i put there array, i get exeption (SimpleDeserializer encountered a child element, which is NOT expected....)

the complex type looks like this

in the client, before calling i register type mapping, i tryed to do it with beandeserializer...
call.registerTypeMapping( ServerResult.class,
new QName(serverQName, "Result"),

but it wont work with the array inside...

then i made my onw deserializer for ServerResult (acording to one Axis supplied examples)

i register this one as deserializer instead of the beansdeserializer
i get the same exception - Simpledeserializer bla bla (see above)

when i add to the client these

call.addParameter("queryId", org.apache.axis.Constants.XSD_LONG, javax.xml.rpc.ParameterMode.IN);

then i get different exception
java.lang.NoSuchFieldException : types
it is thrown in dSer.registerValueTarget(new FieldTarget(value, localName));

the WSDL looks like this (just needed part of it)

so, i dont know whether it is the right think that i am doing (with the deserializer), because i could find ANY example for array deserialization (except for the standart arrayserializer)

so how it is done ?
i will be gratefull for any suggestions, on link to some exaples/tutorials

Vinod Awar
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for reopening a very old thread. Iam facing the same problem. Does anybody know how to solve this ?

Thanks and Regards,

[ July 11, 2007: Message edited by: vinod awar ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic