Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling webservices  RSS feed

 
Ram Gokul
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to call a vendors webservice from my servlet . I know the WDSL file.
Can someone point me how to do this step by step ?
I need to get a string token back from them.


Thanks
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found very convenient of usage wsimport utility. You can find tons examples on net.

Here is 7Bee target I use in my build scripts:

When client artifacts generated, just call them in your servlet code. Here is an example:


Important steps are:
1. create new instance of a called service
2. obtain port
3. fill parameters
4. call service using port
5. process result
6. catch an exception if any
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!