aspose file tools*
The moose likes Web Services and the fly likes JAX-WS dependency injection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS dependency injection" Watch "JAX-WS dependency injection" New topic
Author

JAX-WS dependency injection

arief hidayat
Ranch Hand

Joined: Apr 13, 2007
Posts: 33
Hi,

I have generate JAX-WS client ...

Here are the part of the code


The generated code.. hard codes the String value.. such as WSDL location etc.

How could I change it so that we can configure it easily..??
maybe.. using Spring dependency injection or read from property file

thanks
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
The annotations only provide default values. They simply make deployment descriptors optional.

As far as I know you should still be able to override the values in the service-ref descriptor of the web.xml for servlet clients and the ejb-jar.xml for EJB clients.

However most modifications to the WSDL will require you to regenerate the client stub anyway. So the only thing about the referenced WSDL that really is configurable is the endpoint URL. And the WSDL referenced is often stored inside the WAR or EAR anyway (i.e. it's a copy of the original WSDL).
 
Consider Paul's rocket mass heater.
 
subject: JAX-WS dependency injection