This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 8836
    
    7

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: 8836
    
    7

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...

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: web service in struts
 
Similar Threads
Webservices and Request/Response
how to acess webservice in java
New to WebServices
Struts & Web Service
Simple Web Service: What to call it?