Stuart,
I am new to Axis and trying to understand the steps you mentioned in which you used Java2WSDL and then again WSDL2Java. In a simple prototype, I am just using Java2WSDL to generate WSDL from EJB interfaces and then deploying the EAR file on JBoss. That seems to be working fine. However, I have used only simple types for parameter (Strings mostly).
In my scenario, I have not seen any need for running WSDL2Java again so what's that I am missing?
Thanks a lot !
Ajay
| Stuart Barlow <[EMAIL PROTECTED]>
08/28/2003 01:58 PM
|
|
You are right that its a bit fiddly. But with ANT you can automate
the whole process.
My process...
1. Take original API classes and build.
2. Run Java2WSDL to generate WSDL.
3. Run WSDL2Java to generate new API .java files and bindings.
4. Chuck away original API classes and copy new .java files into main
source tree.
5. Compile all the classes.
6. Take the generated deploy.wsdd and copy into server-config.wsdd
so that when tomcat deploys war file the service is included.
7. Change the service 'className' to my real implementation that is
part of my original code.
Most important part - Get ANT to do the whole thing!
If eclipse can't cope then chuck it and use jEdit. :-)
Keep implementation completely separate from API.
Mayne, Peter wrote:
> I'm just starting out with Axis, so I haven't learned the tricks of the
> trade yet.
>
> I have a class p.C, which contains at least one method that returns an
> object of class p.R and throws an exception p.E.
>
> I use axis-java2wsdl (from Ant within Eclipse) to generate a .WSDL file from
> p.C, and then axis-wsdl2java to generate the .java files in the package
> p.axis.
>
> However, my p/R.java and p/E.java files are overwritten by wsdl2java, which
> isn't nice.
>
> If I now add my functionality to the generated p/R.java and p/E.java, and
> then later on modify my p.C class and regenerate the WSDL and Axis .java
> files, my p/R.java and p/E.java files will get overwritten again by the
> plain wsdl2java generated classes.
>
> On the other hand, if I add another method to p.C that returns an object of
> class p.R2, I need to implement p.R2 to write my method, but I want
> wsdl2java to generate p/R2.java so I can manually merge my p.R2 with the
> Axis-generated p.R2, without overwriting my existing p/R.java and p/E.java.
>
> I can do what the axis-wsdl2java doc suggests, and generate the .java files
> somewhere else and use a <copy> task to copy the ones I want, but I still
> have to manually change
>
> Whatever happens, it seems there's no way around a fair amount of manual
> work every time something changes.
>
> Am I missing something here? What's the best way to do code management,
> particularly in an Eclipse environment?
>
> Thanks.
>
> PJDM
