cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a java webservice from another java webservice

Former Member
0 Kudos

Hi,

I am trying to call a java webservice from another java webservice.but it fails nad everytime i get the lookup exception.

Scenario:

Webservice 1: a

Webservice 2: b

//creating the initial Context

InitialContext context = new InitialContext();

//doing the jndi lookup for webservice "a"

Object ejbObj = context.lookup( "localejbs/a" );

//casting it to the required object

Object obj = ( ( aHome ) ejbObj ).create();

Any help will be appreciated.Thanks in advance.This is bit urgent.

Accepted Solutions (0)

Answers (2)

Answers (2)

Vlado
Advisor
Advisor
0 Kudos

Hi,

Follow the discussion in thread.

Best regards,

Vladimir

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Shouldn't it be context.lookup("java:comp/env/services/a"); ?