You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Julio Arias <ju...@rbxglobal.com> on 2007/07/18 18:39:50 UTC
Endpoint config problems
Hi all -
Just to let you now about this problem I have. I got the following
spring endpoint config:
<jaxws:endpoint id="documentService" address="/DocumentService">
<jaxws:implementor>
<bean class="com.rbx.lor.ws.DocumentServiceImpl">
<property name="documentManager" ref="documentManager"/>
</bean>
</jaxws:implementor>
<jaxws:inInterceptors>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="passwordCallbackClass"
value="com.rbx.lor.ws.security.AuthenticationCallback"/>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>
</jaxws:endpoint>
I like this config but I get a spring xml context exception
2007-07-18 10:33:28,686 ERROR [org.apache.catalina.core.ContainerBase.
[Catalina].[localhost].[/lor]] - Exception sending context
initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException
: Configuration problem: <constructor-arg> element must not contain
more than one sub-element
I fix it by changing the implementor as an attribute of the endpoint
using # to point to by implementing bean and now it works fine, but
like my initial config is simpler and I have everything in one place,
is there another workaround for this??
The working config is this:
<bean id="documentServiceImpl"
class="com.rbx.lor.ws.DocumentServiceImpl">
<property name="documentManager" ref="documentManager"/>
</bean>
<jaxws:endpoint id="documentService" address="/DocumentService"
implementor="#documentServiceImpl">
<jaxws:inInterceptors>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="passwordCallbackClass"
value="com.rbx.lor.ws.security.AuthenticationCallback"/>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>
</jaxws:endpoint>
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------
Re: Endpoint config problems
Posted by Andrea Smyth <an...@iona.com>.
Hi Julio,
I believe this is due to a bug in the EndpointDefinitionParser for which
I have committed a fix with
http://svn.apache.org/viewvc?view=rev&rev=557992
<http://svn.apache.org/viewvc?view=rev&rev=557992>
Let me know if you still have problems using the first form of
configuration.
Regards,
Andrea.
.. Julio Arias wrote:
> Hi all -
>
> Just to let you now about this problem I have. I got the following
> spring endpoint config:
>
> <jaxws:endpoint id="documentService" address="/DocumentService">
> <jaxws:implementor>
> <bean class="com.rbx.lor.ws.DocumentServiceImpl">
> <property name="documentManager" ref="documentManager"/>
> </bean>
> </jaxws:implementor>
> <jaxws:inInterceptors>
> <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken"/>
> <entry key="passwordType" value="PasswordText"/>
> <entry key="passwordCallbackClass"
> value="com.rbx.lor.ws.security.AuthenticationCallback"/>
> </map>
> </constructor-arg>
> </bean>
> </jaxws:inInterceptors>
> </jaxws:endpoint>
>
>
> I like this config but I get a spring xml context exception
>
> 2007-07-18 10:33:28,686 ERROR [org.apache.catalina.core.ContainerBase.
> [Catalina].[localhost].[/lor]] - Exception sending context
> initialized event to listener instance of class
> org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException
> : Configuration problem: <constructor-arg> element must not contain
> more than one sub-element
>
> I fix it by changing the implementor as an attribute of the endpoint
> using # to point to by implementing bean and now it works fine, but
> like my initial config is simpler and I have everything in one place,
> is there another workaround for this??
>
> The working config is this:
>
> <bean id="documentServiceImpl"
> class="com.rbx.lor.ws.DocumentServiceImpl">
> <property name="documentManager" ref="documentManager"/>
> </bean>
>
> <jaxws:endpoint id="documentService" address="/DocumentService"
> implementor="#documentServiceImpl">
> <jaxws:inInterceptors>
> <bean
> class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
> <bean
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> <constructor-arg>
> <map>
> <entry key="action" value="UsernameToken"/>
> <entry key="passwordType" value="PasswordText"/>
> <entry key="passwordCallbackClass"
> value="com.rbx.lor.ws.security.AuthenticationCallback"/>
> </map>
> </constructor-arg>
> </bean>
> </jaxws:inInterceptors>
> </jaxws:endpoint>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland