Announcement Announcement Module
Collapse
No announcement yet.
How to create Session id in xml with the help of XSLT.. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create Session id in xml with the help of XSLT..

    My Expected XML output (the XML I need to be transformed by using XSLT.) :

    <DST>
    <DST>
    <PQAWD>
    <username>TEST</username>
    <password>Test</password>
    <newPassword />
    <hostAddress>@@@@@@@@@@</hostAddress>
    <hostPort>@@@@@</hostPort>
    </PQAWD>
    </DST>
    <AWDLogon>
    <userID>TEST</userID>
    <password encrypt="Y">TRST</password>
    <hostAddress>test</hostAddress>
    <hostPort>@@@@@</hostPort>
    <trace />
    <readable>N</readable>
    <timeout>120000</timeout>
    <newPassword encrypt="Y" />
    <config userPrivileges="Y" options="Y" sendRequest="Y" />
    <currentJobName>PQAWDLogon</currentJobName>
    </AWDLogon>
    **<tidx>48006c7898e61461eb110f66a714629864ocx$3881 11915602261781664778</tidx>**
    </DST>
    XSL Sheet (which element to be added to get above output)..

    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version = "1.0">
    <xsl:template match="//DST/PQAWD">
    <AWDLogon>
    <userID><xsl:valueof select="username"/></userID>
    <password encrypt="Y"><xsl:valueof select="password"/></password>
    <hostAddress><xsl:valueof select="hostAddress"/></hostAddress>
    <hostPort><xsl:valueof select="hostPort"/></hostPort>
    <trace></trace>
    <readable>N</readable>
    <timeout>120000</timeout>
    <newPassword encrypt="Y"><xsl:valueof select="newPassword"/></newPassword>
    <config userPrivileges="Y" options="Y" sendRequest="Y" />
    <currentJobName>PQAWDLogon</currentJobName>
    </AWDLogon>
    </xsl:template>
    </xsl:stylesheet>
    Above is the XML ,in that <tidx> tag should be acts like session id which is changed dynamically, is there any procedure or tag to add to current XSLT sheet to get above XML as output, Please help me on this(please consider above xsl sheet as reference)...

  • #2
    Please, start to ask questions on http://stackoverflow.com: http://forum.spring.io/forum/spring-...-may-30th-2014

    Sorry for inconvenience

    Comment


    • #3
      Hi Artem,

      I have posted above question in below stack overflow location, please can you give me any idea on this...

      http://stackoverflow.com/questions/2...66853_23988095

      Comment


      • Arunkumar Bandaru
        Arunkumar Bandaru commented
        Editing a comment
        I am using spring integration only ,shall i write servlet for accessing session id or any possibility ,please suggest me on this...
    Working...
    X