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 » Converting XMLNS to XML

Post new topic  Reply to topic
 Converting XMLNS to XML « View previous topic :: View next topic » 
Author Message
fmv0202
PostPosted: Mon Jun 11, 2007 10:49 am    Post subject: Converting XMLNS to XML Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 28

Hello,

I'm currently using WBI MB v5 FP8 and am trying to figure out how to convert XMLNS to XML. I have an incoming message which needs to be formatted in XML without the namespace. The incoming message originally is a soap message which is successfully decoded into a XMLNS message with Support Pack IA81. Can anyone point me in the right direction?

Thanks.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Jun 11, 2007 10:57 am    Post subject: Re: Converting XMLNS to XML Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

In my opinion it is better to remove namespaces from XMLNS rather than convert domain from XMLNS to XML.

When you convert domain from XMLNS to XML new tag name will be created by concatenating namespace and original tag.
_________________
Marcin


Last edited by marcin.kasinski on Mon Jun 11, 2007 10:59 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Mon Jun 11, 2007 10:59 am    Post subject: Re: Converting XMLNS to XML Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ESQL code doing this you can find in this forum:


Code:
CREATE PROCEDURE StripNamespaces(IN StartRefPtr REFERENCE)
BEGIN
DECLARE FieldRefPtr REFERENCE TO StartRefPtr;

MOVE FieldRefPtr FIRSTCHILD;
IF LASTMOVE(FieldRefPtr) THEN
IF FIELDTYPE(FieldRefPtr) IN (0x01000000, 0x03000000) THEN
SET FieldRefPtr.(XML.NamespaceDecl)* = NULL;
SET FieldRefPtr NAMESPACE = '';
END IF;
END IF;

WHILE LASTMOVE(FieldRefPtr) DO
CALL StripNamespaces(FieldRefPtr);
IF FIELDTYPE(FieldRefPtr) IN (0x01000000, 0x03000000) THEN
SET FieldRefPtr.(XML.NamespaceDecl)* = NULL;
SET FieldRefPtr NAMESPACE = '';
END IF;
MOVE FieldRefPtr NEXTSIBLING;
END WHILE;
END;


_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Jun 11, 2007 11:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In my opinion, it's better to fix the broken code that can't honor or ignore the namespaces.

Would you convert Java code to all run in the default package, if you had a version control system that couldn't handle java packages?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Jun 11, 2007 11:23 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
In my opinion, it's better to fix the broken code that can't honor or ignore the namespaces.

Would you convert Java code to all run in the default package, if you had a version control system that couldn't handle java packages?




Hm,

It is correct in perfect world

... but not always.

I remember we had requirement to change WS request (with namespaces) to MQ legacy application (without namespaces).

We couldn't change legacy application code.

In this situation we removed namespaces from WS message and sent this message with little modification to legacy application.
This is role of MB also.
_________________
Marcin


Last edited by marcin.kasinski on Mon Jun 11, 2007 11:39 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Jun 11, 2007 11:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

marcin.kasinski wrote:
This is role of MB also.


Yes, it's the role of MB in an enterprise to allow applications to only support a single data format with the rest of the enterprise - that broker will transform input and output for that application to.

But one reason for doing this is so you can change that interface (i.e., modernize it) without changing anything OTHER than broker.

And it should be very easy to convert something that already speaks XML to being something that supports XML with namespaces - even if it has to ignore the namespaces.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fmv0202
PostPosted: Mon Jun 11, 2007 11:35 am    Post subject: Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 28

You are the man and those are exactly my requirements!!
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 » Converting XMLNS to XML
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.