You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "harm verhagen (JIRA)" <ji...@apache.org> on 2009/01/21 15:37:59 UTC

[jira] Created: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

validate mediator strips off namespace: result valid messages are rejected.
---------------------------------------------------------------------------

                 Key: SYNAPSE-501
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
             Project: Synapse
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: harm verhagen
         Attachments: synapse_sample_7.xml

I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.

A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.


steps to reproduce
===============
see tha attached file: synapse_sample_7.xml

send the soap message as found in the attached file soap-problem.xml

result
The ESB rejects the message, the validation fails

expected result
The ESB validates the message as OK.

version
======
Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "harm verhagen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

harm verhagen updated SYNAPSE-501:
----------------------------------

    Attachment: synapse_sample_7.xml

example synapse file which demonstrates bug

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>         Attachments: synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666224#action_12666224 ] 

Asankha C. Perera commented on SYNAPSE-501:
-------------------------------------------

Could be.. I am not very familiar with the Axiom internals.. I think a work around would be to add the parent (i.e. envelope and body namespace) declarations into the result..

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned SYNAPSE-501:
---------------------------------------

    Assignee: Andreas Veithen

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666302#action_12666302 ] 

Andreas Veithen commented on SYNAPSE-501:
-----------------------------------------

I fixed this issue in Axiom. I believe that this fix should resolve the problem in Synapse trunk, but I didn't test this yet. That's why I'm not marking this issue as resolved. Anyway before doing this we should add a unit test to Synapse.

Some more comments:
* The fix in Axiom will not solve the problem for Synapse releases < 1.3 (even when replacing the Axiom JARs with snapshot versions). The reason is that instead of OMSource (which is quite recent and only exists in Axiom 1.2.8), previous versions of ValidateMediator used StaxSource from Spring WS, and even older ones used StreamSource (if I remember well).
* We need to pay attention to avoid regression on this issue if we release Synapse 1.3 with Axiom 1.2.8, maybe using the patch mechanism. Adding a unit test will help us remembering this.

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665852#action_12665852 ] 

Asankha C. Perera commented on SYNAPSE-501:
-------------------------------------------

Hi Andreas,

I was just following this up with Harm on the WSO2 esb list http://markmail.org/message/2we2tg3xu6fhtxok :)

Its fine if you've started on this.. else I can fix it as I've already checked this in the code..

cheers
asankha

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666207#action_12666207 ] 

Asankha C. Perera commented on SYNAPSE-501:
-------------------------------------------

Are you planning on fixing this in Axiom? the namespace loss happens when an XPath evaluation returns a subelement. If your plan is to fix it in Axiom that would be best.. 

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Issue Comment Edited: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666213#action_12666213 ] 

veithen edited comment on SYNAPSE-501 at 1/22/09 11:26 AM:
-------------------------------------------------------------------

I don't think it's a problem with the XPath evaluation. I think the issue arises in OMXMLReader (which is used to construct the Source object in trunk). I didn't test this but it's clear that in the particular case we have here (subelement + namespace mapping declared on a parent element and that is not used in an attribute or element name but only in an attribute value), the current OMXMLReader implementation can't give the expected result.

      was (Author: veithen):
    I don't think it's a problem with the XPath evaluation. I think the issue arises in SAXOMBuilder (which is used to construct the Source object in trunk). I didn't test this but it's clear that in the particular case we have here (subelement + namespace mapping declared on a parent element and that is not used in an attribute or element name but only in an attribute value), the current SAXOMBuilder implementation can't give the expected result.
  
> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666213#action_12666213 ] 

Andreas Veithen commented on SYNAPSE-501:
-----------------------------------------

I don't think it's a problem with the XPath evaluation. I think the issue arises in SAXOMBuilder (which is used to construct the Source object in trunk). I didn't test this but it's clear that in the particular case we have here (subelement + namespace mapping declared on a parent element and that is not used in an attribute or element name but only in an attribute value), the current SAXOMBuilder implementation can't give the expected result.

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666097#action_12666097 ] 

Andreas Veithen commented on SYNAPSE-501:
-----------------------------------------

I assigned that issue to me since I have some idea where this comes from. What is your analysis?

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Andreas Veithen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "harm verhagen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

harm verhagen updated SYNAPSE-501:
----------------------------------

    Attachment: soap-problem.xml

soap input that shows the problem

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>         Attachments: soap-problem.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-501) validate mediator strips off namespace: result valid messages are rejected.

Posted by "harm verhagen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

harm verhagen updated SYNAPSE-501:
----------------------------------

    Attachment: soap-working.xml

This example input message DOES get accepted.

Note the extra xsd   namespace declaration.

Note:  the Esb should accept both  soap-problem.xml AND soap-working.xml

> validate mediator strips off namespace: result valid messages are rejected.
> ---------------------------------------------------------------------------
>
>                 Key: SYNAPSE-501
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-501
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>         Attachments: soap-problem.xml, soap-working.xml, synapse_sample_7.xml
>
>
> I found that using the validation mediator to validate incoming messages sometimes marks valid messages as invalid.
> A namespace that is in the envelope part, will be cut off by the ESB before passing to the validator. The validator then barfs on a missing namespace.
> steps to reproduce
> ===============
> see tha attached file: synapse_sample_7.xml
> send the soap message as found in the attached file soap-problem.xml
> result
> The ESB rejects the message, the validation fails
> expected result
> The ESB validates the message as OK.
> version
> ======
> Found in wso2esb v1.7.1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org