jQuery in Action, 3rd edition
The moose likes Web Services and the fly likes Spring-WS client domain classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring-WS client domain classes" Watch "Spring-WS client domain classes" New topic

Spring-WS client domain classes

Joyce Kind

Joined: Nov 27, 2008
Posts: 8

This is my first time to try spring-ws client.

After reading documentation and some examples online, I found I need to generate JAXB domain classes from XML schema first, so I can use JAXB objectFacotry to create request domain object and ask Spring framework to send over my request to a Web Services. But I only have one WSDL file from the Web Service and there is no seperate XSD file. I saw the XML schema actually is written inside the WSDL file as below:


For this built-in XSD, how do I generate JAXB domain classes?

Thanks very much!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
You have two choices, as far as I know:
1. Use wsimport to process the WSDL and generate all artifacts. Then discard the web service client stub classes and keep the JAXB classes.
2. Extract the XML type definitions and generate the JAXB classes with the JAXB schema compilation tool xjc.
Best wishes!

My free books and tutorials: http://www.slideshare.net/krizsan
Joyce Kind

Joined: Nov 27, 2008
Posts: 8
Thanks, I will try wsimport.

Happy New Year to you!
I agree. Here's the link: http://aspose.com/file-tools
subject: Spring-WS client domain classes
It's not a secret anymore!