cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rui António da Cruz Pereira <ra-pere...@criticalsoftware.com>
Subject Re: Problem with WS-Security
Date Fri, 03 Oct 2008 16:44:58 GMT
I am using jdk1.6 and this version comes with SAAJ included. If I don't 
add jboss-saaj.jar to the endorsed folder in jboss lib folder it will 
use the jdk version, witch is the latest.
I happens, if I don't include the jboss SAAJ implementation in the 
endorsed folder, a different Exception is thrown:
        java.lang.UnsupportedOperationException: setProperty must be 
overridden by all subclasses of SOAPMessage
        at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)

Daniel Kulp wrote:
> The JBoss version of saaj is too old.   They may have instructions 
> someplace on how to use a newer version of SAAJ or how to use the Sun 
> version we ship to override their version or something.  
>
> Dan
>
>
> On Friday 03 October 2008, Rui António da Cruz Pereira wrote:
>   
>> Hello,
>> I'm having a problem with ws-security with CXF+Spring+JBoss4.2.1.
>> The Service works fine without security, it deploys if I add security,
>> but when I call the service it gives me a NotImplementedException from
>> jbossws.
>>
>> Here is the server configuration:
>>
>> <jaxws:endpoint id="example"
>>         implementor="#exampleWS"
>>         endpointName="ExampleWSEndpoint"
>>         serviceName="Example"
>>         address="/example">
>>         <jaxws:inInterceptors>
>>                <ref bean="wss4jInConfiguration"/>
>>         </jaxws:inInterceptors>
>>     </jaxws:endpoint>
>>
>>     <bean id="wss4jInConfiguration"
>> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>>         <property name="properties">
>>             <map>
>>                 <entry key="action" value="UsernameToken"/>
>>                 <entry key="passwordType" value="PasswordDigest" />
>>                 <entry>
>>                     <key>
>>                         <value>passwordCallbackRef</value>
>>                     </key>
>>                     <ref bean="serverPasswordCallback"/>
>>                 </entry>
>>             </map>
>>         </property>
>>     </bean>
>>
>>     <bean id="serverPasswordCallback"
>> class="com.mycompany.myapp.security.GoCramerPasswordCallback"/>
>>
>>
>>
>>
>>
>> Here is the client configuration:
>>
>>     <bean id="exampleWSFactory"
>> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>         <property name="serviceClass"
>> value="com.mycompany.myapp.business.webservice.ExampleWS" />
>>         <property name="address"
>>
>> value="http://localhost:8080/framework-ws-security/services/example"/>
>>         <property name="outInterceptors">
>>             <list>
>> <!--                <bean
>> class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />-->
>>                 <ref bean="wss4jOutConfiguration" />
>>             </list>
>>         </property>
>>     </bean>
>>
>>     <bean id="wss4jOutConfiguration"
>> class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
>>         <property name="properties">
>>             <map>
>>                 <entry key="action" value="UsernameToken"/>
>>                 <entry key="user" value="ws-client" />
>>                 <entry key="passwordType" value="PasswordDigest" />
>>                 <entry>
>>                     <key>
>>                         <value>passwordCallbackRef</value>
>>                     </key>
>>                     <ref bean="clientPasswordCallback"/>
>>                 </entry>
>>             </map>
>>         </property>
>>     </bean>
>>
>>     <bean id="clientPasswordCallback"
>> class="com.mycompany.myapp.security.ClientPasswordCallback"/>
>>
>>     <!-- Web service dynamic proxy -->
>>     <bean id="exampleWSProxy"
>>           class="com.mycompany.myapp.business.webservice.ExampleWS"
>>           factory-bean="exampleWSFactory"
>>           factory-method="create"/>
>>
>>
>>
>>
>>
>> And here the exception:
>>
>> 17:06:00,350 ERROR [STDERR] 3/Out/2008 17:06:00
>> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> org.jboss.util.NotImplementedException
>>         at
>> org.jboss.ws.core.soap.SOAPPartImpl.appendChild(SOAPPartImpl.java:298)
>>         at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWrite
>> r.java:81) at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMSt
>> reamWriter.java:98) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEn
>> velopeStart(SoapOutInterceptor.java:95) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:76) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:57) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:220) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>         at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178
>> ) at $Proxy98.executeTest(Unknown Source)
>>         at
>> com.mycompany.myapp.business.ExampleServiceImpl.getExamples(ExampleSer
>> viceImpl.java:51) at
>> com.mycompany.myapp.presentation.action.TestActionBean.afterMethodCall
>> (TestActionBean.java:181) at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
>> ava:39) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
>> orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.invoke
>> (BeforeAfterMethodInterceptor.java:154) at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.interc
>> ept(BeforeAfterMethodInterceptor.java:129) at
>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionC
>> ontext.java:155) at
>> net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionCont
>> ext.java:74) at
>> net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler
>> (DispatcherHelper.java:440) at
>> net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandle
>> r(DispatcherServlet.java:285) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doPost(Dispatcher
>> Servlet.java:167) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherS
>> ervlet.java:67) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:290) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilte
>> r.java:246) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFil
>> ter.java:96) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> lve.java:230) at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> lve.java:175) at
>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Security
>> AssociationValve.java:179) at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve
>> .java:84) at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> va:128) at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> va:104) at
>> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedCo
>> nnectionValve.java:157) at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>> e.java:109) at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :241) at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>> 844) at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
>> s(Http11Protocol.java:580) at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447
>> ) at java.lang.Thread.run(Thread.java:619)
>> 17:06:00,444 WARN  [DefaultExceptionHandler] Unhandled exception
>> caught by the Stripes default exception handler.
>> javax.xml.ws.soap.SOAPFaultException
>>         at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199
>> ) at $Proxy98.executeTest(Unknown Source)
>>         at
>> com.mycompany.myapp.business.ExampleServiceImpl.getExamples(ExampleSer
>> viceImpl.java:51) at
>> com.mycompany.myapp.presentation.action.TestActionBean.afterMethodCall
>> (TestActionBean.java:181) at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
>> ava:39) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
>> orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.invoke
>> (BeforeAfterMethodInterceptor.java:154) at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.interc
>> ept(BeforeAfterMethodInterceptor.java:129) at
>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionC
>> ontext.java:155) at
>> net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionCont
>> ext.java:74) at
>> net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler
>> (DispatcherHelper.java:440) at
>> net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandle
>> r(DispatcherServlet.java:285) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doPost(Dispatcher
>> Servlet.java:167) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherS
>> ervlet.java:67) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:290) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilte
>> r.java:246) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFil
>> ter.java:96) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> lve.java:230) at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> lve.java:175) at
>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Security
>> AssociationValve.java:179) at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve
>> .java:84) at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> va:128) at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> va:104) at
>> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedCo
>> nnectionValve.java:157) at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>> e.java:109) at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :241) at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>> 844) at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
>> s(Http11Protocol.java:580) at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447
>> ) at java.lang.Thread.run(Thread.java:619)
>> Caused by: org.jboss.util.NotImplementedException
>>         at
>> org.jboss.ws.core.soap.SOAPPartImpl.appendChild(SOAPPartImpl.java:298)
>>         at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWrite
>> r.java:81) at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMSt
>> reamWriter.java:98) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEn
>> velopeStart(SoapOutInterceptor.java:95) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:76) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:57) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:220) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>         at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178
>> ) ... 38 more
>> 17:06:00,444 ERROR [[StripesDispatcher]] Servlet.service() for servlet
>> StripesDispatcher threw exception
>> org.jboss.util.NotImplementedException
>>         at
>> org.jboss.ws.core.soap.SOAPPartImpl.appendChild(SOAPPartImpl.java:298)
>>         at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWrite
>> r.java:81) at
>> org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMSt
>> reamWriter.java:98) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEn
>> velopeStart(SoapOutInterceptor.java:95) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:76) at
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa
>> ge(SoapOutInterceptor.java:57) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:220) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>         at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178
>> ) at $Proxy98.executeTest(Unknown Source)
>>         at
>> com.mycompany.myapp.business.ExampleServiceImpl.getExamples(ExampleSer
>> viceImpl.java:51) at
>> com.mycompany.myapp.presentation.action.TestActionBean.afterMethodCall
>> (TestActionBean.java:181) at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
>> ava:39) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
>> orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.invoke
>> (BeforeAfterMethodInterceptor.java:154) at
>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.interc
>> ept(BeforeAfterMethodInterceptor.java:129) at
>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionC
>> ontext.java:155) at
>> net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionCont
>> ext.java:74) at
>> net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler
>> (DispatcherHelper.java:440) at
>> net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandle
>> r(DispatcherServlet.java:285) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doPost(Dispatcher
>> Servlet.java:167) at
>> net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherS
>> ervlet.java:67) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:290) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilte
>> r.java:246) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFil
>> ter.java:96) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>> cationFilterChain.java:235) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>> lterChain.java:206) at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>> lve.java:230) at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>> lve.java:175) at
>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Security
>> AssociationValve.java:179) at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve
>> .java:84) at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>> va:128) at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>> va:104) at
>> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedCo
>> nnectionValve.java:157) at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>> e.java:109) at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :241) at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>> 844) at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
>> s(Http11Protocol.java:580) at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447
>> ) at java.lang.Thread.run(Thread.java:619)
>>     
>
>
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message