|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Cast Blob from Array |
« View previous topic :: View next topic » |
Author |
Message
|
giorginus80 |
Posted: Wed Dec 17, 2008 9:19 am Post subject: Cast Blob from Array |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
Hi,
I have an xml like this:
Code: |
<FIELDS>
<FIELD>1</FIELD>
<FIELD>2</FIELD>
<FIELD>3</FIELD>
<FIELD>4</FIELD>
<FIELD>5</FIELD>
<FIELD>6</FIELD>
</FIELDS>
|
I need to convert to a Blob the FIELD without including FIELDS.
I tried:
Code: |
DECLARE folderBlob BLOB ASBITSTREAM(Environment.myData.XML.FIELDS,
InputRoot.Properties.Encoding,
InputRoot.Properties.CodedCharSetId,
'','','',FolderBitStream);
|
but in this case the FIELDS is included, I tried Environment.myData.XML.FIELDS.FIELD[] but it doesn't deploy in this case.
Which way is better? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 17, 2008 2:03 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Remember this:
- message flows operate on the logical message structure
- message sets describe the input and output physical format(s) of the messages
You should try to avoid putting into your message flow any information about the physical format of the message.
You are trying to convert between your input physical format ( XML ) and your output physical format (fixed-length string). You should:
- Use XMLNSC as your input domain. XMLNSC does not require a message set, but it is best practice to create one anyway, unless your input message structure is trivial. If the input logical structure is the same as the output logical structure, you can reuse the output message set.
- Create a message set for your output format. Add a TDS physical format. The Data Element Separation will default to 'Fixed Length' which is what you need. Set the length field on each element in the message definition.
- In your message flow, copy InputRoot.XMLNSC.FIELDS to OutputRoot.MRM. Set OutputRoot.Properties.MessageSet to the name of your output message set. Set OutputRoot.Properties.MessageType to the name of the message definition. Set OutputRoot.Properties.MessageFormat to the name of your TDS physical format.
Hopefully, you now realise why your previous attempts did not work. If not, please take time to read the docs and work that out. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|