my dog learned polymorphism*
The moose likes Struts and the fly likes Struts & Web Service 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 "Struts & Web Service" Watch "Struts & Web Service" New topic
Author

Struts & Web Service

Robert Handler
Greenhorn

Joined: Sep 11, 2002
Posts: 4
Hello,

I search a simple, easy to setup, example, which shows how to use struts in combination with a webservice.

The example should include following:
- A struts action should call a controller. e.g. DBController.
- A Web Service should also use methods of DBController. Not necessarly direct - if another servlet is between, it's ok. (client - servlet - DBController)

Up to now i' was not able to find a simple example. There are a lot of information about struts or webservice but not both together.

wkr
Robert
Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
I'm not sure if article in below link answers your question but it has good explanation for Web services with Struts applications

http://www-128.ibm.com/developerworks/webservices/library/ws-arcstruts/
Cesar Olavo
Greenhorn

Joined: Nov 19, 2004
Posts: 17
Originally posted by Dilip kumar:
I'm not sure if article in below link answers your question but it has good explanation for Web services with Struts applications

http://www-128.ibm.com/developerworks/webservices/library/ws-arcstruts/


This article suggests an architecture matching ws and struts. However I couldn't compile the example, because it needs an API (import com.tbf.xml.* from a company long gone. So, if somebody has been succesful in compiling this program, please let me know.

Cesar
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Why not look for a simple example that uses regular Servlets to hit a Web Service? It's the same thing.


A good workman is known by his tools.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
the first thing that came to my mind when i saw the thread title was...what the heck does WS has anything to do with struts? i am echoing that through marc's comment. where and how the data is being requested/retreived/served is independent of the controller and view (struts).


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts & Web Service
 
Similar Threads
Get the servlet context path in a web service method.
Calling WebService from a simple java class
Example WS with Struts
Developing Web services
can I use web service for common servlet web application ?