aspose file tools*
The moose likes Web Services and the fly likes How to pass data from servlet to web services  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to pass data from servlet to web services  " Watch "How to pass data from servlet to web services  " New topic
Author

How to pass data from servlet to web services

iza izyani
Greenhorn

Joined: Jan 11, 2010
Posts: 2
I am currently doing a project-Web Services-JAX-WS in Java. And I’m using Servlet as the Web Service Client. In my web service, I need to insert a data to database-which the data should be pass from the user.

For the time being, I hard-coded all the input value. And it works successfully.


My problem is, when I want to have user input data to insert to my database.


I already create a JSP Page, to pass the data to my Servlet (I’m using request.getParameter). But, I don’t know or have no idea, how I’m going to pass the data from servlet to the web service, so when web service receive the information, it can insert the data to the database.


Do you have any idea where I can start to work on how to solve it?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42918
    
  68
Welcome to JavaRanch.

JAX-WS comes with a tool to create Java client classes for a given WSDL called "wsimport". You can integrate the classes generated by that tool with your servlet code.
iza izyani
Greenhorn

Joined: Jan 11, 2010
Posts: 2
Ulf Dittmer wrote:Welcome to JavaRanch.

JAX-WS comes with a tool to create Java client classes for a given WSDL called "wsimport". You can integrate the classes generated by that tool with your servlet code.


can you explain or guide more further.. this is the first time i'm doing the web services programming.. and i'm using netbean as the IDE....

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42918
    
  68
WS are a big subject that can't be explained in a forum like this. Choose a JAX-WS stack to use (either Apache Axis2 or Metro), both come with plenty of sample code and have much introductory material on their respective web sites.

I advise not to use an IDE when you start out using WS; they hide much of the detail that you need to understand if you want to become a proficient WS developer.
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
iza izyani wrote:can you explain or guide more further.. this is the first time i'm doing the web services programming.. and i'm using netbean as the IDE....


See if this Building JAX-WS Web Service helps you in anyway.


My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass data from servlet to web services