I wonder what sort of (pre-existing?) web service this is? Did you build it with CXF? If not, what with?
On Mon, Oct 18, 2010 at 4:56 PM, Daniel Kulp <[email protected]> wrote: > On Tuesday 12 October 2010 4:09:16 pm G wrote: >> Hi all, >> I am trying to create a client that connects to a Java webservice. I >> used the wsdl2java tool to create the client. The webservice requires a >> Hashmap as input and the WSDL2Java tool created a HashMap class that I am >> not sure how to use. If I construct the HashMap using the regular >> java.util.HashMap, the HashMap is empty when the service receives it. >> Could someone please give me some pointers on how to send HashMaps with >> clients? I do not see any serialization warnings and am a bit puzzled. >> Thanks a lot for the help. > > Well, there really isn't a concept of a Map in WSDL/Schema. It's kind of > mimiced with structures containing arrays. Thus, if you code generate based > on schema, you'll get that structure, not a real "HashMap". If you want to > use hashmaps, it's really only for Java first cases (and no wsdl involved) and > you also need to deal with TypeAdapters and such. The java-first-jaxws sample > that comes with CXF shows how to do that. > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog >
