[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-javascript-dev
Subject:    [Dev] Test Case fail due to Null Point Exception from Rampart
From:       Vanjikumaran Sivajothy <vanji () wso2 ! com>
Date:       2014-06-28 17:21:58
Message-ID: CAKBjgTE+x7wjq2rOPDUFvxa457DXAqwC-v5b+CQxdo=xpRiCEQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
we notice several test cases failing in due to null point exception thrown
by rampart fro ESB security policy scenario.

Reproduce method.
===============
1) Start SecureStockquateService
2) Start Deploy the given synapse config and the policy.
3) Send a message to ESB ant stockquote -Dtrpurl=http://localhost:8280/

Observation
Request is not send to backend and error thrown at ESB [1].

What could be the reason? Was there any change in rampart or Security
component?

While i am debuging the Rampart noticed in BindingBuilder class. *Result*
is null. therefore in for loop when size checked. It is throwing the null
point exception.


protected void addSignatureConfirmation(RampartMessageData rmd, Vector
sigParts) {

        if (!rmd.getPolicyData().isSignatureConfirmation()) {

            // If we don't require sig confirmation simply go back :-)
            return;
        }

        Document doc = rmd.getDocument();

       * Vector results = (Vector)
rmd.getMsgContext().getProperty(WSHandlerConstants.RECV_RESULTS);*
        /*
         * loop over all results gathered by all handlers in the chain. For
each handler result get
         * the various actions. After that loop we have all signature
results in the
         * signatureActions vector
         */
Vector signatureActions = new Vector();
for (int i = 0; i < *results.size()*; i++) {
WSHandlerResult wshResult = (WSHandlerResult) results.get(i);


[1]
ERROR {org.apache.synapse.core.axis2.Axis2Sender} -  Unexpected error
during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
java.lang.NullPointerException
    at org.apache.rampart.builder.BindingBuilder.addSignatureConfirmation(
BindingBuilder.java:807)
    at org.apache.rampart.builder.AsymmetricBindingBuilder.
doSignBeforeEncrypt(AsymmetricBindingBuilder.java:433)
    at org.apache.rampart.builder.AsymmetricBindingBuilder.build(
AsymmetricBindingBuilder.java:97)
    at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
    at org.apache.rampart.handler.RampartSender.invoke(
RampartSender.java:65)
    at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
    at org.apache.synapse.core.axis2.DynamicAxisOperation$
DynamicOperationClient.send(DynamicAxisOperation.java:185)
    at org.apache.synapse.core.axis2.DynamicAxisOperation$
DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
    at org.apache.axis2.client.OperationClient.execute(
OperationClient.java:149)
    at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(
Axis2FlexibleMEPClient.java:496)
    at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:59)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
Axis2SynapseEnvironment.java:338)
    at org.apache.synapse.endpoints.AbstractEndpoint.send(
AbstractEndpoint.java:333)
    at org.apache.synapse.endpoints.AddressEndpoint.send(
AddressEndpoint.java:59)
    at org.apache.synapse.mediators.builtin.SendMediator.mediate(
SendMediator.java:97)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(
AbstractListMediator.java:77)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(
AbstractListMediator.java:47)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(
SequenceMediator.java:131)
    at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(
ProxyServiceMessageReceiver.java:166)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ServerWorker.
processEntityEnclosingRequest(ServerWorker.java:411)
    at org.apache.synapse.transport.passthru.ServerWorker.run(
ServerWorker.java:183)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$
1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor$Worker.
runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
-- 
Sivajothy Vanjikumaran
*Senior Software Engineer*
*Integration Technologies Team*
*WSO2 Inc. http://wso2.com <http://wso2.com/>*
*Mobile:(+94)777219209*
[image: Facebook] <https://www.facebook.com/vanjikumaran> [image: Twitter]
<https://twitter.com/vanjikumaran> [image: LinkedIn]
<http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293> [image:
Blogger] <http://vanjikumaran.blogspot.com/> [image: SlideShare]
<http://www.slideshare.net/vanjikumaran>

This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi,<br></div>we notice several test cases failing in due to null \
point exception thrown by rampart fro ESB security policy \
scenario.<div><br></div><div>Reproduce method.</div><div>===============</div> \
<div>1) Start SecureStockquateService  </div><div>2) Start Deploy the given synapse \
config and the policy.</div><div>3) Send a message to ESB  <code \
style="line-height:20px;font-size:14px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream \
Vera Sans Mono&#39;,&#39;Courier \
New&#39;,Courier,monospace!important;border-top-left-radius:0px!important;border-top-r \
ight-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left- \
radius:0px!important;background-image:none!important;border:0px!important;float:none!i \
mportant;margin:0px!important;outline:0px!important;overflow:visible!important;padding \
:0px!important;vertical-align:baseline!important;width:auto!important;min-height:auto!important;color:rgb(0,0,0)!important">ant \
stockquote -Dtrpurl=http:</code><code \
style="line-height:20px;font-size:14px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream \
Vera Sans Mono&#39;,&#39;Courier \
New&#39;,Courier,monospace!important;border-top-left-radius:0px!important;border-top-r \
ight-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left- \
radius:0px!important;background-image:none!important;border:0px!important;float:none!i \
mportant;margin:0px!important;outline:0px!important;overflow:visible!important;padding \
:0px!important;vertical-align:baseline!important;width:auto!important;min-height:auto!important;color:rgb(0,0,0)!important">//localhost</code><code \
style="line-height:20px;font-size:14px;white-space:pre-wrap;font-family:Consolas,&#39;Bitstream \
Vera Sans Mono&#39;,&#39;Courier \
New&#39;,Courier,monospace!important;border-top-left-radius:0px!important;border-top-r \
ight-radius:0px!important;border-bottom-right-radius:0px!important;border-bottom-left- \
radius:0px!important;background-image:none!important;border:0px!important;float:none!i \
mportant;margin:0px!important;outline:0px!important;overflow:visible!important;padding \
:0px!important;vertical-align:baseline!important;width:auto!important;min-height:auto!important;color:rgb(0,0,0)!important">:8280/</code></div>


<div>  </div><div>Observation</div><div>Request is not send to backend and error \
thrown at ESB [1].</div><div><br></div><div>What could be the reason? Was there any \
change in rampart or Security component?  </div> <div><br></div><div>While i am \
debuging the Rampart noticed in  <span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Bin</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">dingBuilder \
class. <b>Result</b> is null. therefore in for loop when size checked. It is throwing \
the null point exception.</span></div> \
<div><br></div><div><br></div><div><div>protected void \
addSignatureConfirmation(RampartMessageData rmd, Vector sigParts) \
{</div><div><br></div><div>            if \
(!rmd.getPolicyData().isSignatureConfirmation()) {</div><div><br> </div><div>         \
// If we don&#39;t require sig confirmation simply go back :-)</div><div>             \
return;</div><div>            }</div><div><br></div><div>            Document doc = \
rmd.getDocument();</div><div><br></div> <div>           <b> Vector results = (Vector) \
rmd.getMsgContext().getProperty(WSHandlerConstants.RECV_RESULTS);</b></div><div>      \
/*</div><div>              * loop over all results gathered by all handlers in the \
chain. For each handler result get</div> <div>              * the various actions. \
After that loop we have all signature results in the</div><div>              * \
signatureActions vector</div><div>              */</div><div><span class="" \
style="white-space:pre">		</span>Vector signatureActions = new Vector();</div> \
<div><span class="" style="white-space:pre">		</span>for (int i = 0; i &lt; \
<b>results.size()</b>; i++) {</div><div><span class="" \
style="white-space:pre">			</span>WSHandlerResult wshResult = (WSHandlerResult) \
results.get(i);</div> \
</div><div><br></div><div><br></div><div>[1]</div><div><div><div><div><div><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ERROR \
{org.apache.synapse.core.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">axis2.Axis2Sender} \
-   Unexpected error during sending message out {org.apache.synapse.core.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">axis2.Axis2Sender}</span><br>


</div><div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">java.lang.NullPointerException</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px"><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.rampart.builder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">BindingBuilder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">addSignatureConfirmation(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">BindingBuilder.java:807)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.rampart.builder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AsymmetricBindingBuilder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">doSignBeforeEncrypt(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AsymmetricBindingBuilder.java:</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">433)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.rampart.builder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AsymmetricBindingBuilder.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">build(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AsymmetricBindingBuilder.java:</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">97)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.rampart.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">MessageBuilder.build(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">MessageBuilder.java:147)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.rampart.handler.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">RampartSender.invoke(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">RampartSender.java:65)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.engine.Phase.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">invokeHandler(Phase.java:340)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.engine.Phase.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">invoke(Phase.java:313)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.engine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AxisEngine.invoke(AxisEngine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:261)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.engine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AxisEngine.send(AxisEngine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:426)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicAxisOperation$</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicOperationClient.send(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicAxisOperation.java:185)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicAxisOperation$</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicOperationClient.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">executeImpl(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">DynamicAxisOperation.java:167)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.client.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">OperationClient.execute(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">OperationClient.java:149)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2FlexibleMEPClient.send(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2FlexibleMEPClient.java:</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">496)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2Sender.sendOn(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2Sender.java:59)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2SynapseEnvironment.send(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">Axis2SynapseEnvironment.java:</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">338)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.endpoints.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractEndpoint.send(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractEndpoint.java:333)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.endpoints.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AddressEndpoint.send(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AddressEndpoint.java:59)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.mediators.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">builtin.SendMediator.mediate(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">SendMediator.java:97)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.mediators.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractListMediator.mediate(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractListMediator.java:77)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.mediators.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractListMediator.mediate(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AbstractListMediator.java:47)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.mediators.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">base.SequenceMediator.mediate(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">SequenceMediator.java:131)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.core.axis2.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ProxyServiceMessageReceiver.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">receive(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ProxyServiceMessageReceiver.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:166)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.engine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">AxisEngine.receive(AxisEngine.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:180)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.transport.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">passthru.ServerWorker.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">processEntityEnclosingRequest(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ServerWorker.java:411)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.synapse.transport.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">passthru.ServerWorker.run(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ServerWorker.java:183)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
org.apache.axis2.transport.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">base.threads.NativeWorkerPool$</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">1.run(NativeWorkerPool.java:</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">172)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
java.util.concurrent.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ThreadPoolExecutor$Worker.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">runTask(ThreadPoolExecutor.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:895)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
java.util.concurrent.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ThreadPoolExecutor$Worker.run(</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">ThreadPoolExecutor.java:918)</span><br \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">

<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">       at \
java.lang.Thread.run(Thread.</span><span \
style="font-family:arial,sans-serif;font-size:12.666666984558105px">java:662)</span><br>-- \
<br><div dir="ltr">

<span style="color:rgb(136,136,136)">Sivajothy Vanjikumaran</span><br><div \
style="color:rgb(136,136,136)"> <b><font color="#999999">Senior Software \
Engineer</font></b></div><div><div style="color:rgb(136,136,136)"><b><font \
color="#999999"><i>Integration Technologies Team</i></font></b></div><div \
style="color:rgb(136,136,136)">


<b><font color="#999999"><i>WSO2 Inc.  <a href="http://wso2.com/" \
style="color:rgb(17,85,204)" \
target="_blank">http://wso2.com</a></i></font></b><br></div><div><span \
style="background-color:transparent"><b><font color="#999999"><i>Mobile:<a \
value="+94714408632" \
style="color:rgb(17,85,204)">(+94)777219209</a></i></font></b></span></div>


<div><a href="https://www.facebook.com/vanjikumaran" \
style="text-decoration:underline" target="_blank"><img alt="Facebook" style="padding: \
0px 0px 5px; vertical-align: middle;" \
src="https://s3.amazonaws.com/images.wisestamp.com/facebook.png" border="0" \
height="16" width="16"></a> <a href="https://twitter.com/vanjikumaran" \
style="text-decoration:underline" target="_blank"><img alt="Twitter" style="padding: \
0px 0px 5px; vertical-align: middle;" \
src="https://s3.amazonaws.com/images.wisestamp.com/twitter.png" border="0" \
height="16" width="16"></a> <a \
href="http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293" \
style="text-decoration:underline" target="_blank"><img alt="LinkedIn" style="padding: \
0px 0px 5px; vertical-align: middle;" \
src="https://s3.amazonaws.com/images.wisestamp.com/linkedin.png" border="0" \
height="16" width="16"></a> <a href="http://vanjikumaran.blogspot.com/" \
style="text-decoration:underline" target="_blank"><img alt="Blogger" style="padding: \
0px 0px 5px; vertical-align: middle;" \
src="https://s3.amazonaws.com/images.wisestamp.com/blogger.png" border="0" \
height="16" width="16"></a> <a href="http://www.slideshare.net/vanjikumaran" \
style="text-decoration:underline" target="_blank"><img alt="SlideShare" \
style="padding: 0px 0px 5px; vertical-align: middle;" \
src="https://s3.amazonaws.com/images.wisestamp.com/slideshare.png" border="0" \
height="16" width="16"></a><br>


</div></div><div><br></div><div><font face="courier new, monospace" size="1">This \
communication may contain privileged or other confidential  information and is \
intended exclusively for the addressee/s. If you  are not the intended recipient/s, \
or believe that you may have  received this communication in error, please reply to \
the sender  indicating that fact and delete the copy you received and in addition,  \
you should not print, copy,  re-transmit, disseminate, or otherwise use  the \
information contained in this communication. Internet  communications cannot be \
guaranteed to be timely, secure, error or  virus-free. The sender does not accept \
liability for any errors or  omissions</font><br>


</div></div>
</div></div></div></div></div></div>

--047d7b2e4292f6073f04fce87e71--


["vanji_Test.xml" (text/xml)]

<!--
  ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<wsp:Policy wsu:Id="SigEncr"
            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <wsp:ExactlyOne>
        <wsp:All>
            <sp:AsymmetricBinding
                    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <wsp:Policy>
                    <sp:InitiatorToken>
                        <wsp:Policy>
                            <sp:X509Token
                                    \
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
  <wsp:Policy>
                                    <sp:RequireThumbprintReference />
                                    <sp:WssX509V3Token10 />
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:InitiatorToken>
                    <sp:RecipientToken>
                        <wsp:Policy>
                            <sp:X509Token
                                    \
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
  <wsp:Policy>
                                    <sp:RequireThumbprintReference />
                                    <sp:WssX509V3Token10 />
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:RecipientToken>
                    <sp:AlgorithmSuite
                            \
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">  <wsp:Policy>
                            <sp:Basic256 />
                        </wsp:Policy>
                    </sp:AlgorithmSuite>
                    <sp:Layout>
                        <wsp:Policy>
                            <sp:Strict />
                        </wsp:Policy>
                    </sp:Layout>
                    <sp:IncludeTimestamp />
                    <sp:OnlySignEntireHeadersAndBody />
                </wsp:Policy>
            </sp:AsymmetricBinding>
            <sp:Wss11 \
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">  <wsp:Policy>
                    <sp:MustSupportRefKeyIdentifier />
                    <sp:MustSupportRefIssuerSerial />
                    <sp:MustSupportRefThumbprint />
                    <sp:RequireSignatureConfirmation />
                </wsp:Policy>
            </sp:Wss11>
            <sp:Wss10 \
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">  <sp:Policy>
                    <sp:MustSupportRefKeyIdentifier />
                    <sp:MustSupportRefIssuerSerial />
                </sp:Policy>
            </sp:Wss10>
            <sp:SignedParts
                    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <sp:Body />
            </sp:SignedParts>
            <sp:EncryptedParts
                    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <sp:Body />
            </sp:EncryptedParts>
        </wsp:All>
    </wsp:ExactlyOne>
    <rampart:RampartConfig xmlns:rampart="http://ws.apache.org/rampart/policy">
        <rampart:user>wso2carbon</rampart:user>
        <rampart:encryptionUser>useReqSigCert</rampart:encryptionUser>
        <rampart:timestampPrecisionInMilliseconds>true</rampart:timestampPrecisionInMilliseconds>
  <rampart:timestampTTL>300</rampart:timestampTTL>
        <rampart:timestampMaxSkew>300</rampart:timestampMaxSkew>
        <rampart:timestampStrict>false</rampart:timestampStrict>
        <rampart:tokenStoreClass>org.wso2.carbon.security.util.SecurityTokenStore</rampart:tokenStoreClass>
  <rampart:nonceLifeTime>300</rampart:nonceLifeTime>
        <rampart:encryptionCrypto>
            <rampart:crypto provider="org.wso2.carbon.security.util.ServerCrypto"
                            cryptoKey="org.wso2.carbon.security.crypto.privatestore">
                <rampart:property \
                name="org.wso2.carbon.security.crypto.alias">wso2carbon</rampart:property>
                
                <rampart:property \
                name="org.wso2.carbon.security.crypto.privatestore">wso2carbon.jks</rampart:property>
                
                <rampart:property \
                name="org.wso2.stratos.tenant.id">-1234</rampart:property>
                <rampart:property \
                name="org.wso2.carbon.security.crypto.truststores">wso2carbon.jks,</rampart:property>
                
                <rampart:property \
name="rampart.config.user">wso2carbon</rampart:property>  </rampart:crypto>
        </rampart:encryptionCrypto>
        <rampart:signatureCrypto>
            <rampart:crypto provider="org.wso2.carbon.security.util.ServerCrypto"
                            cryptoKey="org.wso2.carbon.security.crypto.privatestore">
                <rampart:property \
                name="org.wso2.carbon.security.crypto.alias">wso2carbon</rampart:property>
                
                <rampart:property \
                name="org.wso2.carbon.security.crypto.privatestore">wso2carbon.jks</rampart:property>
                
                <rampart:property \
                name="org.wso2.stratos.tenant.id">-1234</rampart:property>
                <rampart:property \
                name="org.wso2.carbon.security.crypto.truststores">wso2carbon.jks,</rampart:property>
                
                <rampart:property \
name="rampart.config.user">wso2carbon</rampart:property>  </rampart:crypto>
        </rampart:signatureCrypto>
    </rampart:RampartConfig>
</wsp:Policy>


["testSynapseConfig.xml" (text/xml)]

<definitions xmlns="http://ws.apache.org/ns/synapse">
<localEntry key="NotWorking_policy" \
src="file:repository/samples/resources/policy/policy_3.xml">  \
<description></description> </localEntry>
<localEntry key="sec_policy" \
src="file:repository/samples/resources/policy/vanji_Test.xml">  \
<description></description> </localEntry>
<sequence name="fault">
    <log level="full">
        <property name="MESSAGE" value="Executing default &quot;fault&quot; \
                sequence"></property>
        <property name="ERROR_CODE" \
                expression="get-property('ERROR_CODE')"></property>
        <property name="ERROR_MESSAGE" \
expression="get-property('ERROR_MESSAGE')"></property>  </log>
    <drop></drop>
</sequence>
<sequence name="main">
    <in>
        <send>
            <endpoint name="secure">
                <address \
uri="http://localhost:9001/services/SecureStockQuoteService">  \
<enableAddressing></enableAddressing>  <enableSec policy="sec_policy"></enableSec>
                </address>
            </endpoint>
        </send>
    </in>
    <out>
        <header xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
  name="wsse:Security" action="remove"></header>
        <send></send>
    </out>
</sequence>
</definitions>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic