Tuesday, 27 May 2014

Invoke a Web Service From A Java Class Using Jdev Web Service Proxy

We described how to create a Web service from java code, deploy and test the same in the previous post.

Using the same WSDL file now we are going to invoke the web service in Java program. In Jdevloper there is an option called 'Web Service Proxy' which we can use to invoke the web service. Follow the below steps to do the same.


  • Create a generic project with web services option.


  • After creating the project right click on it and choose new. On this choose Business Tier -> Web service -> Web Service Proxy. .

































  • It will open a Wizard go next then give the web service WSDL url.














  • Give the package name for generating files.


















  • Go to next till finish the wizard.
  • It generates all the files. We need to put our custom code into the implemented client file as given below.













  • Now change the code as given below. 











  • Build and right click on the file and click on  run . It will give the output on the log window.


















Give your comments on this post. Happy Coding :)




No comments:

Post a Comment