Author |
Message
|
glkanth |
Posted: Wed Aug 10, 2005 3:09 pm Post subject: Simple Message Transformation |
|
|
Newbie
Joined: 02 Aug 2005 Posts: 3
|
Hello All,
I am new to WMQI and I need to do a small message transformation for my project. Any ESQL code or help will be greatly appreciated.
Basically, I want to transforman input xml file to the required output xml file. I only need to change the fiields in the payload with header content being the same.
Here's the input XML
<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-Env:Envelope xmlns:durq = "http://DocumentUpdateRequest" xmlns:hrq = "http://header/v
1_3" xmlns:comp = "http://extensions" xmlns:SOAP-Env = "http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "
http://schemas.xmlsoap.org/soap/envelope/ DocumentUpdRqSoap.xsd">
<SOAP-Env:Body>
<durq:DocumentUpdRqMsg>
<hrq:HdrOrigRqRmmMsgGrp>
<hrq:hdrRqFrmInstGrp>
<hrq:hdrTmstmp>2005-01-01T13:20:00-05:00</hrq:
hdrTmstmp>
<hrq:hdrCIGrp>
<hrq:hdrClntId>PROJECT</hrq:hdrClntId>
</hrq:hdrCIGrp>
<hrq:hdrMsgIdGrp>
<hrq:hdrUUId/>
</hrq:hdrMsgIdGrp>
</hrq:hdrRqFrmInstGrp>
<hrq:hdrRqToServGrp>
<hrq:hdrServPrvdBusId>RFS</hrq:hdrServPrvdBusId>
<hrq:hdrServPrvdBusUntId>CHF</hrq:
hdrServPrvdBusUntId>
<hrq:hdrServNm>IMAGE</hrq:hdrServNm>
<hrq:hdrServAction>AddDoc</hrq:hdrServAction>
<hrq:hdrServVer>1.0</hrq:hdrServVer>
</hrq:hdrRqToServGrp>
<hrq:hdrOrigFrmWhoGrp>
<hrq:hdrBusUntId>RFS</hrq:hdrBusUntId>
<hrq:hdrBusServUntId>CHF</hrq:hdrBusServUntId>
<hrq:hdrUsrGrp>
<hrq:hdrPtySysLogId>U542345</hrq:
hdrPtySysLogId>
</hrq:hdrUsrGrp>
</hrq:hdrOrigFrmWhoGrp>
</hrq:HdrOrigRqRmmMsgGrp>
<durq:DOCUMENT_UPDATE_REQUEST>
<ORIGINAL_LOAN SystemLoanIdentifier = "123456789"/>
<customer FirstName = "John" LastName = "Doe" SSN = "
345219403"/>
<LOAN ServicerLoanIdentifier = "124567895"/>
<EMBEDDED_FILE comp:EmbeddedDocumentType = "W2" comp:
EmbeddedDocumentCategory = "Financial Statement">
<DOCUMENT>
<FILE1>AQIDBQcJCw0REwAA</FILE1>
</DOCUMENT>
</EMBEDDED_FILE>
</durq:DOCUMENT_UPDATE_REQUEST>
</durq:DocumentUpdRqMsg>
</SOAP-Env:Body>
</SOAP-Env:Envelope>
I want to convert this to ..the given output XML below.
<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-Env:Envelope xmlns:durq="http://DocumentUpdateRequest" xmlns:hrq="http://header/v1_3" xmlns:comp="http://extensions" xmlns:SOAP-Env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/
DocumentUpdRqSoap.xsd">
<SOAP-Env:Body>
<durq:DocumentAddRqMsg>
<hrq:HdrOrigRqRmmMsgGrp>
<hrq:hdrRqFrmInstGrp>
<hrq:hdrTmstmp>2005-01-01T13:20:00-05:00</hrq:hdrTmstmp>
<hrq:hdrCIGrp>
<hrq:hdrClntId>HELOS</hrq:hdrClntId>
</hrq:hdrCIGrp>
<hrq:hdrMsgIdGrp>
<hrq:hdrUUId/>
</hrq:hdrMsgIdGrp>
</hrq:hdrRqFrmInstGrp>
<hrq:hdrRqToServGrp>
<hrq:hdrServPrvdBusId>RFS</hrq:hdrServPrvdBusId>
<hrq:hdrServPrvdBusUntId>CHF</hrq:hdrServPrvdBusUntId>
<hrq:hdrServNm>ImageSvc</hrq:hdrServNm>
<hrq:hdrServAction>AddDoc</hrq:hdrServAction>
<hrq:hdrServVer>1.0</hrq:hdrServVer>
</hrq:hdrRqToServGrp>
<hrq:hdrOrigFrmWhoGrp>
<hrq:hdrBusUntId>RFSabc</hrq:hdrBusUntId>
<hrq:hdrBusServUntId>CHFabc</hrq:hdrBusServUntId>
<hrq:hdrUsrGrp>
<hrq:hdrPtySysLogId>U542345</hrq:hdrPtySysLogId>
</hrq:hdrUsrGrp>
</hrq:hdrOrigFrmWhoGrp>
</hrq:HdrOrigRqRmmMsgGrp>
<durq:DOCUMENT_ADD_REQUEST>
<LOS_Record_Number>012345</LOS_Record_Number>
<Svc_Loan_Number>SVC130705</Svc_Loan_Number>
<Soc_Sec_Number>999999999</Soc_Sec_Number>
<First_Name>FirstName</First_Name>
<Last_Name>LastName</Last_Name>
<Document_Type>docType</Document_Type>
<Document_Category>docCat</Document_Category>
<Image>JVBERi0xLjMNCiX</Image>
</durq:DOCUMENT_ADD_REQUEST>
</durq:DocumentAddRqMsg>
</SOAP-Env:Body>
</SOAP-Env:Envelope>
Basically, I want to change the element names (not the values) in within the element <durq:DOCUMENT_ADD_REQUEST> and </durq:DOCUMENT_ADD_REQUEST>
Please help.
Thanx,
Kanth |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 11, 2005 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I want to change the element names (not the values) |
In your example output, the values are changing!
If you really do want to change just the names, you can use the MRM XML parser to do this. Let me know if you want more details. |
|
Back to top |
|
 |
glkanth |
Posted: Thu Aug 11, 2005 5:07 am Post subject: |
|
|
Newbie
Joined: 02 Aug 2005 Posts: 3
|
Thanx for the Reply Kim.
Actually, I just to want to change the names of the elements. The receiving application will only know the changed element names.
Can I get any working code or any examples ? Please
Thanks |
|
Back to top |
|
 |
JT |
Posted: Thu Aug 11, 2005 6:29 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
|
Back to top |
|
 |
kimbert |
Posted: Fri Aug 12, 2005 12:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You can do it the way JT suggests, if you don't mind your ESQL containing information about the element names.
Alternatively, you could create a message set with two physical formats. The first XML physical format ('inputXML') would have the XML Name property of each element set to the input tag names. The second XML physical format (outputXML) would have the XML Name property of each element set to the output tag names. Then all you need to do is write one line of ESQL (or use an RCD node) to change the 'MessageFormat' property. |
|
Back to top |
|
 |
glkanth |
Posted: Sun Aug 14, 2005 11:38 am Post subject: |
|
|
Newbie
Joined: 02 Aug 2005 Posts: 3
|
|
Back to top |
|
 |
|