You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "H. William Connors II" <bc...@rochgrp.com> on 2003/05/09 02:10:07 UTC

java2wsdl/wsdl2java and (de)serialization

I sent this question before but didn't see it show up on the list or 
appear in the archives.  If it is a duplicate, I apologize.

I have a question about using java2wsdl and wsdl2java and integrating 
bean (de)serialization.  I have a java interfaced defined that I wish to 
deploy as a web service.  One of the methods on the interface passes a 
java bean as a parameter.  Currently I use java2wsdl to produce the wsdl 
file and then use wsdl2java to generate the binding stub/etc.  Because 
of the bean in the parameter I have to manually go into the generated 
stub and the deploy.wsdd and add the information for the serializer and 
deserializer.  To the stub I add lines as below:

           qName = new javax.xml.namespace.QName("urn:Application", 
"anyType");
           cachedSerQNames.add(qName);
           cachedSerClasses.add(com.rochgrp.ct.beans.ScenarioBean.class);
           cachedSerFactories.add(beansf);
           cachedDeserFactories.add(beandf);

and the corresponding lines to the deploy.wsdd.  I'm using the standard 
Bean (de)serializer.

Isn't there a better way other than having to go in and edit the 
generated code and deployment file ?

I'm relatively new to working with axis and soap in general so if this 
question is answered somewhere please point me to it.