• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to pass data from servlet to web services

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic