Author |
Message
|
Kazim_Baig |
Posted: Mon May 02, 2016 10:21 pm Post subject: DFDL Serialization error |
|
|
Novice
Joined: 26 Apr 2016 Posts: 19 Location: Bangalore
|
Hi All,
I'm working with DFDL, where my message model is
InstantPaymentReq
body
MessageType
PaymentType
CardNumber
In a compute node I'm trying to access these elements like
SET OutputRoot.DFDL.*:InstantPaymentReq.body[1].MessageType = '1234';
SET OutputRoot.DFDL.*:InstantPaymentReq.body[1].PaymentType = '1234';
SET OutputRoot.DFDL.*:InstantPaymentReq.body[1].CardNumber = '65165161651';
After this compute node, I'm getting a error like
Text:CHARACTER:An error occurred whilst serializing with DFDL
Insert
Type:INTEGER:5
Text:CHARACTER:CTDU4001E: Root element 'InstantPaymentReq' in namespace '' does not exist.
Insert
Type:INTEGER:5
Text:CHARACTER:/Root/DFDL/InstantPaymentReq
Can someone please provide a solution for this? |
|
Back to top |
|
 |
timber |
Posted: Mon May 02, 2016 11:18 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Check that the namespaces in OutputRoot match the namespaces in your DFDL xsd. |
|
Back to top |
|
 |
timber |
Posted: Mon May 02, 2016 11:23 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
In the other thread, you said
Quote: |
I don't have any global element in my xsd files. |
If true, then that's your problem. DFDL cannot work unless there is a global element in your xsd with the name 'InstantPaymentReq'. |
|
Back to top |
|
 |
maurito |
Posted: Tue May 03, 2016 2:28 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
you need to EXPLICITLY set the namespace in the SET statement,
Code: |
SET OutputRoot.DFDL.*:InstantPaymentReq.body[1].MessageType = '1234'; |
Setting it to * will not work for output. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 03, 2016 4:21 am Post subject: Re: DFDL Serialization error |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Kazim_Baig wrote: |
SET OutputRoot.DFDL.*:InstantPaymentReq.body[1].MessageType = '1234'; |
elementXYZ[1] is exactly the same as elementXYZ. You should make sure to use a reference variable in your code any time you are accessing elementXYZ[n], where n != 1. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Kazim_Baig |
Posted: Tue May 03, 2016 8:22 pm Post subject: |
|
|
Novice
Joined: 26 Apr 2016 Posts: 19 Location: Bangalore
|
Hi All,
Issue resolved. I had kept all the message models in a shared library. Now I have kept the message model in the application it self. Its working now. Must be some issue with the name space.  |
|
Back to top |
|
 |
Kazim_Baig |
Posted: Wed May 04, 2016 12:49 am Post subject: |
|
|
Novice
Joined: 26 Apr 2016 Posts: 19 Location: Bangalore
|
|
Back to top |
|
 |
|