You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/07/13 18:04:44 UTC

WSDL service-name

This annotation is on the implementation class (named
NameIndexServiceImpl)

@WebService(serviceName = "NameIndex", endpointInterface =
"com.basistech.rnm.index.ws.NameIndexService",
targetNamespace="urn:com.basistech.rnm.index.ws")

This annotation is on the interface (named NameIndexService)

@WebService(name="NameIndex",
targetNamespace="urn:com.basistech.rnm.index.ws")

The startup looks like this:

        serviceFactory.setAddress("http://localhost:" + port +
"/NameIndex");
        serviceFactory.setServiceBean(new
NameIndexServiceImpl(configPath));
        serviceFactory.setServiceClass(NameIndexService.class);

And the wsdl comes out like this: ...

<wsdl:definitions name="NameIndexServiceService"
targetNamespace="urn:com.basistech.rnm.index.ws">

How do I get rid of the extra 'service'?


RE: WSDL service-name

Posted by Benson Margulies <bi...@basistech.com>.
Yes.

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com]
> Sent: Saturday, July 14, 2007 12:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: WSDL service-name
> 
> I'm pretty sure that per the JAX-WS spec, the serviceName goes on the
impl
> class regardless. So I think you still need @WebService on the impl
and on
> the interface. Does that answer your question?
> 
> - Dan
> 
> On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> > Out of curiosity, if I wanted the primary source of annotations to
be
> > the interface, then the cure would be to put endpointInterface on
the
> > interface?
> >
> > > -----Original Message-----
> > > From: Dan Diephouse [mailto:dan@envoisolutions.com]
> > > Sent: Friday, July 13, 2007 5:46 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: WSDL service-name
> > >
> > > If you take away the serviceFactory.setServiceclass() line I think
> > it'll
> > > fix
> > > your problem. Effectively you're telling CXF not to look at the
> > > @WebService
> > > annotation on the NameIndexServiceImpl, which I don't think is
what
> > you
> > > want
> > > to do :-). CXF will automatically introspect the service bean and
find
> > the
> > > endpoint interface via the @WebService.endpointInterface
annotation,
> > so
> > > that
> > > line is completely not needed.
> > >
> > > Cheers,
> > > - Dan
> > >
> > > On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
> > > >
> > > > This annotation is on the implementation class (named
> > > > NameIndexServiceImpl)
> > > >
> > > > @WebService(serviceName = "NameIndex", endpointInterface =
> > > > "com.basistech.rnm.index.ws.NameIndexService",
> > > > targetNamespace="urn:com.basistech.rnm.index.ws")
> > > >
> > > > This annotation is on the interface (named NameIndexService)
> > > >
> > > > @WebService(name="NameIndex",
> > > > targetNamespace="urn:com.basistech.rnm.index.ws")
> > > >
> > > > The startup looks like this:
> > > >
> > > >         serviceFactory.setAddress("http://localhost:" + port +
> > > > "/NameIndex");
> > > >         serviceFactory.setServiceBean(new
> > > > NameIndexServiceImpl(configPath));
> > > >         serviceFactory.setServiceClass(NameIndexService.class);
> > > >
> > > > And the wsdl comes out like this: ...
> > > >
> > > > <wsdl:definitions name="NameIndexServiceService"
> > > > targetNamespace="urn:com.basistech.rnm.index.ws">
> > > >
> > > > How do I get rid of the extra 'service'?
> > > >
> > > >
> > >
> > >
> > > --
> > > Dan Diephouse
> > > Envoi Solutions
> > > http://envoisolutions.com | http://netzooid.com/blog
> >
> 
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog

Re: WSDL service-name

Posted by Dan Diephouse <da...@envoisolutions.com>.
I'm pretty sure that per the JAX-WS spec, the serviceName goes on the impl
class regardless. So I think you still need @WebService on the impl and on
the interface. Does that answer your question?

- Dan

On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
>
> Out of curiosity, if I wanted the primary source of annotations to be
> the interface, then the cure would be to put endpointInterface on the
> interface?
>
> > -----Original Message-----
> > From: Dan Diephouse [mailto:dan@envoisolutions.com]
> > Sent: Friday, July 13, 2007 5:46 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: WSDL service-name
> >
> > If you take away the serviceFactory.setServiceclass() line I think
> it'll
> > fix
> > your problem. Effectively you're telling CXF not to look at the
> > @WebService
> > annotation on the NameIndexServiceImpl, which I don't think is what
> you
> > want
> > to do :-). CXF will automatically introspect the service bean and find
> the
> > endpoint interface via the @WebService.endpointInterface annotation,
> so
> > that
> > line is completely not needed.
> >
> > Cheers,
> > - Dan
> >
> > On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
> > >
> > > This annotation is on the implementation class (named
> > > NameIndexServiceImpl)
> > >
> > > @WebService(serviceName = "NameIndex", endpointInterface =
> > > "com.basistech.rnm.index.ws.NameIndexService",
> > > targetNamespace="urn:com.basistech.rnm.index.ws")
> > >
> > > This annotation is on the interface (named NameIndexService)
> > >
> > > @WebService(name="NameIndex",
> > > targetNamespace="urn:com.basistech.rnm.index.ws")
> > >
> > > The startup looks like this:
> > >
> > >         serviceFactory.setAddress("http://localhost:" + port +
> > > "/NameIndex");
> > >         serviceFactory.setServiceBean(new
> > > NameIndexServiceImpl(configPath));
> > >         serviceFactory.setServiceClass(NameIndexService.class);
> > >
> > > And the wsdl comes out like this: ...
> > >
> > > <wsdl:definitions name="NameIndexServiceService"
> > > targetNamespace="urn:com.basistech.rnm.index.ws">
> > >
> > > How do I get rid of the extra 'service'?
> > >
> > >
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

RE: WSDL service-name

Posted by Benson Margulies <bi...@basistech.com>.
Out of curiosity, if I wanted the primary source of annotations to be
the interface, then the cure would be to put endpointInterface on the
interface?

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com]
> Sent: Friday, July 13, 2007 5:46 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: WSDL service-name
> 
> If you take away the serviceFactory.setServiceclass() line I think
it'll
> fix
> your problem. Effectively you're telling CXF not to look at the
> @WebService
> annotation on the NameIndexServiceImpl, which I don't think is what
you
> want
> to do :-). CXF will automatically introspect the service bean and find
the
> endpoint interface via the @WebService.endpointInterface annotation,
so
> that
> line is completely not needed.
> 
> Cheers,
> - Dan
> 
> On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> > This annotation is on the implementation class (named
> > NameIndexServiceImpl)
> >
> > @WebService(serviceName = "NameIndex", endpointInterface =
> > "com.basistech.rnm.index.ws.NameIndexService",
> > targetNamespace="urn:com.basistech.rnm.index.ws")
> >
> > This annotation is on the interface (named NameIndexService)
> >
> > @WebService(name="NameIndex",
> > targetNamespace="urn:com.basistech.rnm.index.ws")
> >
> > The startup looks like this:
> >
> >         serviceFactory.setAddress("http://localhost:" + port +
> > "/NameIndex");
> >         serviceFactory.setServiceBean(new
> > NameIndexServiceImpl(configPath));
> >         serviceFactory.setServiceClass(NameIndexService.class);
> >
> > And the wsdl comes out like this: ...
> >
> > <wsdl:definitions name="NameIndexServiceService"
> > targetNamespace="urn:com.basistech.rnm.index.ws">
> >
> > How do I get rid of the extra 'service'?
> >
> >
> 
> 
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog

Re: WSDL service-name

Posted by Dan Diephouse <da...@envoisolutions.com>.
If you take away the serviceFactory.setServiceclass() line I think it'll fix
your problem. Effectively you're telling CXF not to look at the @WebService
annotation on the NameIndexServiceImpl, which I don't think is what you want
to do :-). CXF will automatically introspect the service bean and find the
endpoint interface via the @WebService.endpointInterface annotation, so that
line is completely not needed.

Cheers,
- Dan

On 7/13/07, Benson Margulies <bi...@basistech.com> wrote:
>
> This annotation is on the implementation class (named
> NameIndexServiceImpl)
>
> @WebService(serviceName = "NameIndex", endpointInterface =
> "com.basistech.rnm.index.ws.NameIndexService",
> targetNamespace="urn:com.basistech.rnm.index.ws")
>
> This annotation is on the interface (named NameIndexService)
>
> @WebService(name="NameIndex",
> targetNamespace="urn:com.basistech.rnm.index.ws")
>
> The startup looks like this:
>
>         serviceFactory.setAddress("http://localhost:" + port +
> "/NameIndex");
>         serviceFactory.setServiceBean(new
> NameIndexServiceImpl(configPath));
>         serviceFactory.setServiceClass(NameIndexService.class);
>
> And the wsdl comes out like this: ...
>
> <wsdl:definitions name="NameIndexServiceService"
> targetNamespace="urn:com.basistech.rnm.index.ws">
>
> How do I get rid of the extra 'service'?
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog