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 » Copying part of MRM-XML input to XML output

Post new topic  Reply to topic
 Copying part of MRM-XML input to XML output « View previous topic :: View next topic » 
Author Message
vmcgloin
PostPosted: Tue Oct 07, 2003 1:36 am    Post subject: Copying part of MRM-XML input to XML output Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Hi,

I have an input message that is parsed by the MRM. I want to copy part of that message to the output as XML (not MRM-XML). However, I could do with some advice on how to do this. I have tried several methods but not all the subfields are being copied.

The relevant part of the input message (from a trace node) is:

Code:
  (0x100001B)MRM        = (
...
    (0x1000013)MailMessage = (
      (0x300000B)MailTo      = 'vmcgloin@xyz.co.uk'
      (0x300000B)MailFrom    = 'abc@xyz.co.uk'
      (0x300000B)MailSubject = 'This is a sample message'
      (0x1000013)MailBody    = (
        (0x200000B) = 'This is a sample message body'
      )
    )
...


I have tried:

Code:
SET "OutputRoot"."XML"."MailMessage" = InputRoot.MRM."MailMessage";


which produces this output (losing the MailBody information)

Code:
  (0x1000010)XML        = (
    (0x1000000)MailMessage = (
      (0x1000000)MailTo      = (
        (0x2000000) = 'vmcgloin@xyz.co.uk'
      )
      (0x1000000)MailFrom    = (
        (0x2000000) = 'abc@xyz.co.uk'
      )
      (0x1000000)MailSubject = (
        (0x2000000) = 'This is a sample message'
      )
      (0x1000000)MailBody    =
    )
  )


and, based on the copying of message headers,

Code:
SET C = CARDINALITY(InputRoot.MRM."MailMessage".*[]);
SET I = 1;
WHILE I < C DO
   SET OutputRoot."XML"."MailMessage".*[I] = InputRoot.MRM."MailMessage".*[I];
   SET I=I+1;
END WHILE;


which produces this output (losing the MailBody tag and data):

Code:
  (0x1000010)XML        = (
    (0x1000000)MailMessage = (
      (0x1000000)MailTo      = (
        (0x2000000) = 'vmcgloin@xyz.co.uk'
      )
      (0x1000000)MailFrom    = (
        (0x2000000) = 'abc@xyz.co.uk'
      )
      (0x1000000)MailSubject = (
        (0x2000000) = 'This is a sample message'
      )
    )
  )


Sorry for the long post, but I am new to this kind of stuff and would appreciate any pointers in the right direction...

Thanks,
Vicky
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 » Copying part of MRM-XML input to XML output
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.