You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Manjesh Kumar (JIRA)" <ji...@apache.org> on 2017/08/25 07:45:00 UTC
[jira] [Created] (SANTUARIO-468) How to add generated signature
element deep inside desired tag in XML through stax implementation
Manjesh Kumar created SANTUARIO-468:
---------------------------------------
Summary: How to add generated signature element deep inside desired tag in XML through stax implementation
Key: SANTUARIO-468
URL: https://issues.apache.org/jira/browse/SANTUARIO-468
Project: Santuario
Issue Type: Wish
Components: Java
Affects Versions: Java 2.0.8
Reporter: Manjesh Kumar
Assignee: Colm O hEigeartaigh
Priority: Minor
I am using the Santuario Stax 2.0.8 for signing the xml payment message.
Currently {{setSignaturePosition}} add the generated signature element into the first node depth only not deeper inside in xml structure and also not the inside element it add just after the element(based on given position)
For example below - how stax implementation will add the generated signature element inside the below tag given in the xml sample below.
<tag11>
<!-- I am expecting the generated signature element here -->
</tag11>
{code:java}
XMLSecurityProperties properties = new XMLSecurityProperties();
properties.setSignaturePosition(1); //any number
{code}
{code:xml}
<message>
<!-- properties.setSignaturePosition(0) is adding the signature element here -->
<tag1>
<tag11>
<!-- I am expecting the generated signature element here -->
</tag11>
</tag1>
<!-- properties.setSignaturePosition(1) is adding the signature element here just after the first tag:tag1-->
<tag2>
</tag2>
<!-- properties.setSignaturePosition(2) is adding the signature element here just after the first tag:tag2-->
<tag3>
</tag3>
<tag4>
</tag4>
<!-- properties.setSignaturePosition(10) is adding the signature element here last in the file -->
</message>
{code}
Can we achieve this in the xmlsec-2.0.8 stax ?
Thanks,
Manjesh
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)