cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Sharma <>
Subject RE: How to use XSD file with cxf
Date Fri, 01 Jun 2012 04:34:53 GMT
No you need to generate your java objects from xsd using some maven plugin. Then you can use
those objects in your cxf webservice client.

Maven plugin code pasted below for your reference:

<!--plugin to specify use java version 1.6 or above -->		
		<!-- Plugin to generate java objects from schema-->

					<generatePackage>com. hotels.domain</generatePackage>
					<!-- Plugin to remove redundant container classes for XMLElementWrapper-->


-----Original Message-----
From: amathewcxf [] 
Sent: Friday, June 01, 2012 12:30 AM
Subject: RE: How to use XSD file with cxf

Thanks you so much for your time and reply.

After reading your reply, i did lot of reading. The one question which i
have from your reply is, are you saying that I can refer the xsd in the
@Path like below?

public interface GetAvailability{

     public Availability getAvailability(); 


public class GetAvailabilityImpl implements GetAvailability{

     public Availability getAvailability(){


Then I will have a standalone client code like below (which will be invoked
by a EJB method):

public class GetAvailabilityWSClient{ 

     public void processWSClient(){
         GetAvailability getAvail =
JAXRSClientFactory.create("", GetAvailability.class);
         Availability availability = getAvail.getAvailability();

Then the getAvail.getAvailability() in the GetAvailabilityWSClient will
return the Availability object based on the xsd?

Thanks Again
Anil Mathew

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message