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 » Getting input namespace in Output Message Structure

Post new topic  Reply to topic
 Getting input namespace in Output Message Structure « View previous topic :: View next topic » 
Author Message
deploy86
PostPosted: Wed Oct 05, 2016 3:03 am    Post subject: Getting input namespace in Output Message Structure Reply with quote

Newbie

Joined: 05 Oct 2016
Posts: 4

We have scenario copying input message to the output.

We have two DFDL libraries with different name spaces

DFDL 1 hl7 with 'hl7Namespace'
DFDL 2 ns1 with 'normalnamespace'

We are mapping ns1 to hl7. input message having ns1 name space and in the output we are mapping to hl7 namespace.

SET OutputRoot.DFDL.hl7:HL7.hl7:"PID.1.SetIDPID" = InputRoot.ns1:PID.ns1:"PID.1.SetIDPID";

This line working correctly it is having only single field

When we are mapping result set to the output tree structure we are getting DFDL serializing exception.

for example PID.2 is having 22 fields so we are taking as result set and directly mapping to the output in that case we are seeing ns1 namespace in the sub fields instead of hl7 namespace.

SET OutputRoot.DFDL.hl7:PID.hl7:"PID.2.PatientID" = newSegment.ns1:PID.ns1:"PID.2.PatientID";


Exception Message

Text:CHARACTER:An error occurred whilst serializing with DFDL
Insert
Type:INTEGER:5
Text:CHARACTER:CTDU4004E: The DFDL serializer cannot output element 'CX.1' because it does not match an element declaration at the current position in the DFDL schema model.
Insert
Type:INTEGER:5
Text:CHARACTER:/DFDL/{urn:hl7-org:v2xml}:HL7/{urn:hl7-org:v2xml}:anyHL7Segment/{urn:hl7-org:v2xml}:PID/{urn:hl7-org:v2xml}:PID.2.PatientID/{urn:hl7-canonical-org:v2xml}:CX.1

Note : there is no dfdl serializing error when we are mapping each and every sub-field.

[/b]
Back to top
View user's profile Send private message
timber
PostPosted: Wed Oct 05, 2016 8:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

I'm afraid this is 'working as designed'. You need to set the namespace on each and every field.

In an XSD, the normal style is for global element declarations to have a namespace and local definitions to have an empty namespace. If that was followed by XSD designers then this would not be such a problem. But in practice most XSDs make almost everything global.

If you really don't want to explicitly copy each and every field then you have a couple of options:
a) do all of the copying, then use a recursive tree walk to set the namespace to hl7 on every element in OutputRoot.XMLNSC. Only works if literally *every* tag and attribute in the output XML must have the same namespace.
b) Consider using the Mapping node. Because it's schema-driven it will automatically assign the namespaces for you. But you'll still need to draw a little line for each and every field mapping ( unless 'map by name' happens to be useful for your scenario ).
Back to top
View user's profile Send private message
deploy86
PostPosted: Wed Oct 05, 2016 9:17 am    Post subject: Reply with quote

Newbie

Joined: 05 Oct 2016
Posts: 4

We have good number of fields so it is getting tedious job to do sub component level mapping and this result sets are not working as we thought.

Thank you timber for your time.

If we found any other alternative i will let you know about our solution soon.
Back to top
View user's profile Send private message
timber
PostPosted: Thu Oct 06, 2016 12:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

An HL7 message has a very regular structure. It may be possible to write yourself a post-processing algorithm that walks through OutputRoot.XMLNSC and sets up the namespace (or not) based on the nesting level of the element.
Back to top
View user's profile Send private message
deploy86
PostPosted: Thu Oct 06, 2016 4:12 am    Post subject: Reply with quote

Newbie

Joined: 05 Oct 2016
Posts: 4

We have replaced the previous line with this line it's working good now.

SET PIDRef.hl7:PID.hl7:"PID.2.PatientID".hl7:*[] = newSegment.ns1:PID.ns1:"PID.2.PatientID".ns1:*[];


bUT PROBLEM STILL EXIST when we are having multi level sub componenets.


Last edited by deploy86 on Thu Oct 06, 2016 4:44 am; edited 1 time in total
Back to top
View user's profile Send private message
deploy86
PostPosted: Thu Oct 06, 2016 4:14 am    Post subject: Reply with quote

Newbie

Joined: 05 Oct 2016
Posts: 4

+Post Processing algorithem

Different segments in this message following different structures so we are unable to find generic solution on this.

this hl7*[] reducing most of our manual work in this scenario.
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 » Getting input namespace in Output Message Structure
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.