Skip to main content

Defining JNDI web reference URLs in Glassfish

2 replies [Last post]
Joined: 2008-04-09


I have a web application which in itself is a web service client of some other web services provided by the organisation. Is it possible to define these web services (their URLs etc.) in Glassfish admin, and access them through their JNDI name using the @WebServiceRef annotation?

I wish to avoid having URLs hardcoded and it would be convenient to have the webservice proxy instantiated and injected by the container.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-11-22

Did you find a solution for this?
I also want to inject @webserviceref, by I have no idea how.
It would be great if you could help.

Joined: 2008-04-09

Honestly in the end we had scrapped Glassfish altogether. Too complex, no advantages whatsoever.
We went for a Tomcat 7 + Spring 3 + Apache CXF approach in the end.

If you want to have a look, I had asked this question elsewhere here:

Not really an admin console based solution and its very limited.

Using Spring and Apache CXF its much more flexible.