File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Invoke a Servlet from a WebService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Invoke a Servlet from a WebService" Watch "Invoke a Servlet from a WebService" New topic
Author

Invoke a Servlet from a WebService

Cleto Polonia
Greenhorn

Joined: Sep 25, 2012
Posts: 2
Hello everybody I have to manipulate a project...
I've a servlet that works fine and I want to invoke it from a web service..

1. Can I do this?

after that I want to generate the AAR file and I want to import in the axis2 folder.
so I create a wsdl and I can call the web service from it!

2. My logic it's ok?

Can you help me?
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
I've a servlet that works fine and I want to invoke it from a web service..

1. Can I do this?


Assuming "invoke" means to create a HTTP request to the servlet and receive a HTTP response, sure. See java.net.HttpURLConnection for example.

I'm not sure what you mean by the rest of the post. AAR file?

Bill
Cleto Polonia
Greenhorn

Joined: Sep 25, 2012
Posts: 2
Thank you for the faster replay!

AAR file is Apache Axis2 Archive

sorry I have a lot of question because of I'm a very newbie programmer..

- how can map the servlet into the web services??
- normally I used the web.xml into WEB-INF but in the AAR files there isn't.. I've to add it??
- And what url I have to call??

Thanks ;)

** SOLVED **

I solved my problem!!!

- I put the servlet on an apache tomcat server
- I call it (with htppclient) from the web service that runs on Axis2



 
Consider Paul's rocket mass heater.
 
subject: Invoke a Servlet from a WebService