>>>>> "Sheri" == Sheri Gish <[EMAIL PROTECTED]> writes:

    Sheri> Hi, I really need some guidance here.  I'm creating a web
    Sheri> service from a legacy distributed interface.  My legacy
    Sheri> code already has a complex package structure and we have
    Sheri> automated build scripts based on that structure.  In the
    Sheri> Userguide, you explain how to use Java2WSDL to create a
    Sheri> wsdl file, then WSDL2Java to create the bindings.  Works
    Sheri> fine, *but*...

    Sheri> WSDL2Java helpfully generates type mapping classes from the
    Sheri> WSDL.  The problem is that it assigns each type class to
    Sheri> the package in which the original class is located so after
    Sheri> it runs there are *two* FooData.java classes in the same
    Sheri> package (the original class and the type class).  Clearly,
    Sheri> this won't work with my legacy code base!  What I need to
    Sheri> have happen is to have WSDL2Java place the type mapping
    Sheri> class in a custom package.  I can't figure out how to tell
    Sheri> it to do this or even how to hand edit the wsdl file
    Sheri> derived from the legacy interface via Java2WSDL.  Is this a
    Sheri> bug in WSDL2java?

I had this same problem, but instead of having two versions of the
data classes, WSDL2Java would overwrite my original classes.

In my case I don't want the client to use the generated classes, but
the original ones, including the original package names.

My solution was to run WSDL2Java with the --output switch and output 
the code into a temp directory. Then copy out the code I need. I've
automated all this with ant.

If you do want the client to use the generated classes, use 
        Java2WSDL --PkgtoNS and WSDL2Java --NStoPkg 
to move the data classes into other packages.

Hope this helps
- bob

-- 
SynXis Corporation      | [EMAIL PROTECTED]    | Obstacles are those frightful 
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | things you see when you take your
Denver, CO  80202       | Fax:(303)534-4257 | eyes off your goal.  -Henry Ford

Reply via email to