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 » Extract a part of a xmlns

Post new topic  Reply to topic
 Extract a part of a xmlns « View previous topic :: View next topic » 
Author Message
soni
PostPosted: Mon Oct 08, 2007 8:34 am    Post subject: Extract a part of a xmlns Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

Hello world!!

I need help to extract a part of a input message (in xmlns). I have a input message like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<Q1:BLOB_BO.xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/BLOB_BO" version="3.0.0" verb="Create" locale="en_US" delta="false">
 <Q1:BLOB>4a6f686e20416e74686f6e792052.......</Q1:BLOB>
 <Q1:MetaData>
  <Q2:JText_META_DATA xmlns:Q2="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/JText_META_DATA" version="3.0.0" verb="Create" locale="en_US" delta="false">
   <Q2:InFileName>/wbiaappl/jtextsighn01/interfaces/out/One_line.in</Q2:InFileName>
  </Q2:JText_META_DATA>
 </Q1:MetaData>
 <Q1:ObjectEventId>JTextConnector_1190272214492_1</Q1:ObjectEventId>
</Q1:BLOB_BO> 


This message has been sent by jtext adapter. And I need only the part that it is between <Q1:BLOB> tags. How can I do to send this part to the outroot?

Thanks
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 12:34 am    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

I try something like this:

Code:
SET OutputRoot.XMLNS = InputRoot.XMLNS.*:BLOB_BO.*:BLOB;
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Oct 09, 2007 12:47 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

soni wrote:
I try something like this:

Code:
SET OutputRoot.XMLNS = InputRoot.XMLNS.*:BLOB_BO.*:BLOB;


did you try

SET OutputRoot.XMLNS.*:* = InputRoot.XMLNS.*:BLOB_BO.*:BLOB;
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Oct 09, 2007 1:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Is this a workflow question?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 5:29 am    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

Thanks AkankshA to help me!

I tried it but now show this error:

"Caught exception and rethrowing. XML Writing Errors have occurred. No valid body of the document could be found."

Any idea??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 09, 2007 5:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are the contents of the Q1:BLOB tag valid XML?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 6:08 am    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

Maybe the problem is that the content of the Q1:BLOB tag is in hexadecimal??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 09, 2007 6:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

soni wrote:
Maybe the problem is that the content of the Q1:BLOB tag is in hexadecimal??


That would cause XML parsing errors, yes...

Have you considered searching around for 'base64'? I think you'll find a nice ESQL shortcut.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 8:27 am    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

I have looked for it but I didn't find it...

If I use something like this:
Code:
SET OutputRoot.XMLNS.*:* = CAST(InputRoot.XMLNS.*:BLOB_BO.*:BLOB AS CHARACTER);


Sorry I am very novice in MQ world

Thanks for everything
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 09, 2007 9:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

http://www.mqseries.net/phpBB2/viewtopic.php?p=192303
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 9:41 pm    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

thanks jefflowrey
Back to top
View user's profile Send private message
soni
PostPosted: Tue Oct 09, 2007 11:34 pm    Post subject: Reply with quote

Novice

Joined: 08 Oct 2007
Posts: 15
Location: Spain

I have tried to use this:
Code:
CREATE PROCEDURE base64Decode(IN source CHAR)
RETURNS BLOB
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.decode";


but WebSphere shows an error when I compile it...

We have a Message Broker v5, is necessary to have v6 to use this external procedure?

If I put:
Code:
CREATE PROCEDURE base64Decode(IN source CHAR)
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.decode";


it's ok when I compile it but I'm not sure that with this way it works well because it's not defined out param...
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Oct 09, 2007 11:48 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

this may help

it supports the usgae of MRM parser

http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=281&thread=131984&cat=9
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Oct 10, 2007 1:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

That method may not exist on that class in v5.

This is an excellent flow to start migrating to v6 with...
_________________
I am *not* the model of the modern major general.
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 » Extract a part of a xmlns
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.