Solved

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

Posted on 2011-03-07
3
751 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now