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 » Build a complete message body from a string

Post new topic  Reply to topic
 Build a complete message body from a string « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Wed Apr 02, 2008 7:01 am    Post subject: Build a complete message body from a string Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I have Environment variable called INTEGRATION_XML that is a string value of a message that was logged to a database. What is the best / cleanest way of creating an Output message from this string value. Notice the Encoding/Version is part of the string, I guessing I'll need to replace that part of the string with spaces to prevent that from becoming part of the OutputBody. The body shoud start with the <REQUEST> tag. Any easy way of doing this?

Thanks.

INTEGRATION_XML =
'<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<CONTROL>
<ORIGINATOR>EAI_SGMAT_ALLOC_TO_R3</ORIGINATOR>
<ORIGIN_DATETIME>2008-02-07 14:47:54.673234</ORIGIN_DATETIME>
<SERVICE>AIS</SERVICE>
<FUNCTION>AIS_BATCH_INTEGRATION</FUNCTION>
<VERSION>2.0</VERSION>
<PERSISTENCE>Y</PERSISTENCE>
<REALTIME>N</REALTIME>
<DESTINATION>
<INSTANCE>DV2</INSTANCE>
<CLIENT>120</CLIENT>
</DESTINATION>
<AUDIT_LOG>Y</AUDIT_LOG>
<ROUTER_MSGTIMES>
<GMTMSGSTART>2008-02-08 16:44:45.650513</GMTMSGSTART>
<GMTMSGCOMPLETION>2008-02-08 16:44:45.650513</GMTMSGCOMPLETION>
</ROUTER_MSGTIMES>
</CONTROL>
<APP>
<INTEGRATION>
<APP_ID>SGMAT_ALLOC</APP_ID>
<INTEGRATION_ID>7</INTEGRATION_ID>
<ACTION>NEW</ACTION>
<LAST_RFC_XML_OCCURRANCE>1</LAST_RFC_XML_OCCURRANCE>
<LAST_RFC_CODE>1</LAST_RFC_CODE>
</INTEGRATION>
<R3>
<Z_SD_ZDPALLOC>
<I_ZDPALLOC>
<item>
<VKORG>1100</VKORG>
<ZZUONR>2007S</ZZUONR>
<KUNNR>6668418</KUNNR>
<MATNR>31G96-NH01</MATNR>
<KLTBK>00000010 000</KLTBK>
<CD_IND>C</CD_IND>
<BASME/>
</item>
</I_ZDPALLOC>
</Z_SD_ZDPALLOC>
<RFC_CODE>1</RFC_CODE>
</R3>
</APP>
<STATUS>
<CODE>0</CODE>
<DESCRIPTION>SUCCESSFUL</DESCRIPTION>
</STATUS>
</REQUEST>'
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 02, 2008 11:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Code:
CREATE OutputRoot.XMLNSC PARSE Environment.INTEGRATION_XML DOMAIN XMLNSC CCSID <choose something appropriate or save the original in environment> ENCODING <same comment as for CCSID>
Back to top
View user's profile Send private message
schroederms
PostPosted: Wed Apr 02, 2008 11:09 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks, That did it!
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 » Build a complete message body from a string
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.