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 » nillable complex type field - DFDL

Post new topic  Reply to topic
 nillable complex type field - DFDL « View previous topic :: View next topic » 
Author Message
rsk33
PostPosted: Tue Sep 09, 2014 10:50 pm    Post subject: nillable complex type field - DFDL Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

Hi

I am trying to transform CSV string to soap request message through DFDL schema and esql. Every field is start with '[' and terminate with ']' and separated with comma. For example if the field is complex the csv representation is employee[name[x],age[xx]].

i am facing issue in transformation with the below case.
sometimes the employee complex type is nillable and not want to write/pass all the fields in complex data.

Is there any way/option i can identify that complex type is nillable in DFDL like we use for fields

nillable="true" dfdl:useNilForDefault="yes" dfdl:nilKind="literalValue" dfdl:nilValue="%ES;"

Help is highly appreciated.

Regards
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 10, 2014 3:44 am    Post subject: Reply with quote

Grand High Poobah

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

Your topic is a little bit broader than that.
Assuming that DFDL correctly identifies null values and sets the tree accordingly, what are you doing to verify the consistency of the SOAP message. Are those fields nillable in the SOAP message? Are they optional?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rsk33
PostPosted: Wed Sep 10, 2014 3:59 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

Thanks saper for the response,

Yes they are nillable in the soap request. I am trying to invoke a backend webservice and converting again the response to CSV string for the channel requirement.

Regards
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 10, 2014 4:01 am    Post subject: Reply with quote

Grand High Poobah

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

rsk33 wrote:
Thanks saper for the response,

Yes they are nillable in the soap request. I am trying to invoke a backend webservice and converting again the response to CSV string for the channel requirement.

Regards

And are you setting them with the xsi:nil="true" attribute?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rsk33
PostPosted: Wed Sep 10, 2014 4:07 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

when i set the complex type xsi:nil="true" attribute, dfdl_schema error occurs.
Back to top
View user's profile Send private message
rsk33
PostPosted: Wed Sep 10, 2014 4:10 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

sorry, if i understand your question, the webservice xsd schema is defined nillable.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 10, 2014 4:13 am    Post subject: Reply with quote

Grand High Poobah

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

rsk33 wrote:
when i set the complex type xsi:nil="true" attribute, dfdl_schema error occurs.


I thought you were only doing DFDL to SOAP and not the opposite as well.
You need to take care of the fact that the SOAP XML will contain xsi:nil="true" for a null field...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rsk33
PostPosted: Wed Sep 10, 2014 4:25 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

But my issue is i am not able to parse the message without passing all the fields of complexField.

Right now as a work around, i am passing employee[name[*],age[*]] and dfdl is successfully parsing. I am treating * as NULL and through esql i am transforming to the field xsi:nill ="true".

I just want to know any alternative,better/correct approch.
Back to top
View user's profile Send private message
rsk33
PostPosted: Wed Sep 10, 2014 4:29 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

my concern is DFDL to SOAP only.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 10, 2014 4:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

rsk33 wrote:
my concern is DFDL to SOAP only.


You need to do two separate things.

One: create a working DFDL model that properly and successfully parses your input message.

Two: create a transformation that properly and correctly builds the logical message tree under the SOAP domain that matches the soap request schema.

Or, well, you could build it under XMLNSC instead of SOAP and let the SOAPRequest node attach the envelope.
Back to top
View user's profile Send private message
rsk33
PostPosted: Wed Sep 10, 2014 4:44 am    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

Hi jeff,

As you mentioned,I have created the DFDL working model and it is working for several services.

ie converting to soap request and invoking backend webservice.
returning the soap reply and again transforming soap to DFDL through a DFDL model.

My issue is whenever the backend schema complex field is nillable, right now i am passing all the elements of complex in the request message with *(trating null) in order to parse successfully by DFDL
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 10, 2014 6:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

IBM DFDL does not support nillable='true' on a complex element. The DFDL specification does allow it, though. A future version of IIB may be able to support this scenario.
For now, mqjeff's solution is the correct one. Get it to parse correctly for all expected input messages, and use transformation logic to compensate.

Good problem description, btw.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
rsk33
PostPosted: Wed Sep 10, 2014 9:33 pm    Post subject: Reply with quote

Centurion

Joined: 21 Aug 2006
Posts: 141

Thanks kimbert for the confirmation. For now i am passing all the elements in of the complexType of request message in order to parse successfully by DFDL.
Through esql i transform the complex type field with xsi:nill ='true' and send to backend.

Once again my sincere thanks to all for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » nillable complex type field - 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.