Hi and thanx so far!

You probably wanted to see the next piece of the wsdl:

        <wsp:Policy wsu:Id="X509EndpointPolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:AsymmetricBinding>
                                        <wsp:Policy>
                                                <sp:InitiatorToken>
                                                        <wsp:Policy>
 <sp:X509Token sp:IncludeToken="
http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient
">
 <wsp:Policy>
 <sp:WssX509V3Token10/>
 </wsp:Policy>
 </sp:X509Token>
                                                        </wsp:Policy>
                                                </sp:InitiatorToken>
                                                <sp:RecipientToken>
                                                        <wsp:Policy>
 <sp:X509Token sp:IncludeToken="
http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToInitiator
">
 <wsp:Policy>
 <sp:WssX509V3Token10/>
 </wsp:Policy>
 </sp:X509Token>
                                                        </wsp:Policy>
                                                </sp:RecipientToken>
                                                <sp:AlgorithmSuite>
                                                        <wsp:Policy>
 <sp:Basic128Rsa15/>
 <sp:Basic256Rsa15/>
 <sp:TripleDesRsa15/>
                                                        </wsp:Policy>
                                                </sp:AlgorithmSuite>
                                                <sp:IncludeTimestamp/>
                                                <sp:EncryptBeforeSigning/>
 <sp:OnlySignEntireHeadersAndBody/>
                                        </wsp:Policy>
                                </sp:AsymmetricBinding>
                                <wsam:Addressing>
                                        <wsp:Policy>
                                                <wsp:ExactlyOne>
                                                        <wsp:All>
 <wsam:Anonymous>required</wsam:Anonymous>
                                                        </wsp:All>
                                                        <wsp:All>
 <AnonymousResponses/>
                                                        </wsp:All>
                                                </wsp:ExactlyOne>
                                        </wsp:Policy>
                                </wsam:Addressing>
                                <mtom:OptimizedMimeSerialization 
wsp:Optional="true"/>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
        <wsp:Policy wsu:Id="SecureMessagePolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:SignedParts>
                                        <sp:Body/>
                                        <sp:Header Name="To" Namespace="
http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="From" Namespace="
http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="FaultTo" 
Namespace="http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="ReplyTo" 
Namespace="http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="MessageID" 
Namespace="http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="RelatesTo" 
Namespace="http://www.w3.org/2005/08/addressing"/>
                                        <sp:Header Name="Action" 
Namespace="http://www.w3.org/2005/08/addressing"/>
                                </sp:SignedParts>
                                <sp:SignedElements>
 <sp:XPath>/*[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' 
and 
local-name()='Envelope']/*[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/'
 
and 
local-name()='Header']/*[namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
 
and 
local-name()='Security']/*[namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
 
and local-name()='Timestamp']</sp:XPath>
 <sp:XPath>/*[namespace-uri()='http://www.w3.org/2003/05/soap-envelope' 
and 
local-name()='Envelope']/*[namespace-uri()='http://www.w3.org/2003/05/soap-envelope'
 
and 
local-name()='Header']/*[namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
 
and 
local-name()='Security']/*[namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
 
and local-name()='Timestamp']</sp:XPath>
                                </sp:SignedElements>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
</wsdl:definitions>




From:
Colm O hEigeartaigh <cohei...@apache.org>
To:
"users@cxf.apache.org" <users@cxf.apache.org>
Date:
01-08-2013 10:09
Subject:
Re: org.apache.cxf.ws.policy.PolicyException: These policy alternatives 
can not be satisfied:



Hi,

It looks like the service is processing the CXF request correctly, but is
not returning a response that complies with the security policy, and the
client is throwing an exception. It's impossible to find out without 
seeing
the security policy though. It should be in the WSDL file referenced in 
the
log, if you could attach it:

file:WSDL/Aanleveren/Aanleverservice_Digipoort_WUS 2.0
Bedrijven_v1.2_preprod.wsdl"

Colm.



On Thu, Aug 1, 2013 at 8:53 AM, 
<r.keegs...@pantheon-automatisering.nl>wrote:

> Dear Colm,
>
> Sorry i didn't see your previous response. Because of my great e-mail
> client (Notus ;) ) I wasn't properly connected to the mailinglist,
> apologies for the inconvenience.
> I don't know how to get the security policy of the service.
> I added the message I send to the server. (I've removed the 
SecurityToken
> for security reasons).
> The message I received is the text I copied from the log. I also added 
the
> logging I get at the moment.
>
> Ralph
>
>
>
>
>  From: Colm O hEigeartaigh <cohei...@apache.org> To: 
"users@cxf.apache.org"
> <users@cxf.apache.org> Date: 01-08-2013 09:34 Subject: Re:
> org.apache.cxf.ws.policy.PolicyException: These policy alternatives can 
not
> be satisfied:
> ------------------------------
>
>
>
> Did you not see my previous response? We need to see the security policy 
of
> the service, the request message + the response message to be able to 
help
> you.
>
> Colm.
>
>
> On Thu, Aug 1, 2013 at 7:06 AM, <r.keegs...@pantheon-automatisering.nl
> >wrote:
>
> > Dear CXF Support,
> >
> > 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.
> >
> > Ralph Keegstra
> >
> > 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
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com


Reply via email to