users@jax-ws.java.net

_at_WebService and targetNamespace weirdness

From: Mohan K R <kmoh.raj_at_gmail.com>
Date: Mon, 8 Jan 2007 15:25:33 -0500

Greetings,
I am using the 2.1-SNAPSHOT (> 2.1-EA3) of JAX-WS. My WS is split into the
interface and an implementation task.
Now as per the docs for "endpointInterface" attribute for @WebService
annotation: (emphasis mine)

The qualified name of the service endpoint interface. This annotation allows
the separation of interface contract from implementation. If this property
is specified, **all other WebService properties are ignored as are all other
181 annotations**. Only the annotations on the service endpoint interface
will be taken into consideration. The endpoint implementation class is not
required to implement the endpointInterface.

So, I put all my JSR181 annotation on my Interface (including
targetNamespace). And only thing on my implementation class was the
@WebService annotation with the "endpointInterface" attribute. Now, when I
look at the generated WSDL,
it is split into 2 files (2 more for the types), with an import of the
second wsdl file with my annotated targetNamespace. But the
original WSDL contains a "generated" targetNamespace of the implementation
class package. Why is that?

Strangely, contradicting the doc's above, if I put in the same
"targetNamespace" attribute *again* in my implementation class
(same value as in the Interface class), the generated WSDL does not get
split and I get the behavior that I want.

So, now to my question, is this how I am supposed to do this? Or, is this a
bug in the docs or implementation?

Thanks
MK