users@jax-ws.java.net

Re: _at_WebService and targetNamespace weirdness

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

Doug,Rama
Thanks for the clarification. Yup, I was hoping the docs were wrong, thanks
for confirming
it.

On 1/8/07, Doug Kohlert <Doug.Kohlert_at_sun.com> wrote:
>
> Rama is correct, sounds like the docs are wrong and need to be updated.
>
> Rama Pulavarthi wrote:
> > Yes, the behavior is correct.
> > If you have SEI, then the implementation class can only have
> > @WebService, @BindingType, @HandlerChain annotations.
> > If you want them in the same wsdl, either put them in the same package
> > and not specify the targetNamespace in @WebService or specify the same
> > ns at both the places.
> >
> > thanks,
> > Rama Pulavarthi
> >
> > Mohan K R wrote:
> >> 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
> >>
> >>
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>