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 » XML format to Structured String conversion at runtime

Post new topic  Reply to topic
 XML format to Structured String conversion at runtime « View previous topic :: View next topic » 
Author Message
agrawalamit166
PostPosted: Fri Oct 09, 2015 1:07 pm    Post subject: XML format to Structured String conversion at runtime Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

Hi,

wanted to check, can we do dynamic conversion from XML format to Structured String. means if we get xml message as an input, then at run time, we will select the Structured string template (based upon template identifier details in request message) and generate the Structured string.

IIB version using: IIB V10.0.0.1

Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
smdavies99
PostPosted: Fri Oct 09, 2015 10:59 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What do you mean by 'StructuredString'?

An example may well help.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 12, 2015 5:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you can map from the "template identifier details" to the name of a root element in a DFDL message definition, then you will have instructed IIB which message set to use.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Oct 12, 2015 12:04 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

smdavies99 wrote:
What do you mean by 'StructuredString'?

An example may well help.


Request message Example:
Quote:

<Employee>
<FirstName>FNAME</FirstName>
<LastName>LNAME</LastName>
<Salary>2000.30</Salary>
</Employee>

Scenario 1:
Quote:

Template 1 Details:
<Employee>
<FirstName length="10" type="String"></FirstName>
<LastName length="10" type="String"></LastName>
<Salary length="10" type="Number" precision="2"></Salary>
</Employee>

Response 1:
Code:
"FNAME     LNAME     00002000.30"



Scenario 2:
Quote:


Template 2 Details:
<Employee>
<FirstName length="10" type="String"></FirstName>
<Salary length="10" type="Number" precision="2"></Salary>
<LastName length="10" type="String"></LastName>
</Employee>

Response 2:
Code:
"FNAME     00002000.30LNAME     "

[/code]

Hope, this will give you clear idea.
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Mon Oct 12, 2015 12:05 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

agrawalamit166 wrote:
Response 1:
Code:
"FNAME     LNAME     00002000.30"



So a DFDL message.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Oct 12, 2015 12:06 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

mqjeff wrote:
If you can map from the "template identifier details" to the name of a root element in a DFDL message definition, then you will have instructed IIB which message set to use.


We will try this approach and update you soon (if we have very specific templates)....
Back to top
View user's profile Send private message Yahoo Messenger
agrawalamit166
PostPosted: Mon Oct 12, 2015 12:07 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

mqjeff wrote:
agrawalamit166 wrote:
Response 1:
Code:
"FNAME     LNAME     00002000.30"



So a DFDL message.


yes, But we need to send DFDL message Dynamically based upon template design.
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Mon Oct 12, 2015 12:09 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

agrawalamit166 wrote:
mqjeff wrote:
agrawalamit166 wrote:
Response 1:
Code:
"FNAME     LNAME     00002000.30"



So a DFDL message.


yes, But we need to send DFDL message Dynamically based upon template design.


Yes. I mentioned a method.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Oct 12, 2015 12:18 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

We are still discussing on this:
So far we have two approaches:
Quote:

Using Java code:
For dynamic template, we should be able to achieve it by java code to look each attribute inside the element, but this approach is good only for basic structure. This will be difficult, if we need to look nested element in template.


Quote:

Using DFDL:
If we have very specific template then DFDL approach should be good, we should be able to implement it easily. But if templates are changing very frequently then it be difficult to maintain.
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Mon Oct 12, 2015 12:22 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to really analyze how often you expect your message formats to actually change.

If you're careful in how you build your message definitions, you can construct your DFDL messages such that you can just assign the input XML document tree to the output DFDL tree.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Oct 12, 2015 12:33 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

Thanks mqjeff,

mqjeff wrote:
You need to really analyze how often you expect your message formats to actually change.
i am trying to get this details.
mqjeff wrote:

If you're careful in how you build your message definitions, you can construct your DFDL messages such that you can just assign the input XML document tree to the output DFDL tree.

I believe: this requires code change, deployment effort, which again depends upon how frequently message format is changing.
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Tue Oct 13, 2015 4:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The other thing to think about is
"How complicated will the templates need to be" ?

If they are simply a matter of "Field A goes to Field 2, Field B goes to Field 1" and etc, then you could even just use a string (in a table property on a node).

But if your templates start having to make decisions based on data. Then that's really *code* and not *template*.

In v10 at least you can use shared libraries and only update and redeploy those.
_________________
chmod -R ugo-wx /
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 » XML format to Structured String conversion at runtime
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.