Author |
Message
|
francoisvdm |
Posted: Wed Jun 28, 2006 4:57 am Post subject: Data overflow error with XSD from SAP |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
I used the ODA from SAP adapter to retrieve an IDOC and converted it with BO designer to an XSD. I then imported this XSD into Message Broker V6 and created a message set from it.
In a mapping node I map some input data to this message set, but when I try and put the result to a queue I get the following error in event viewer. It seems like it does not like the "version" field. This version field is in the message set defined as a "token".
Code: |
Custom Wire Format writing error.
While writing the logical tree to the bitstream, a data conversion error occurred.
The element ''185^version'' is either too long, or is out of range for the physical data type of ''fixed-length string''.
Change the definition of the element so that it can store the data safely, or change the incoming message so that the element is in the correct range.
|
Does this mean I must change the message set by hand before I use it?
Thanks[/code] _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jun 28, 2006 5:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Probably cause: The message set defines 'version' to be a fixed-length string of maximum length X. Your input message contained a 'version' which was more than X characters in length.
You don't have to alter your message set - you could truncate 'version' in your message flow before you attempt to serialize the message. |
|
Back to top |
|
 |
francoisvdm |
Posted: Wed Jun 28, 2006 8:16 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
Yes, the version field's CWF length is set to 0, but I'm not mapping the "version" field at all - so why is it trying to do that. One of the "substructures" that also contains a "version" must have at least 1 occurrance, but I do map one of the fields in it. Is that maybe forcing a map of "everything" inside the sub structure?
Also, why is the version field set as a "token" field and not as a string? Any SAP guys out there?
Thanks _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 28, 2006 3:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Version of what?
If it maps to the DC40 record a length of plain 0 is just wrong.
Does that mean the field was null and you should be setting a default value?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
francoisvdm |
Posted: Wed Jun 28, 2006 11:23 pm Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
It is one of the header fields that comes in from SAP IDOC.... I do not know if I must give it a default value? Anybody? I'll try that... I see data coming in over the adapter puts "3.0.0" in there. _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 29, 2006 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
If you want to know whether 'version' is being copied to the output, put a trace node after the mapping node and trace ${Root}.
Quote: |
One of the "substructures" that also contains a "version" must have at least 1 occurrance, but I do map one of the fields in it. Is that maybe forcing a map of "everything" inside the sub structure? |
'version' will get mapped if
a) it is mapped explicitly OR
b) its parent structure is mapped
Mapping one of the siblings of 'version' will not cause 'version' to be mapped.
Quote: |
Also, why is the version field set as a "token" field and not as a string? Any SAP guys out there? |
In the MRM XML parser, 'xs:token' is treated exactly the same as 'xs:string'. (unless you switch on validation) I expect some XML Schema expert thought 'token' was the best choice  |
|
Back to top |
|
 |
|