OK, through trial and error I was able to answer my own question.

GlassFish Metro:  The JAX-WS handler chain configuration file can either
be placed in the same folder as the bytecode of the SEI implementation
that references it, or as a regular resource file in the classpath
(i.e., for a web app, WEB-INF/classes/handlers.xml.)  I suspect the
latter is preferable, as a Mavenized webapp allows you to place such
resource files within the src/main/resources directory, for Maven to
subsequently place in the classpath for you when you run "mvn war:war".

CXF: Unfortunately, the config file can only be placed within the same
directory as the bytecode for the SEI implementation class.  It cannot
read the file as a normal resource in WEB-INF/classes.  I think this is
a bug--I'll submit a JIRA for it.

Thanks,
Glen

Am Samstag, den 05.01.2008, 09:33 -0500 schrieb Glen Mazza:
> Hello,
> 
> The handlerChain annotation[1] on an SEI implementation class has a
> "file" member-value that indicates the location of the JAX-WS handler
> configuration file (here[2] for example) relative to the SEI
> implementation containing this annotation.
> 
> I'm not certain if this relative location refers to the config file's
> location at *compile* time with respect to the Java source file, or the
> config file's location at *run-time* (after the source file is compiled
> into bytecode).  
> 
> If at compile time, a "file='handler.xml'" value for the HandlerChain
> annotation would indicate that the file needs to be in the same
> directory as the java source file.  If at run time, a file="handler.xml"
> value would indicate that the file needs to be at the root of the
> classpath (for a deployed webapp containing the service, at the root of
> the WEB-INF/classes directory.)  Which is it?  The heart of this
> question is when the config file gets read--at compilation time or at
> run time.
> 
> Thanks,
> Glen
> 
> [1] https://jax-ws.dev.java.net/nonav/2.1.3/docs/annotations.html#2.6%
> 20javax.jws.HandlerChain%7Coutline
> 
> [2]
> http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jaxws_handlers/src/demo/handlers/common/demo_handlers.xml?revision=566980&view=markup
> 
> 

Reply via email to