ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportBinary field in DFDL

Post new topicReply to topic
Binary field in DFDL View previous topic :: View next topic
Author Message
petervh1
PostPosted: Tue Dec 18, 2018 4:52 am Post subject: Binary field in DFDL Reply with quote

Apprentice

Joined: 19 Apr 2010
Posts: 46

Hello

I am trying to set up a DFDL structure to model data that s all text except for one field. This one field is a binary field (it's actually a bit map of an image).

I have set up the element definition as follows:



Code:
<xsd:element dfdl:initiator="nn.nnn:" dfdl:lengthUnits="bytes" dfdl:terminator="1D" name="nnn.DAT"
         dfdl:representation="binary" type="xsd:hexBinary"/>


When I run the Test Parse I get the following error:

CTDP3011E: Character decoding error. The sequence of bytes starting at byte offset '563' is not a valid character in the encoding 'UTF-8' .

Can anyone assist?
Back to top
View user's profile Send private message
timber
PostPosted: Tue Dec 18, 2018 2:00 pm Post subject: Reply with quote

Guardian

Joined: 25 Aug 2015
Posts: 942

I suspect that the DFDL parser is trying to look for the terminator (the two-character sequence "1D" - is that what you intended?) but in order to do that it needs to convert the bytes into characters.
Did you mean to specify the terminator as a single byte? If so, you should specify it as" %#x1D;"
Back to top
View user's profile Send private message
petervh1
PostPosted: Wed Dec 19, 2018 3:50 am Post subject: Reply with quote

Apprentice

Joined: 19 Apr 2010
Posts: 46

Thanks, Timber.

I changed the terminator to "%#x1D;" and the problem has been resolved.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportBinary field in DFDL
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.