Matthew,
 
We have discovered that java2WSDL ant task has problem with nested complex types. It does not create proper WSDL.If the generated WSDL still doesn't have proper definition for your nested complex type, then you can create a dummy operation in your service interface as follow:
 
MyNestedComplexType noOp(MyNestedComplexType data). This will force it to pick all the nested types.
 
Also during the binding step you must use the -e option to pick up all the complext type java files.
 
WSDL2java ant task also have problem generating proper client java classes when faced with nested complex type. It skips to genereate encoder, ser and deser for the next types. There you must edit the file and add the code manually. In case if you are wondering what I mean by the nested complex type, here is an example:
 
Class Request{
   private Parameter p; // Parameter is a complex type that is nested within the Request class.
}
 
These ant tasks have suttle bugs. They work well with interfaces that deal with simple or primitive types. The advantage of using them is to get a deploy.wsdd and Client code. However IMHO writing a wsdd and client code is simple enough that is not worth using these ant tasks.
 
Hope this helps.

Matthew Sgarlata <[EMAIL PROTECTED]> wrote:
Hello,

I apologize for the repost, but my original post never received a response.
Here's my question:

I am having some trouble using the Java2WSDL emitter with Axis 1.2 alpha,
and I am hoping someone could offer me some help. I am new to web services,
and to Apache Axis as well.

I deployed my web service using the AdminClient, and looked at its WSDL
using ?WSDL. I can see that the BeanSerializer I defined in my deploy.wsdd
file is being picked up by ?WSDL, because I see the proper
definition in the WSDL in my web browser. However, when I try to run the
Java2WSDL task, I don't get a complex type (I just get my object specified
in the WSDL as an xsd:anyType). How come ?WSDL picks up my complex type and
Java2WSDL does not? Here is the command I am using to run Java2WSDL:

java org.apache.axis.wsdl.Java2WSDL
-o document.wsdl
-lhttp://localhost/jrocservice/services/DocumentService
com.bah.jroc.document.IDocumentService

I also tried this, but I run into the same problem

java org.apache.axis.wsdl.Java2WSDL
-o document.wsdl
-lhttp://localhost/jrocservice/services/DocumentService
-nsomeNamespace
-pcom.bah.jroc.document=someNamespace
com.bah.jroc.document.IDocumentService

Thanks!

Matt




Matthew Sgarlata
Senior Consultant
Booz Allen Hamilton Inc.
Work: 703-377-0871


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Reply via email to