views:

86

answers:

0

My web application is a consumer of some internal web services provided by the organisation. I have seen a couple of examples where a web service reference is injected using something like:

@WebServiceRef(name="services/MyService")
MyService myService; 

But I have no idea how to define the services/MyService JNDI object in Glassfish v3 such that it gets injected. I wish to define the webservice client class through the Glassfish administration and also specify the endpoint URL through the admin console. This way URLs are not hardcoded and easily managed.

Eventually I will also need to specify the username and password for HTTP authentication too in the same way apart from the URL. How do I go about it?