cancel
Showing results for 
Search instead for 
Did you mean: 

XML Parsing,

former_member188791
Participant
0 Kudos

Hi Group

Accepted Solutions (0)

Answers (1)

Answers (1)

hofmann
Active Contributor
0 Kudos

Hi you

former_member188791
Participant
0 Kudos

Hi Group,Sorry the body of the content is missing,here I am attaching.

Using JAVA  DOM , for incoming web service SOAP request we are changing XML tag names,but within XMLMessage Tag we are getting XML tags in the string form,JAVA code is not identifying these tags,can any body help:

---------------------------------------

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Inbound Message

  -->

- <MT_trsreg xmlns="urn:trsreg" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <XMLMessage xmlns="">

    <tag1> 111</tag1>

    <tag2>222</tag2>

</XMLMessage>

</MT_trsreg>

former_member188791
Participant
0 Kudos

Hi Group,

In one of the requirements,we are getting the below incoming SOAP request message and we need to

change the XML tags ,the whole  XML message is coming as string in Message tag ,can any body help how we can achieve this using DOM parser in JAVA.

The input XML from MONI looks like below:

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Inbound Message  -->

- <MT_REG xmlns="http://pitest.com/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <Message><IntData><SPANs><SPAN> <FileSeq>12321321313</FileSeq> <OriginalFileSeq>1233333</OriginalFileSeq> <MCore>1012405252171</MCore> <Supplier>ENDE</Supplier> </SPAN>;</SPANs> </IntData></Message>

  </MT_REG>

but when we are trying to open in Wordpad/note pad message looks like below

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Technical Routing -->

<MT_REG xmlns='http://pitest.com/jmswebservice' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

<Message>&#60;IntData&#62;&#60;SPANs&#62;&#60;SPAN&#62;

  &#60;FileSeq&#62;&#60;/FileSeq&#62;

  &#60;OriginalFileSeq&#62;&#60;/OriginalFileSeq&#62;

  &#60;MPANCore&#62;1012405252171&#60;/MPANCore&#62;

  &#60;Supplier&#62;INDE&#60;/Supplier&#62;

  &#60;/MPAN&#62;;&#60;/MPANs&#62;

&#60;/IntData&#62;</Message></MT_REG>

Can any body help with Java code achieve the below target from using above inbound message

<?xml version="1.0" encoding="UTF-8"?><ns0:MT_REG xmlns:ns0="urn://testout.com/reg">

<Int2Data>

<PANs>

<PAN>

<Seq>12321321313</Seq>

<Seq1>1233333</Seq1>

<Core>1012405252171</Core>

<Sup>ENDE</Sup>

</Int2Data>

</ns0:MT_REG>