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 Index » WebSphere Message Broker (ACE) Support » Parsing DFDL in Java

Post new topic  Reply to topic
 Parsing DFDL in Java « View previous topic :: View next topic » 
Author Message
soudhanya
PostPosted: Tue Nov 28, 2017 8:31 am    Post subject: Parsing DFDL in Java Reply with quote

Novice

Joined: 27 Feb 2017
Posts: 20

Hi,

Can somebody help me how to write below code in java

CREATE LASTCHILD OF Environment.NonIntervalUsageRecords DOMAIN('DFDL') PARSE(inputXml, 546, 1208, '','{http://www.ibm.com/dfdl/RecordSeparatedFieldFormat}:NonIntervalUsageRecords','' , 0);

Thanks..
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Nov 28, 2017 8:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

As to Java, I'm the worst person in the world to advise you.

I'm slightly alarmed to see something called "inputXml" being parsed with DFDL.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
soudhanya
PostPosted: Tue Nov 28, 2017 8:53 am    Post subject: Reply with quote

Novice

Joined: 27 Feb 2017
Posts: 20

DECLARE inputXml CHARACTER CAST(InputRoot.BLOB.BLOB AS CHAR CCSID 1208);

inputxml is the blob message
Back to top
View user's profile Send private message Send e-mail
timber
PostPosted: Tue Nov 28, 2017 4:07 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1290

Why are you trying to parse XML with the DFDL parser?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 29, 2017 6:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

timber wrote:
Why are you trying to parse XML with the DFDL parser?


Vitor wrote:
I'm slightly alarmed to see something called "inputXml" being parsed with DFDL.


I don't think you're going to get much from us until you explain this apparently inexplicable decision.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Nov 29, 2017 6:20 pm    Post subject: Re: Parsing DFDL in Java Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

soudhanya wrote:
Can somebody help me how to write below code in java

Code:
CREATE LASTCHILD OF Environment.NonIntervalUsageRecords DOMAIN('DFDL') PARSE(inputXml, 546, 1208, '','{http://www.ibm.com/dfdl/RecordSeparatedFieldFormat}:NonIntervalUsageRecords','' , 0);

The Java user-defined node API describes a method that, for a given element, will create another element as its last child from a bitstream.

soudhanya wrote:
Code:
DECLARE inputXml CHARACTER CAST(InputRoot.BLOB.BLOB AS CHAR CCSID 1208);

Setting aside the question of why a variable called "inputXml" would contain a presumably non-XML message, why would the message flow CAST a perfectly good BLOB to CHARACTER before passing it to the PARSE clause of a CREATE statement?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 30, 2017 5:40 am    Post subject: Re: Parsing DFDL in Java Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20729
Location: LI,NY

rekarm01 wrote:

Setting aside the question of why a variable called "inputXml" would contain a presumably non-XML message, why would the message flow CAST a perfectly good BLOB to CHARACTER before passing it to the PARSE clause of a CREATE statement?

My guess is to make it readable by a human when running in debug mode...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing DFDL in Java
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.