wood burning stoves 2.0*
The moose likes Web Services and the fly likes WSDL supporting XMLBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WSDL supporting XMLBeans" Watch "WSDL supporting XMLBeans" New topic
Author

WSDL supporting XMLBeans

keerthi matta
Greenhorn

Joined: May 31, 2002
Posts: 27
Hi friends,

I am trying to write a WSDL which supports XMLBeans Objects as input and send ouput.
Can any one provide me a sample which deals with this kind of requirement.

Thanks and Regards,
Keerthi
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
WSDL doesn't know anything about XMLBeans. It doesn't even know anything about objects. It knows about XML, XML Schema (which also makes it possible to reference SOAP), and of course WSDL.

Using WSDL you can identify a means of serialization/deserialization for your objects but that means that you have to create the serialization/deserialization components yourself and provide them in addition to the WSDL to you clients. If for example you are using Axis as your SOAP stack that means that your clients have to be running Java (because your serialization/deserialization components are written in Java) and they have to use the Axis SOAP stack (because your serialization/deserialization components are implemented against that infrastructure) to access your web service. These are the reasons why this style of web service is no longer recommended.

If you are simply looking for ways to get the XML out of the XMLBeans and into the SOAP message then that very much depends on the SOAP stack that you are using and has realtively little to do with the WSDL. If worse come to worse you can always handle the XML as strings in the interface for the tools sake and in your service implementation copy the XML representation in and out of those strings. The client exposed WSDL could then always be modified to describe the actual contents.
3.7.1 Exchanging XML Documents.


Java2WSDL & WSDL2Java tools
Axis or Axis2
[ November 08, 2006: Message edited by: Peer Reynders ]
keerthi matta
Greenhorn

Joined: May 31, 2002
Posts: 27
Hi Peer,

Thank you for the response.
To be more clear about the requirement:

Platform: Weblogic9.1
Type: WSDL first

we are going for wsdlc,jwsc,jws tasks to generate the war file.

When we run wsdlc task, Java files are generated from the types mentioned in WSDL file. These Java objects are plain JavaBeans with get and set methods. My requirement is that these JavaObjects should be XMLObjects, generated using XMLBeans.

This task can be done by using Weblogic Workshop.
Workshop provides us the flexibility to choose XMLBean task to generated Java objects.

Because of dependency I cant go for Workshop.
I am looking for a solution using ant script for doing this task.

Thanks and Regards,
Keerthi
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by keerthi matta:

This task can be done by using Weblogic Workshop.
Workshop provides us the flexibility to choose XMLBean task to generated Java objects.

Because of dependency I cant go for Workshop.
I am looking for a solution using ant script for doing this task.


I strongly suspect that that is a "value-added" feature of BEA's Weblogic Workshop (but somebody may prove me wrong yet). So your best bet is to dive into the documentation and try to find out if you can isolate this functionality and make it work in your environment.

That being said a quick Google brought up:
xmlbean Ant Task.
Maybe that will help you after all.
keerthi matta
Greenhorn

Joined: May 31, 2002
Posts: 27
I went through that article prior to posting my query, it does not help me. I registered a case with BEA and still waiting for response..just trying to check anyone else had similar situation.

Thanks and Regards,
Keerthi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WSDL supporting XMLBeans