Solved

Call Java JAX-WS Web Service from another Java JAX-WS Web Service

Posted on 2011-03-07
3
757 Views
Last Modified: 2012-05-11
I have written my Java JAX-WS Web Services in NetBeans but I can't figure out how to invoke another web service's operation from within one web service. How do I call another web service's operation from within a web service? Any useful resources on the internet I can look at?
0
Comment
Question by:shekhar_shashi
3 Comments
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 300 total points
ID: 35058809

It doesnt matter where you are calling the other webservice from, you always have to create a webservice client and call the methods on it.

Here is an example on creating clients:

http://download.oracle.com/javaee/5/tutorial/doc/bnayn.html

Of course, if this is located on the same server and is part of the same application, and does not have any special context, etc., you could also call the method as plain java method.
0
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 200 total points
ID: 35068393

create Instancts of your web services // as already u did

 wsgen.xClient client = new wsgen.xClient();

u can call

client.insert();
client.delete();
0
 
LVL 3

Author Closing Comment

by:shekhar_shashi
ID: 35144276
Thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question