Hi Anil,
For creating the webservice client all you need is an xsd and the URLs of the
file.
You can configure your soa client either using jaxrs:client in spring bean or
you can also write a standalone client.
I've used the standalone client and attached the same for your reference.
It's just an interface with the methods containing the URL(relative) as the
@Path value.
The name of the method could be any but the URL and the signature must confirm
the xsd definition and the RESTful soa url.
@POST
@Path("/search/v1.0/hotelSearch.xml")
SearchResponse search(SearchRequest searchRequest);
The searchRequest and SearchResponse are the objects I generated using an xsd
only.
The class also contains a nested class CXFClient and the usage of the same will
be like:
//Code actually calling the webservice:
String webServiceUrl = "http://servername/contextname";
SampleWSClient.CXFClient cxfClient = new
SampleWSClient.CXFClient(webServiceUrl, "", "", 60000);
SearchResponse searchResponse = cxfClient.getService().search(searchRequest)
Regards,
Abhishek
-----Original Message-----
From: amathewcxf [mailto:[email protected]]
Sent: Wednesday, May 23, 2012 2:14 AM
To: [email protected]
Subject: How to use XSD file with cxf
Hi,
I am a new user for cxf. We are trying to develop a webservice client
based on a xsd file. I was able to create domain classes from xsd file using
Eclipse. Now i wanted to call the remote API using this webservice client. I
am not sure how the cxf will be able to make use of my domain classes which
i generated from the XSD. The remote API is a REST-based application and
hence my request will have a querystring with the necessary data and the
response will be in JSON format.
In fact i read lot of documents, but i couldn't get a real picture. So
any thoughts will be very useful for me.
Thanks
Anil Mathew
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-use-XSD-file-with-cxf-tp5708311.html
Sent from the cxf-user mailing list archive at Nabble.com.