Author |
Message
|
madi |
Posted: Mon May 05, 2008 5:14 am Post subject: Solved -- TDS problem |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi All
I havent done a lot of stuff with MRM so may be this is simple
i have a tds message like this
Code: |
Data1|Data2|Data3|Data4
Data1|Data2|Data3|Data4
...
...
|
so i defined a complex type with <CR><LF> as delimiter and within that another complex type with | as delimiter
when i run it its parsing fine but the last element in each line is not right
instead of Data4 i get
where Data1 is from the next line
if i add a | at the end of each line then it works fine
so what am i missing??
--madi _________________ IBM Certified Solutions Developer - WMB 6.0
Last edited by madi on Tue May 06, 2008 1:33 pm; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 05, 2008 5:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
<CR><LF> should maybe be a group terminator, and not a delimiter. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Mon May 05, 2008 5:55 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
where does it go in as group terminator ... ive tried the following
my message type def:
BatchMessage --> VariableLengthElementsDelimited --> Delimiter (<CR><LF>) (also tried group terminator as <CR><LF>
Inside BatchMessage i have
Message --> VariableLengthElelentsDelimited --> Delimiter (|) (also tried group terminator as <CR>LF>)
inside Message i have other local elements
--madi _________________ IBM Certified Solutions Developer - WMB 6.0 |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 05, 2008 1:05 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi madi,
This is not your main problem, but...
you should be using 'All Elements Delimited'. 'Variable Length Elements Delimited' is a specialized DES setting for structures which contain a mixture of delimited and fixed-length fields.
As usual, in order to properly advise I have to ask for more info...that's the nature of parsing problems I'm afraid.
- Am I right in thinking that you are embedding one message definition within another ( so BatchMessage contains a reference to Message )?
- If so, did you set Composition=Message on the outer complex type? ( not saying that you should have done, just asking whether you have done)
I should be able to help once I get the answers to the above questions. |
|
Back to top |
|
 |
madi |
Posted: Tue May 06, 2008 6:24 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Quote: |
This is not your main problem, but...
you should be using 'All Elements Delimited'. 'Variable Length Elements Delimited' is a specialized DES setting for structures which contain a mixture of delimited and fixed-length fields.
|
tried with all elements delimited but still have same problem
Quote: |
- Am I right in thinking that you are embedding one message definition within another ( so BatchMessage contains a reference to Message )? |
right but Message is a Type (not a message by itself)
Quote: |
If so, did you set Composition=Message on the outer complex type? ( not saying that you should have done, just asking whether you have done)
|
tried this go this error
Code: |
Invalid content starting with element 'Invoice'. The parent content model is <message>, which can only contain element references to global elements for which a message is defined.
|
appreciate your help
--madi _________________ IBM Certified Solutions Developer - WMB 6.0 |
|
Back to top |
|
 |
madi |
Posted: Tue May 06, 2008 1:26 pm Post subject: Solved -- TDS problem |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
the repeating element delimiter wasnt set right
thanks for your help
--madi _________________ IBM Certified Solutions Developer - WMB 6.0 |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 06, 2008 1:33 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
tried with all elements delimited but still have same problem |
Right. Stick with it and diagnose the remaining problem(s). Variable Length Elements Delimited was the wrong choice.
Quote: |
Message is a Type (not a message by itself) |
It's not a Type, it's a global element based on a complex type. You cannot have a reference to a Type. You can only reference global elements ( or global attributes ). But I knew what you meant
Quote: |
tried this go this error |
Why did you bother? Using Composition=Message is not the correct solution, so I'm not surprised that you got an error. That's why I distinctly said "not saying that you should have done, just asking whether you have done".
This should be a really easy problem, so I expect we're missing something obvious. If you're still stuck, post your mxsd file ( just the relevant part ). |
|
Back to top |
|
 |
|