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 » Split xml using blob parser

Post new topic  Reply to topic
 Split xml using blob parser « View previous topic :: View next topic » 
Author Message
souciance
PostPosted: Fri Mar 22, 2013 11:43 am    Post subject: Split xml using blob parser Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

Hello...

I have a case where a system somehow manages to send two xml messages in a single MQ message. This includes xml declarations and root tag that repeat. As the xmlnsc parser cannot parse this I have to parse it as a blob. Then buffer it and split för every end tag.

Just wondering if people have other solutions they can recommend?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Mar 22, 2013 11:48 am    Post subject: Re: Split xml using blob parser Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

souciance wrote:
a system


What system?

Can you send back an error to the originating system?

Are you doing SOAP over MQ?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
adubya
PostPosted: Fri Mar 22, 2013 12:21 pm    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

CAST the BLOB to a char and split on the "<?xml" declaration using SUBSTRING, propagating each substring as an XMLNSC domain msg using some CREATE field PARSE trickery ? ?
Back to top
View user's profile Send private message Send e-mail
souciance
PostPosted: Fri Mar 22, 2013 12:27 pm    Post subject: Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

Yeah we have sent the error but they want us to handle it somehow...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Mar 22, 2013 12:47 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

souciance wrote:
Yeah we have sent the error but they want us to handle it somehow...


XML documents need to be well-formed. If you are presented with an XML payload that is not well-formed, the correct action is to return an error.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri Mar 22, 2013 1:43 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

adubaya's suggestion will work, although it is dependent on the presence of an XML declaration at the start of the second XML message.

I would put the splitting logic into a separate flow - that way, when the originating application gets fixed you can just decommission the splitter flow.
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 » Split xml using blob parser
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.