OTD Marshalling Exception : Array index out of range

I am working on an interface and using JAVACAPS 5.1.2

I had a OTD defined. The HL7 input had segments not in order, so i had the parent node order as any.

I am trying to test the OTD using the standard tester on OTD Editor.

Here is the sample input file i am using

MSH|^~\&|COMLAB|ACL|IDX|ACERN|20070128073654||ORU^R01|179|P|2.2|||||

PID|1||26185983||COX^DEARL||19570828|M||||||0107057794A||||35584050|227964986|| ||||||

PV1||O|LSF^N/A^N/A^N/A||||055335|||||||||||||||||||||||||||||||||||||||||||

ORC|RE|522019040|522019040C002239892|||||||||055335|||||||

OBR|1|522019040|522019040C002239892|ROCS^ROCS|||200701250000|||999||||200701251 155|ULC,TOE,LT^ULCER TOE LEFT|055335||IDX||C002239892||||70MICRO|F||^^^^^R|||||||||

OBX|1|TX|SOURCE^SPECIMEN DESCRIPTION:|1|SPECIMEN DESCRIPTION: ULCER TOE LEFT||||||F|||200701250000|MAIN||

OBX|2|TX|GS^GRAM STAIN:|1|GRAM STAIN: NO POLYMORPHONUCLEAR CELLS SEEN||||||F|||200701250000|MAIN||

OBR|3|522019040|522019040C002239892|NC22^MIC|||200701250000||||||||ULC,TOE,LT^U LCER TOE LEFT|LSF||||||20070128073600||70MICRO|F|ROCS&ROCS^4^SMAR&SERRATIA MARCESCENS|||522019040^522019040C002239892|C002239892644380||||||

OBX|3|TX|GS^GRAM STAIN:|1|GRAM STAIN: NO ORGANISMS SEEN||||||F|||200701250000|MAIN||

OBX|4|TX|FR^CULTURE:|1|CULTURE: MODERATE STAPHYLOCOCCUS AUREUS||||||F|||200701250000|MAIN||

OBX|5|TX|FR^CULTURE:|1|CULTURE: RARE SERRATIA MARCESCENS||||||F|||200701250000|MAIN||

OBR|2|522019040|522019040C002239892|PC21^MIC|||200701250000||||||||ULC,TOE,LT^U LCER TOE LEFT|LSF||||||20070128073600||70MICRO|F|ROCS&ROCS^2^SAUR&STAPHYLOCOCCUS AUREUS|||522019040^522019040C002239892|C002239892644380||||||

OBX|1|ST|AUG^AMOXICIL/CLAVULANATE|2|<=4/2|||SS|||F|||200701250000|MAIN|

OBX|2|ST|CLIN^CLINDAMYCIN|2|<=.25|||SS|||F|||200701250000|MAIN|

There are 3 OBR's but when i unmarshal it takes in as 4 OBR's with OBR[3] as null.

This is causing the problem. when i tried marshalling the same, it gives Array index out of range: 2

Any idea what could be problem?

Thank You

Rajesh

[2168 byte] By [RajeshDuddupudia] at [2007-11-26 19:19:46]
# 1
What is the max amount of OBRs that can be accepted? Are you using a canned HL7 OTD or a custom one? Seems like you have a bad value for max occurrences of OBR allowable.
bgrant88a at 2007-7-9 21:36:49 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2

I am receiving a similar error (Array index out of range) on an otd I created from an XSD which I haven't been able to figure out either. When I unmarshal the message using the tester, it works fine. I have narrowed it down to the method that gets invoked in the jcd that is invoking the constructor of the otd object. It is a simple otd with no repeating nodes and approximately 20 fields using String and boolean (built-in) types. Anyone else seen this type of error?

chrisallen21a at 2007-7-9 21:36:49 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...