File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring-WS client domain classes" Watch "Spring-WS client domain classes" New topic
Author

Spring-WS client domain classes

Joyce Kind
Greenhorn

Joined: Nov 27, 2008
Posts: 8
Hi,

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:

<wsdl:type>
<xs:schema>...</xs:schema>
<xs:schema>...</xs:schema>
<xs:schema>...</xs:schema>
<xs:schema>...</xs:schema>
</wsdl:type>

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
    
    1
Hi!
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
Greenhorn

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

Happy New Year to you!
 
wood burning stoves
 
subject: Spring-WS client domain classes
 
Similar Threads
wsgen does not generate correct schema bindings and wsdl file
Facade design pattern in web services
JAXWS can not add additional classes
Spring-WS Client
javax.xml.bind.annotation.XmlSchemaType missing