users@jax-rpc.java.net

[Re: Re: wscompile -import does not generate custom classes]

From: Doug Kohlert <doug.kohlert_at_sun.com>
Date: Mon, 04 Nov 2002 16:34:42 -0800

Vishal, again I believe this works. The only custom classes that will
be generated are those that are directly referenced by the messages
defined in the WSDL file. Extensions of those types will not be
generated unless you specify the -f:searchschema option. Again, if you
don't think it works, please send me one such WSDL file and let me try
it so that 1) either I will discover that you are correct, or 2) that I
might better explain to you what is generated and why. However, please
send a simple WSDL that exhibits this problem if possible.

Thanks

Vishal Goenka wrote:
Doug,

Looking at the source code from the community source version 1.0, it seems
that this indeed is the case.

I have tried various WSDL files, including some publicly available ones
from xmethods.com, and have obtained the same results.

Here's the fragment of the code that indicates that the import only
generates interface and interface template, not custom classes.

From: com/sun/xml/rpc/tools/wscompile/CompileTool.java
         if (mode == MODE_GEN_CLIENT || mode == MODE_GEN_BOTH) {
             genStub = true;
             genService = true;
             genServiceInterface = true;
             genInterface = true;
             getCustomClasses = true;
             genSerializer = true;
         }

         if (mode == MODE_GEN_SERVER || mode == MODE_GEN_BOTH) {
             genTie = true;
             genInterface = true;
             getCustomClasses = true;
             genSerializer = true;
             genWsdl = true;
         }

         if (mode == MODE_IMPORT) {
             if (!(configuration.getModelInfo() instanceof WSDLModelInfo)) {
 
environment.error(getMessage("wscompile.importRequiresWsdlConfig"));
             }
             genInterface = true;
             genInterfaceTemplate = true;
         }

To be sure, I re-compiled by adding:
             getCustomClasses = true;
in the MODE_IMPORT block, and that does the trick!

--Vishal



Vishal, can you attach the WSDL file you are using. This should work.

Thanks

Vishal Goenka wrote:

I'm unclear on the intent of the -import option in wscompile. It suggests
that the service interface as well as value types should be generated.
However, it does not generate Java classes corresponding to the XSD types
defined in the schema that might be used as arguments to the service
interface. This essentially makes the generated service interface non-
compilable.

Am I missing something or is this a "bug"?

Thanks for any help.

-Vishal


-- 
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806
-- 
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806
-------- Original Message --------
Subject: Re: wscompile -import does not generate custom classes
Date: Sat, 2 Nov 2002 00:29:29 -0700
From: Vishal Goenka <vgoenka_at_CAMPUSPIPELINE.COM>
To: JAXRPC-INTEREST_at_JAVA.SUN.COM, Doug Kohlert <doug.kohlert_at_sun.com>
CC: Vishal Goenka <vgoenka_at_CAMPUSPIPELINE.COM>
Doug,
Looking at the source code from the community source version 1.0, it seems
that this indeed is the case.
I have tried various WSDL files, including some publicly available ones
from xmethods.com, and have obtained the same results.
Here's the fragment of the code that indicates that the import only
generates interface and interface template, not custom classes.
From: com/sun/xml/rpc/tools/wscompile/CompileTool.java
         if (mode == MODE_GEN_CLIENT || mode == MODE_GEN_BOTH) {
             genStub = true;
             genService = true;
             genServiceInterface = true;
             genInterface = true;
             getCustomClasses = true;
             genSerializer = true;
         }
         if (mode == MODE_GEN_SERVER || mode == MODE_GEN_BOTH) {
             genTie = true;
             genInterface = true;
             getCustomClasses = true;
             genSerializer = true;
             genWsdl = true;
         }
         if (mode == MODE_IMPORT) {
             if (!(configuration.getModelInfo() instanceof WSDLModelInfo)) {
 
environment.error(getMessage("wscompile.importRequiresWsdlConfig"));
             }
             genInterface = true;
             genInterfaceTemplate = true;
         }
To be sure, I re-compiled by adding:
             getCustomClasses = true;
in the MODE_IMPORT block, and that does the trick!
--Vishal
 >Vishal, can you attach the WSDL file you are using.  This should work.
 >
 >Thanks
 >
 >Vishal Goenka wrote:
 >> I'm unclear on the intent of the -import option in wscompile. It 
suggests
 >> that the service interface as well as value types should be generated.
 >> However, it does not generate Java classes corresponding to the XSD 
types
 >> defined in the schema that might be used as arguments to the service
 >> interface. This essentially makes the generated service interface non-
 >> compilable.
 >>
 >> Am I missing something or is this a "bug"?
 >>
 >> Thanks for any help.
 >>
 >> -Vishal
 >
 >
 >--
 >Doug Kohlert
 >Java Software Division
 >Sun Microsystems, Inc.
 >phone: 503 345-9806
-- 
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806