my dog learned polymorphism*
The moose likes Web Services and the fly likes Difference between JAXB  and WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Difference between JAXB  and WSDL" Watch "Difference between JAXB  and WSDL" New topic
Author

Difference between JAXB and WSDL

Anandha Loganathan
Greenhorn

Joined: Jul 11, 2007
Posts: 13
Hi,

I am new to WS and can anyone explain what is the difference between WSDL and JAXB OR are they interconnected ?

For example ,
1) WSDL file will be accessed from web service provider afte opening a connection with them.
2) We need to send the data in the xml format to server in the same WSDL format .
3) Do we require JAXB to bind the data in xml format or not?.

I may be wrong in my understanding if yes someone please correct me.
[ July 11, 2007: Message edited by: Anandha Loganathan ]
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
Welcome to JavaRanch!

Originally posted by Anandha Loganathan:
1) WSDL file will be accessed from web service provider after opening a connection with them.


You will typically access the WSDL before you access the web service endpoint. The WSDL describes the web service and can be used to generate client stubs with code generation tools.

2) We need to send the data in the xml format to server in the same WSDL format.


The WSDL is one (the most common one for SOAP based web services) way to communicate what the valid SOAP requests and responses for the web service endpoint are. Theoretically you can get along without a WSDL - however then you must find an alternate method of documenting your web service and you can't use any of the code generation tools.

3) Do we require JAXB to bind the data in xml format or not?.


There is no such requirement - however from Sun's perspective JAXB 2.0 is the preferred binding method for document-based web services that are implemented on the Java EE 5 or Java SE 6 platform.

Java Architecture for XML Binding (JAXB) wasn't mandatory on the J2EE 1.4 platform, however Sun has published some material on the matter.

Have a look at the articles on the Web Services FAQ.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between JAXB and WSDL
 
Similar Threads
Consuming a .NET Typed DataSet from Java
JAX-B - Unmarshalling Vs. Read XML data (ObjectFactory)
JAXB, DOM, SAX
Enable auto JAXB bindings OR do JAXB manually
Setting up test data in Junit