File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 2906
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).


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-WS dependency injection
 
Similar Threads
iterate list issue...
JAX-WS Web Service Clients- Static Clients Problem
XSL to enhance WSDL presentation
How to generate WSDL file for any JAX-WS?
sample wsdl urls exposed