This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes web service in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "web service in struts" Watch "web service in struts" New topic
Author

web service in struts

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
hi friends,

i have two implement a few webservice in a new java server.
i am planning to do it using struts framework.
Is there any special features available for webservice creation in struts ?

can anyone give me an example link?

thanks in advance...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

It depends on what your requirements are. Struts supports REST and JSON. You can return XML instead of HTML from your actions.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
thanks jos,

so can i use my action class to process the request and return an xml string?
is there a need to add any special package for webservice?

Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Jomy George wrote:so can i use my action class to process the request and return an xml string?


Struts is built on Servlets, which is built on CGI which is built on HTTP which can transport any file type.

Jomy George wrote:
is there a need to add any special package for webservice?


That depends on what you mean by "webservice".
I've already pointed you to the REST and JSON plugins. What other technologies are you looking at?
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
jos i have no idea about where to start.
i just need to create some webservice in my server which communicate via xml

i am planning to handle this via soap request and response...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web service in struts