Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between JAXB and WSDL

 
Anandha Loganathan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic