Author |
Message
|
bab |
Posted: Fri Aug 05, 2016 2:14 am Post subject: How to read xsd file contents in Compute node? |
|
|
Novice
Joined: 05 Jul 2016 Posts: 17
|
Hi i am new to IIB.
I know we can able to read xml data using XMLNSC parser in IIB.
Is there any way to read xsd file contents in ESQL or Compute Node? |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Aug 05, 2016 3:21 am Post subject: Re: How to read xsd file contents in Compute node? |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
bab wrote: |
Hi i am new to IIB.
I know we can able to read xml data using XMLNSC parser in IIB.
|
Yes.
Quote: |
Is there any way to read xsd file contents in ESQL or Compute Node? |
Why would you want to do that?
Care to explain?
As a side note, I've been using this product sice 2002 and have never had the need to read an XSD in a message flow outside using xsd's in parsing. _________________ 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 |
|
 |
Vitor |
Posted: Fri Aug 05, 2016 4:46 am Post subject: Re: How to read xsd file contents in Compute node? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bab wrote: |
Is there any way to read xsd file contents in ESQL or Compute Node? |
Yes. An XSD file is an XML file that conforms to a particular standard. So you can process it in IIB like any other XML file.
I echo my worthy associate's comments - why exactly would you want to do this? I've been using MQSI/WMB/IIB for very slightly longer than him and, like him, never done this. What's the requirement here?
It sounds a lot like you're trying to invent a wheel when one comes standard with IIB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 06, 2016 10:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
validation comes to mind. Can the OP please verify and disclose the purpose of reading the xsd?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bab |
Posted: Mon Aug 08, 2016 3:20 am Post subject: |
|
|
Novice
Joined: 05 Jul 2016 Posts: 17
|
Thanks for all your reply.
@Vitor and @fjb_saper , I need to generate XML contents dynamically based on the XSD file. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 08, 2016 4:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
bab wrote: |
Thanks for all your reply.
@Vitor and @fjb_saper , I need to generate XML contents dynamically |
You can use any of the IIB Transformation interfaces to create any elements in the message tree you want.
bab wrote: |
based on the XSD file. |
What does this mean?
You need to construct elements that are valid according to the XSD?
Or you need to use the contents of the XSD to decide what elements to create?
The first meaning is what we've been telling you. Use the XSD to build a message model, and use normal IIB methods to create a message tree and validate it against the XSD.
The second option is insane, and your lead developer or whoever told you to do this should be fired. I realize that's not up to you. But you should ask them why they are trying to be so over clever that they are producing a solution that will be nearly impossible to debug or understand. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 08, 2016 5:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
The first meaning is what we've been telling you. Use the XSD to build a message model, and use normal IIB methods to create a message tree and validate it against the XSD. |
mqjeff wrote: |
The second option is insane, and your lead developer or whoever told you to do this should be fired. I realize that's not up to you. But you should ask them why they are trying to be so over clever that they are producing a solution that will be nearly impossible to debug or understand. |
At the minimum, you should evaluate new career opportunities because when this over engineered, impossible to debug solution blows up in Prod (and it will) then the likelihood is whoever is telling you to do this will have no recollection of telling you to do this and, in all probability, will remember telling you to do it this way. At which point the bus will go straight over you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
timber |
Posted: Mon Aug 08, 2016 5:49 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
IIB can be configured to do almost anything, so it is very likely that it can do what you need. But you may need to think about the problem in a different way.
Quote: |
I need to generate XML contents dynamically based on the XSD file. |
Let's assume that there is a real requirement hiding behind this statement. Please can you explain in detail why you need to do this? If it helps, provide an example scenario including the XSD and the dynamically-generated XML. |
|
Back to top |
|
 |
mayheminMQ |
Posted: Tue Aug 09, 2016 3:30 am Post subject: |
|
|
 Voyager
Joined: 04 Sep 2012 Posts: 77 Location: UK beyond the meadows of RocknRoll
|
Quote: |
I need to generate XML contents dynamically based on the XSD file |
Are you trying to generate a sample xml with the XSD you have? and do you want to do that with IIB toolkit? Or do you want to generate a message set with the XSD you have? _________________ A Colorblind man may appear disadvantaged but he always sees more than just colors... |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 09, 2016 5:18 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
bab wrote: |
I need to generate XML contents dynamically based on the XSD file. |
What do you mean by this? I wonder if some of the terminology is confusing you and/or us.
What do you mean dynamically? Are you wanting to change the XSD or What exactly? _________________ 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 |
|
 |
mqjeff |
Posted: Tue Aug 09, 2016 5:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
smdavies99 wrote: |
bab wrote: |
I need to generate XML contents dynamically based on the XSD file. |
What do you mean by this? I wonder if some of the terminology is confusing you and/or us.
What do you mean dynamically? Are you wanting to change the XSD or What exactly? |
Are you using the contents of the XSD to tell your flow what fields to create?
That's a very bad idea.
Are you using the contents of the XSD to ensure your message is accurate? That's a good idea, and doesn't require your flow to read the XSD. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|