You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kaleb Walton <kd...@us.ibm.com> on 2007/08/21 21:27:54 UTC

Spring Scripted Bean as Implementor

I'd like to implement my interfaces using Groovy-scripted Spring Beans but
get errors when referring to the beans by id within the "implementor"
attribute of my endpoint (configured via Spring).

<lang:groovy id="helloService"
script-source="classpath:a/b/c/webservices/HelloServiceImpl.groovy"/>
<jaxws:endpoint id="hello" implementor="#helloService" address="/Hello" />
<-- does not work

HelloServiceImpl implements the HelloService interface.

Any ideas?

Regards,
Kaleb Walton

Re: Spring Scripted Bean as Implementor

Posted by Ray Krueger <ra...@gmail.com>.
You can do it with Groovy 1.1
http://groovy.codehaus.org/Annotations+with+Groovy


On 8/21/07, Daniel Kulp <dk...@apache.org> wrote:
>
> Kaleb,
>
> The jaxws stuff would require the service implementor to have the
> @WebService annotation.   A script obviously wouldn't have that.
>
>
> Couple things to try:
> 1)  You may be able to use the "simple" frontend that doesn't require the
> jaxws annotations.
> <simple:server id="hello" serviceBean="#helloService" address="/Hello"/>
>
> 2) You may be able to stick with the JAXWS frontend, but for the
> implementor class to be the interface with the annotations on it:
> <jaxws:endpoint implementorClass="a.b.c.HelloService" ..../>
>
> Dan
>
>
>
> On Tuesday 21 August 2007, Kaleb Walton wrote:
> > I'd like to implement my interfaces using Groovy-scripted Spring Beans
> > but get errors when referring to the beans by id within the
> > "implementor" attribute of my endpoint (configured via Spring).
> >
> > <lang:groovy id="helloService"
> > script-source="classpath:a/b/c/webservices/HelloServiceImpl.groovy"/>
> > <jaxws:endpoint id="hello" implementor="#helloService"
> > address="/Hello" /> <-- does not work
> >
> > HelloServiceImpl implements the HelloService interface.
> >
> > Any ideas?
> >
> > Regards,
> > Kaleb Walton
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
>

Re: Spring Scripted Bean as Implementor

Posted by Daniel Kulp <dk...@apache.org>.
Kaleb,

The jaxws stuff would require the service implementor to have the 
@WebService annotation.   A script obviously wouldn't have that.


Couple things to try:
1)  You may be able to use the "simple" frontend that doesn't require the 
jaxws annotations.
<simple:server id="hello" serviceBean="#helloService" address="/Hello"/>

2) You may be able to stick with the JAXWS frontend, but for the 
implementor class to be the interface with the annotations on it:
<jaxws:endpoint implementorClass="a.b.c.HelloService" ..../>

Dan



On Tuesday 21 August 2007, Kaleb Walton wrote:
> I'd like to implement my interfaces using Groovy-scripted Spring Beans
> but get errors when referring to the beans by id within the
> "implementor" attribute of my endpoint (configured via Spring).
>
> <lang:groovy id="helloService"
> script-source="classpath:a/b/c/webservices/HelloServiceImpl.groovy"/>
> <jaxws:endpoint id="hello" implementor="#helloService"
> address="/Hello" /> <-- does not work
>
> HelloServiceImpl implements the HelloService interface.
>
> Any ideas?
>
> Regards,
> Kaleb Walton



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog