Forums Register Login

Doubt with Web Service

+Pie Number of slices to send: Send
All i needed to do is accessing an API by sending XML request and get XML response.

To do this, do i need to create a Service class which forms the XML input to be passed and get the response.

Or simply with the Client code, can i do the same. Sorry if its such a lame question but i need to know a bit about that. So guys please help me

I am using Spring + CXF
+Pie Number of slices to send: Send
You can very well do it in client code. And your understanding about service class or generally we call them stub is correct. They are used mainly to automatically generate request xml based on the parameters you pass.
+Pie Number of slices to send: Send
So a stub/service to pass the XML request, and the client to get the XML response and parse it. Is that so? Am i right?

So to form a XML request & parse it, i need to use JAXB?
+Pie Number of slices to send: Send
stub will be do both i.e. generating xml request and parsing the response. stub itself may use JAXB to do that. And JAXB is one of the data mapping technology, there are other as well.
+Pie Number of slices to send: Send
^^ Thanks for the answer. From what i understand,

I can have stub/service to handle all my web service processing and connect to it using the controller in Spring and display the details in the view.

Whether i use RESTlet or CXF? Its a REST based Web Service.
+Pie Number of slices to send: Send
Hi!

Rajkumar balakrishnan wrote:Whether i use RESTlet or CXF? Its a REST based Web Service.


Personally, I would use CXF if I were deploying to a container, like Tomcat, and RESTlet if I were developing a stand-alone server.
However, RESTlet services can also be deployed to a container, so in the end it may be a question of personal preferences.
JBoss RESTEasy has a client API that is supposed to make it possible to develop clients of RESTful web services in a manner similar to developing RESTful web services with JAX-RS, that is by using annotations.
Best wishes!
+Pie Number of slices to send: Send
^^

Thanks friend. I personally suggest RESTlet as it was real easy and project deadline is too short. But hey, i didnt heard about RESTEasy and will sure give it a shot.
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1426 times.
Similar Threads
Jibx parsing
Difference betn request/reply and publish/subscribe
Basic SOAP fault question
WS-Security :How to send a SOAP message back to client on authentication error
How to get SOAP response as XML in Client Struts or Servlet. ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:11:11.