<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBossWS 4.0.2 and AS 7.1.1 WS-Security Sign and Encrypt Test Problem
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/ju-sepul">Juan Sepulveda</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/762798#762798">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Im am testing JBossWS 4.0.2 over JBoss 7.1.1, i'm trying to run the Signing and Encritpting example but won't work JCE 6 installed, java.security edited for add Bouncy-Castle Provider and Bouncy-Castle provider added to WS client, im stucked still with exeption:</p><pre class="jive-pre"><code class="jive-code jive-java">javax.xml.ws.soap.SOAPFaultException: These policy alternatives can not be satisfied: 
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not SIGNED</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not ENCRYPTED</font>
&#160;&#160;&#160; at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
&#160;&#160;&#160; at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
&#160;&#160;&#160; at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
&#160;&#160;&#160; at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
&#160;&#160;&#160; at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
&#160;&#160;&#160; at $Proxy27.sayHello(Unknown Source)
&#160;&#160;&#160; at jboss.wsse.client.Client.sayHello(Client.java:43)
&#160;&#160;&#160; at jboss.wsse.client.Client.main(Client.java:28)
</code></pre><p>and in server</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">[org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Interceptor <font color="navy"><b>for</b></font> <font color="navy">{</font>http:<font color="darkgreen">//www.jboss.org/jbossws/ws-extensions/wssecuritypolicy}SecurityService#{http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy}sayHello has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: These policy alternatives can not be satisfied: </font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not SIGNED</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not ENCRYPTED</font>
&#160;&#160;&#160; at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:47)
&#160;&#160;&#160; at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
&#160;&#160;&#160; at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
&#160;&#160;&#160; at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
&#160;&#160;&#160; at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
&#160;&#160;&#160; at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
&#160;&#160;&#160; at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
&#160;&#160;&#160; at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi.jar:2.0.3.GA]
&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
Caused by: org.apache.cxf.ws.policy.PolicyException: These policy alternatives can not be satisfied: 
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not SIGNED</font>
<font color="navy">{</font>http:<font color="darkgreen">//docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not ENCRYPTED</font>
&#160;&#160;&#160; at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:162)
&#160;&#160;&#160; at org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:99)
&#160;&#160;&#160; at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:45)
&#160;&#160;&#160; ... 25 more
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>is like still bare request is being sent, than you in advance</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/762798#762798">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>