Author |
Message
|
PEPERO |
Posted: Sat Sep 08, 2012 10:36 am Post subject: BLOB to MRM |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Hi;
What is the standard way to convert a BLOB message tree to the MRM if we don't want to use the node properties? |
|
Back to top |
|
 |
Vitor |
Posted: Sat Sep 08, 2012 12:03 pm Post subject: Re: BLOB to MRM |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PEPERO wrote: |
What is the standard way to convert a BLOB message tree to the MRM if we don't want to use the node properties? |
You could parse it, but since that requires the same information as you supply via the node properties the same odd requirement that prevents you using the node properties may still apply. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PEPERO |
Posted: Sat Sep 08, 2012 6:57 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
I mean that could we use the copyElementTree method to achive this? I think that this method is specifically used for the XMLNS(C) and MRM domains. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Sep 08, 2012 7:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
PEPERO wrote: |
I mean that could we use the copyElementTree method to achive this? I think that this method is specifically used for the XMLNS(C) and MRM domains. |
To copy the Element Tree you first need to have a Tree which you don't have under the BLOB parser...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PEPERO |
Posted: Sat Sep 08, 2012 7:41 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Consider that we have a service provider when sending our request to and receiving the respone from it , some code page conversion must be done. In this case i think that making the code page conversion against a blob message is more effective than performing it against the MRM message tree. for this reason i came to convert the BLOB to MRM and vice versa. So please help me about this issue. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sat Sep 08, 2012 7:56 pm Post subject: Re: BLOB to MRM |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
PEPERO wrote: |
Consider that we have a service provider when sending our request to and receiving the respone from it , some code page conversion must be done. In this case i think that making the code page conversion against a blob message is more effective than performing it against the MRM message tree. for this reason i came to convert the BLOB to MRM and vice versa. So please help me about this issue. |
Provided that a message set exists, the MRM parser converts characters automatically, upon input (using InputRoot.Properties.CodedCharSetId), and upon output (using OutputRoot.Properties.CodedCharSetId). No BLOB required. |
|
Back to top |
|
 |
PEPERO |
Posted: Sat Sep 08, 2012 8:01 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Unfortunately the service provider uses non standard code pages in which a manual code page conversion must be done. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Sep 08, 2012 8:10 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
PEPERO wrote: |
Unfortunately the service provider uses non standard code pages in which a manual code page conversion must be done. |
What is 'non Standard' about it?
Time to look for a new service provider then?
Seriously, in this day and age using non standard code pages is not good for business and is IMHO a sure fire way to put yourself out of business. Customers will vote with their feet and go to a service provider who makes interfacing easier than one like this. _________________ 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 |
|
 |
rekarm01 |
Posted: Sat Sep 08, 2012 8:24 pm Post subject: Re: BLOB to MRM |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
PEPERO wrote: |
Unfortunately the service provider uses non standard code pages ... |
What code pages are the service provider using, and how are they non-standard? How exactly is the message flow going to convert the messages?
The preferred approach for adding support for custom code pages is to generate new code page converter(s), and use those with the MRM parser.
A much uglier approach is to use the ESQL TRANSLATE(BLOB, BLOB) function, and use the ResetContentDescriptor node (or comparable ESQL) to map between BLOB and MRM. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Sep 09, 2012 3:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You appear to be asking about the Java API, and you appear to have failed to find the createElementAsLastChildFromBitstream method. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Sep 09, 2012 9:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PEPERO wrote: |
In this case i think that making the code page conversion against a blob message is more effective than performing it against the MRM message tree. |
What makes you think that? Even assuming you were right, what's more efficient about doing code page conversions further down the flow than the input node?
PEPERO wrote: |
Unfortunately the service provider uses non standard code pages in which a manual code page conversion must be done |
Exactly what do you mean by "non-standard"? If the WMB software can't convert it, how do you plan to convert it "manually"? Especially as you opened this post asking for the "standard" way to convert; you can't use a standard method on a non-standard problem!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PEPERO |
Posted: Sun Sep 09, 2012 11:01 am Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Quote: |
Seriously, in this day and age using non standard code pages is not good for business and is IMHO a sure fire way to put yourself out of business. Customers will vote with their feet and go to a service provider who makes interfacing easier than one like this |
May be we have to ask to use a more flexible, standard service provider than the one we are using since 1996. |
|
Back to top |
|
 |
PEPERO |
Posted: Sun Sep 09, 2012 7:20 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Thanks all and thanks mqjeff. That was the exact API that i was looking for. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 10, 2012 5:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PEPERO wrote: |
Thanks all and thanks mqjeff. That was the exact API that i was looking for. |
And what exactly does that get you, as it's the Java version of the ESQL parser and the one the node is using? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|