I am trying to call the .net webservice with security enabled
my security mapping looks like this:
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<bean id="wss4jOutConfiguration"
class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<property name="properties">
<map>
<entry key="action" value="UsernameToken
Signature" />
<entry key="user" value="fbest1" />
<entry key="encryptionKeyTransportAlgorithm"
value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p" />
<entry key="signatureParts"
value="{}{http://www.w3.org/2003/05/soap-envelope}Body;{}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}"
/>
<entry key="encryptionParts"
value="{}{http://www.w3.org/2003/05/soap-envelope}Body;{}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}"
/>
<entry key="signatureKeyIdentifier"
value="DirectReference" />
<entry key="encryptionKeyIdentifier"
value="SKIKeyIdentifier" />
<entry key="signaturePropFile"
value="crypto.properties" />
<entry>
<key>
<value>passwordCallbackRef</value>
</key>
<ref bean="passwordCallback" />
</entry>
</map>
</property>
</bean>
<bean id="passwordCallback"
class="com.firstbest.pso.amsf.webservice.interceptor.PasswordCallback" />
<bean id="saaJOutInterceptor"
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
<cxf:bus>
<cxf:inInterceptors>
<ref bean="logInbound" />
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="logOutbound" />
<ref bean="wss4jOutConfiguration" />
<ref bean="saaJOutInterceptor" />
</cxf:outInterceptors>
</cxf:bus>
<><><><><><><><><><>>>>>><><><><><>><><><><><><><><><><>
This is the exception occured: any help?
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: wrong part
definition:
{}{http://www.w3.org/2003/05/soap-envelope}Body;{}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}
at
org.apache.ws.security.handler.WSHandler.splitEncParts(WSHandler.java:758)
at
org.apache.ws.security.handler.WSHandler.decodeSignatureParameter(WSHandler.java:470)
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:125)
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4JOutInterceptor.java:166)
... 96 more
2008-09-11 16:44:57,012 ERROR [GraphElement] action threw exception: Cannot
create SAAJ factory instance.
javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance.
at
org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:151)
at $Proxy159.getNewSubmissionNumber(Unknown Source)
at
com.firstbest.pso.amsf.bpm.IcamsSubmissionNumberHandler.execute(IcamsSubmissionNumberHandler.java:63)
at
org.springmodules.workflow.jbpm31.JbpmHandlerProxy.execute(JbpmHandlerProxy.java:133)
at org.jbpm.graph.def.Action.execute(Action.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
at
org.jbpm.graph.def.Action_$$_javassist_201.execute(Action_$$_javassist_201.java)
at org.jbpm.graph.def.Action.execute(Action.java:116)
at
org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
at
org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
at
org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
at org.jbpm.graph.def.Node.enter(Node.java:301)
at org.jbpm.graph.def.Transition.take(Transition.java:119)
at org.jbpm.graph.def.Node.leave(Node.java:383)
at
org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
at org.jbpm.graph.node.Decision.execute(Decision.java:146)
at org.jbpm.graph.def.Node.enter(Node.java:316)
at org.jbpm.graph.def.Transition.take(Transition.java:119)
at org.jbpm.graph.def.Node.leave(Node.java:383)
at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
at
org.jbpm.graph.def.Node_$$_javassist_145.leave(Node_$$_javassist_145.java)
at org.jbpm.graph.exe.Token.signal(Token.java:178)
at org.jbpm.graph.exe.Token.signal(Token.java:141)
at
com.firstbest.bpm.BPMServiceImpl$2.doInJbpm(BPMServiceImpl.java:83)
at
org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:86)
at
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
at
org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
at
org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:79)
at com.firstbest.bpm.BPMServiceImpl.signal(BPMServiceImpl.java:78)
at
com.firstbest.bpm.BPMServiceImpl$$FastClassByCGLIB$$184bfc0c.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at
com.firstbest.bpm.BPMServiceImpl$$EnhancerByCGLIB$$5d241c4.signal(<generated>)
at
com.firstbest.underwriting.submission.AbstractSubmissionService$1.doInTransaction(AbstractSubmissionService.java:191)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at
com.firstbest.underwriting.submission.AbstractSubmissionService.signal(AbstractSubmissionService.java:177)
at
com.firstbest.underwriting.submission.AbstractSubmissionService.signal(AbstractSubmissionService.java:237)
at
com.firstbest.underwriting.submission.SubmissionServiceImpl.submit(SubmissionServiceImpl.java:611)
at
com.firstbest.underwriting.submission.SubmissionServiceImpl.submitById(SubmissionServiceImpl.java:645)
at
com.firstbest.underwriting.submission.SubmissionServiceImpl$$FastClassByCGLIB$$411ba6aa.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
at
com.firstbest.monitor.OperationMonitorAspect.monitor(OperationMonitorAspect.java:42)
at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160)
at
org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at
com.firstbest.underwriting.submission.SubmissionServiceImpl$$EnhancerByCGLIB$$d0ffbf35.submitById(<generated>)
--
View this message in context:
http://www.nabble.com/Exception-while-hitting-the-.net-webservice-with-CXF-client-%28Message-level---Security-enabled%29-tp19444415p19444415.html
Sent from the cxf-user mailing list archive at Nabble.com.