• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

deserialization of complex types with array as attribute

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"),
BeanSerializerFactory.class,
BeanDeserializerFactory.class);

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.setReturnClass(ServerResult.class);
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

thanks
Marek
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,

Vinod
[ July 11, 2007: Message edited by: vinod awar ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic