|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML to CWF |
« View previous topic :: View next topic » |
Author |
Message
|
IntegratorWMB |
Posted: Tue Feb 12, 2008 1:29 pm Post subject: XML to CWF |
|
|
Apprentice
Joined: 06 Dec 2007 Posts: 27
|
I am transforming an incoming xml to cwf.
The outgoing message(cwf) contains a header and body. The body part of the message is filled by the elements from the incoming xml. The header part looks something as shown below:
AspaceBspaceCdelimiter1Ddelimiter2E
where
A - fixed value String
space - ' '
B - fixed value String
space - ' '
C - String (max of 8 chars)
delimiter1 - @
D - String(max of 20 chars)
delimiter2 - *
E - fixed value String
How can I define a complextype which has a mix of TDS and CWF?
Thanks  |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 12, 2008 1:46 pm Post subject: Re: XML to CWF |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
IntegratorWMB wrote: |
How can I define a complextype which has a mix of TDS and CWF? |
You can't.
You can model fixed width fields in TDS.
In v6.1 you can model decimal fields in TDS.
You can define a TDS complex type which holds a string, where the string is a bitstream output of a CWF message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 12, 2008 2:51 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
As Jeff says, you need to understand the difference between 'fixed length' and 'CWF'. TDS can handle fixed length structures, delimited structures, and structures which contain a mixture of fixed-length and delimited fields.
Your header structure uses a different delimiter for each field ( I'd like to know what the 'designer' of this format was smoking ). So you'll have to use groups which modify the delimiter. Something like this ( not tested ):
Code: |
Header DES=TaggedFixedLength, TagLength=0
group DES=AllElementsDelimited, Delimiter=' ', GroupTerminator=' '
fieldA
fieldB
group DES=AllElementsDelimited GroupTerminator='@'
fieldC
group DES=AllElementsDelimited GroupTerminator='*'
fieldD
fieldE
|
In case you're wondering, the outermost complex type is set to 'Tagged Fixed Length' for a good reason. We don't want the outermost type to be delimited - that would generate extra delimiters between the groups. We cannot use 'Fixed Length' because it is not allowed to contain variable length groups. 'Tagged Fixed Length' does the job.
As I say, this has not been tested, so let me know if you hit problems. |
|
Back to top |
|
 |
IntegratorWMB |
Posted: Wed Feb 13, 2008 9:08 am Post subject: |
|
|
Apprentice
Joined: 06 Dec 2007 Posts: 27
|
Thanks for your replies and directions you had provided. I will reformat my design to use Tagged formats for the outgoing message. I am reading the message set manuals on more about Tagged format properties.
Kimbert
I tried your recommendation. But the message set is failing to compile and results in the following error:
A structure must not have Data Element Separation 'AllElementsDelimited' when its parent structure has Data Element Separation 'TaggedFixedLength'. Physical format: 'TDF'.
Thanks |
|
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
|
|
|
|