cancel
Showing results for 
Search instead for 
Did you mean: 

"service" is null @WebServiceRef

Former Member
0 Kudos

Hi,

I am writing a simple service interface (consumer) proxy client (EJB) using NWDS 7.1

I am getting null service instance using the code:

	@WebServiceRef (name="SalesOrderCreateOutService")
	private SalesOrderCreateOutService service;

The consumer proxy is deployed successfully.

Can anybody let me know the correct syntax of the above code...

Thanks

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

former_member190457
Contributor
0 Kudos

Hi Srinivas,

if the proxy is in the same DC as your EJB you needn't specify the name in WebServiceRef annotaion.

Otherwise you might try using the Proxy JNDI Object Name as can be found in NWA -> JNDI browser for the name property.

If this should not work either, you can use the following code:


InitialContext ctx = new InitialContext();
SalesOrderCreateOutService service = 
(SalesOrderCreateOutService)ctx.lookup("<string found in JNDI browser>");
//use your service

Thanks, regards

Vincenzo

nagishetty
Explorer
0 Kudos

Hi Vincenzo,

I face the same Issue,

Could you let me know what exactly has to be provided at <string found in JNDI browser> ?

Thanks,

Nagishetty

Answers (0)