ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Simple Message Transformation

Post new topic  Reply to topic
 Simple Message Transformation « View previous topic :: View next topic » 
Author Message
glkanth
PostPosted: Wed Aug 10, 2005 3:09 pm    Post subject: Simple Message Transformation Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Thu Aug 11, 2005 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message
glkanth
PostPosted: Thu Aug 11, 2005 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message
JT
PostPosted: Thu Aug 11, 2005 6:29 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ak05740_.htm#ak05740_
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Aug 12, 2005 12:57 am    Post subject: Reply with quote

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
View user's profile Send private message
glkanth
PostPosted: Sun Aug 14, 2005 11:38 am    Post subject: Reply with quote

Newbie

Joined: 02 Aug 2005
Posts: 3

Thanx for the help Kim.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Simple Message Transformation
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.