Well, if you are using WsGen and WsImport, you're obviously not using the CXF tooling and such. That said, not a big deal as it should be completely compatible.
From a JAX-WS standpoint, you CAN use maps, but you would need to write an XmlTypeAdapter thing to convert the map into a type that jaxb can use. Usually, that would be a list of key/value type objects. It's really not hard to do. CXF has a sample (jaxws_java_first) in the distribution that shows this exact thing. The main issue is that if you run java2ws on it (to get the wsdl) and then wsdl2java to generate client stubs and such, it would no longer use the map. It would litteraly be a List<KeyValue> type of thing. HOWEVER, the question is: do you need to do the java2ws/wsdl2java round trip? With JAX-WS/CXF, you should be able to use the same service interface (providing it's actually an interface) and types and such on both the client and the server and avoid the whole wsdl stuff.. Dan On Wed October 7 2009 2:02:31 pm ANTHONY ENNIS wrote: > Total newb here. > > Ok, so I run WsGen and WsImport and get my web service working. I have a > web service that has a more complex argument list. Instead of passing a > String or such, I am passing a class I defined. This class includes 2 > arrays of simple classes (near-pojos) and some scalars. (Why arrays? > Because I coudln't use Maps in the previous version of the code where we > were using axis2...) > > In any event, the service stub to be used by the client expects to be > passed the stub class generated by wsimport. But I don't want to use that > class, as a user. It's harder to build the data within. My version has > helper methods and other niceties in it. > > So: > 1. Is this just the way things are? > 2. Is it ok to use Maps and such in the classes I pass to my web service? > That is, is this fully supported by wsgen and wsimport? I don't want to > hand-edit my wsdl file. > > Thanks for any advice :-) > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
