Skip to Content
avatar image
Former Member

"service" is null @WebServiceRef

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 01, 2010 at 04:49 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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