aspose file tools*
The moose likes Web Services and the fly likes WS 2 WS call in same JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WS 2 WS call in same JVM" Watch "WS 2 WS call in same JVM" New topic
Author

WS 2 WS call in same JVM

Deep Gis
Greenhorn

Joined: Dec 13, 2010
Posts: 2
The WS I need to develop would call an existing WS [JDK 1.5 / WAS 6.1 cluster using Axis 2].
Both Web Services will be deployed on same JVMs. Is there a way to call the second service directly without having to do an unwanted N/w hop ?

The second service becoming remote to my service looks unlikely.
How can I make a direct call to the second service with least code write ups or adding more dependeincies in the project (wsif / ejb)

I read about Web Service client to Web Container optimized communication for WAS 6.1 cluster. But this did not get into my head completely.
WAS WS Client Web Container optimize communicator

Any thoughts with example pointers would be highly appreciated.

Deep
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Deep,
Both Web Services will be deployed on same JVMs. Is there a way to call the second service directly without having to do an unwanted N/w hop ?


Can't you invoke the second web service's interface object directly and call?


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Deep Gis
Greenhorn

Joined: Dec 13, 2010
Posts: 2
Naren - Can you elaborate a little more on what you said. Which class should I be calling - the Port class ?
As you can see am a "Green horn" to this forum and WS dev

Also, what are the implications if 1000's of requests need to be processed. Would the direct call as you said, be able to handle ?
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Deep,
As you can see am a "Green horn" to this forum and WS dev

"Greenhorn" doesn't necessarily mean you are new to technology, but new to Javaranch .
Which class should I be calling - the Port class ?

Well, if you know your second web service is going to be on the same JVM as the first, you can call methods on endpoint interface (endpoint implementing class object) directly.

what are the implications if 1000's of requests need to be processed. Would the direct call as you said, be able to handle ?

This would be similar to any Java application based on your design. Typically, those many number of threads are spawned by the JVM to serve incoming requests unless you have taken any special care on "synchronization".

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Using SCA (Service Component Architecture), you make the connection between component completely transparent to the application.
For components that are located in the same JVM, you can use the SCA binding, which allows for fast local connections.
If the components are located in different JVMs, then other kinds of bindings may be used, like the SOAP web service binding.
One implementation of SCA is Apache Tuscany. http://tuscany.apache.org
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WS 2 WS call in same JVM
 
Similar Threads
SSL Web Service Client in RAD7 as EJB
JBoss Clustering
404 Error - Client request call
Shared some object that everyone can use?
Web Service Performance