GETTING SERIALIZING ERROR WHILE ASSIGNING VALUE TO THE DFDL PARSER IN ESQL

1.5k views Asked by At

Getting Serializing error

IIB 9 and Websphere MQ

I have a sample message flow. with MQInput node, Compute node, Mqoutput node and using DFDL.

I have a dfdl with one mandatory segment and other 3 are non mandatory segments.

in non mandatory segments i have this type of tree structure.

ROOT SEGMENT 1 ELEMENT1 ELEMENT2 ELEMENT3 ELEMENT4 ELEMENT5 SEGMENT 2 ELEMENT1 ELEMENT2 ELEMENT3 ELEMENT4 SEGMENT 2 ELEMENT1 ELEMENT2 ELEMENT3 ELEMENT4

CONSIDER second SEGMENT2 >> ELEMENT2 is not populating. If I want to add ELEMENT2 in the ESQL using ESQL i am getting serializing error.


CASE : I can assign value for ELEMENT2 by creating field as NEXSIBLING for ELEMENT1 .

CREATE NEXTSIBLING OF REF_SEGMENT TYPE Name NAMESPACE NS NAME 'NAME OF THE FIELD';

Here i am creating next sibling of ELEMENT1 so i can create ELEMENT2 so that i can assign values to the ELEMENT 2 . but problem i am facing when ELEMENT 1 and ELEMENT 3 is null then

I couldn't create the ELEMENT2 as NEXTSIBLING or PREVIOUSSIBLING.

we have CREATE FIELD function but it is adding element at the END of the logical tree structure. so that try also failing.

CREATE FIELD OutputRoot.XMLNS.TestCase.description TYPE NameValue VALUE 'This is my TestCase';

Note : no option to change DFDL we are using same dfdl for other interfaces. only way is ESQL.

1

There are 1 answers

0
Attila Repasi On

I'm assuming ELEMENT1 and ELEMENT2 are 2 different fields with those names. In that case you should be able to do either of the following to create ELEMENT2 even when ELEMENT1 is not created first:

  • SET OutputRoot.DFDL.ROOT.SEGMENT2[2].ELEMENT2 = 'test';
  • CREATE LASTCHILD OF OutputRoot.DFDL.ROOT.SEGMENT2[2] NAME 'ELEMENT2' VALUE 'test';

SEGMENT1 and the first SEGMENT2 (OutputRoot.DFDL.ROOT.SEGMENT2[1]) must be created before though.