The JAXWS tooling (wsdl2java) does have a "plugin" thing that can provide 
default values for various return things and params.   If you run:

wsdl2java -all -defaultValues my.wsdl

you'll see some random stuff set into the code.    The -defaultValues takes a 
param of the name of the class to use to provide the values.   The default is 
the RandomValueProvider.  You could write your own that does something more 
complete.

The interface to implement is:
http://svn.apache.org/repos/asf/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DefaultValueProvider.java

The random value thing is at:
http://svn.apache.org/repos/asf/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/RandomValueProvider.java

Dan



On Monday 01 December 2008 9:26:58 am castlec wrote:
> I would like to generate a test version of a web service using its WSDL.
> What I would like to do is to assign reasonable defaults inside of the
> various data containers during the generation so that there is minimal data
> setup to do after the code is generated.  I'm thinking of something along
> the lines of getValue(xsdElementName) that is called for each field
> generated.  Is this possible? If so, how would I go about doing it?  Is
> there a better way to accomplish my goal?
>
> Thanks in advance,
>
> Chris



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to