Hi all,
First, I am a newbie with CXF. I am writing a CXF client to interact with
the government. I am able to send a message. But when I receive the
response my client crashes.
Below is the stacktrace. I'm using CXF 2.7.6. I am using Java 1.6.45. If
you need more info, please let me know as I don't exactly know what info
you need to help me.
Please help me, I'm stuck.
org.apache.cxf.ws.policy.PolicyException: These policy alternatives can
not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702
}AsymmetricBinding
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout
{http://www.w3.org/2007/05/addressing/metadata}Anonymous
{http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization
}OptimizedMimeSerialization
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedElements
AnonymousResponses
at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(
AssertionInfoMap.java:179)
at
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(
PolicyVerificationInInterceptor.java:101)
at
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(
AbstractPolicyInterceptor.java:44)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.onMessage(
ClientImpl.java:800)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
HTTPConduit.java:1592)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(
HTTPConduit.java:1490)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
HTTPConduit.java:1309)
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(
CacheAndWriteOutputStream.java:50)
at org.apache.cxf.io.CachedOutputStream.close(
CachedOutputStream.java:223)
at org.apache.cxf.transport.AbstractConduit.close(
AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(
HTTPConduit.java:622)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530
)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
at org.apache.cxf.frontend.ClientProxy.invokeSync(
ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:133)
at com.sun.proxy.$Proxy34.aanleveren(Unknown Source)
at nl.pfm.wus.aanroep.WUSAanlever.leverAan(WUSAanlever.java:34)
at nl.pfm.wus.aanroep.WUSAanroep.main(WUSAanroep.java:9)
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: These
policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702
}AsymmetricBinding
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout
{http://www.w3.org/2007/05/addressing/metadata}Anonymous
{http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization
}OptimizedMimeSerialization
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedElements
AnonymousResponses
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:155)
at com.sun.proxy.$Proxy34.aanleveren(Unknown Source)
at nl.pfm.wus.aanroep.WUSAanlever.leverAan(WUSAanlever.java:34)
at nl.pfm.wus.aanroep.WUSAanroep.main(WUSAanroep.java:9)
Caused by: org.apache.cxf.ws.policy.PolicyException: These policy
alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702
}AsymmetricBinding
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout
{http://www.w3.org/2007/05/addressing/metadata}Anonymous
{http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization
}OptimizedMimeSerialization
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedElements
AnonymousResponses
at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(
AssertionInfoMap.java:179)
at
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(
PolicyVerificationInInterceptor.java:101)
at
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(
AbstractPolicyInterceptor.java:44)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.onMessage(
ClientImpl.java:800)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
HTTPConduit.java:1592)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(
HTTPConduit.java:1490)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
HTTPConduit.java:1309)
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(
CacheAndWriteOutputStream.java:50)
at org.apache.cxf.io.CachedOutputStream.close(
CachedOutputStream.java:223)
at org.apache.cxf.transport.AbstractConduit.close(
AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(
HTTPConduit.java:622)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530
)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
at org.apache.cxf.frontend.ClientProxy.invokeSync(
ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:133)
... 3 more