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 » Strange Problem using XML.Attr

Post new topic  Reply to topic
 Strange Problem using XML.Attr « View previous topic :: View next topic » 
Author Message
broker_new
PostPosted: Wed Jul 02, 2008 7:08 pm    Post subject: Strange Problem using XML.Attr Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

<Information xmlns="http://www.ibm.com">
<userId>34566775</userId>
</Information>

Iam trying to create the above message using
SET OutputRoot.XMLNSC.Information.(XMLNSC.Attribute)xmlns = 'http://www.ibm.com';
SET OutputRoot.XMLNSC.Information.userId = '34566775';

iam getting the output as
<Information xmlns="" xmlns="http://www.ibm.com">
<userId>34566775</userId>
</Information >

Iam i doing anything wrong.


Last edited by broker_new on Wed Jul 02, 2008 7:55 pm; edited 2 times in total
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed Jul 02, 2008 7:50 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

i have done some more research on this and changed xmlns to xmlns1 its working good.
<Information xmlns1="http://www.ibm.com">
<userId>34566775</userId>
</Information >
Why it is not taking xmlns as attribute or might be a bug in Broker.


Last edited by broker_new on Wed Jul 02, 2008 7:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
sami.stormrage
PostPosted: Wed Jul 02, 2008 7:51 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jun 2008
Posts: 186
Location: Bangalore/Singapore

yeah your tags are incorrect
_________________
*forgetting everything *
Back to top
View user's profile Send private message Yahoo Messenger
broker_new
PostPosted: Wed Jul 02, 2008 7:53 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

I got you.
<Information xmlns="http://www.ibm.com">
<userId>34566775</userId>
</Information>

I copied it wrong
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 02, 2008 7:57 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

broker_new wrote:
i have done some more research on this and changed xmlns to xmlns1 its working good.
<Information xmlns1="http://www.ibm.com">
<userId>34566775</License>
</Information >
Why it is not taking xmlns as attribute or might be a bug in Broker.


Quite obviously you did not disclose the full tree.
Correct placing of tags would show something like:
<Information xmlns1="http://www.ibm.com">
<userId>34566775</userId>
<License></License>
</Information >


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
broker_new
PostPosted: Wed Jul 02, 2008 8:17 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Iam posting you the exact ESQL and the output message
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://staples.com/xsd';
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE cert NAMESPACE 'http://staples.com/certify';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"soap" = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"cert" = 'http://staples.com/certify';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"xsd" = 'http://ibm.com/xsd';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.soap:Body.Information.(XMLNSC.attr)xmlns = 'http://staples.com/certify/UserAdmin';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.soap:Body.Information.UserId = '34566775';

The result is
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cert="http://staples.com/certify"
xmlns:xsd="http://staples.com/xsd">
<soap:Body>
<Information xmlns="" xmlns="http://staples.com/certify/UserAdmin">
<UserId>34566775</UserId>
</Information>
</soap:Body>
</soap:Envelope>
Back to top
View user's profile Send private message
dcjs
PostPosted: Thu Jul 03, 2008 3:37 am    Post subject: Reply with quote

Acolyte

Joined: 10 Nov 2006
Posts: 53
Location: IBM Bangalore

I tried the same as you have done.
MQInput-->Compute---->MQOutput

ComputeNode ESQL is

DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://staples.com/xsd';
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE cert NAMESPACE 'http://staples.com/certify';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"soap" = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"cert" = 'http://staples.com/certify';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.(XMLNSC.NamespaceDecl)xmlns:"xsd" = 'http://ibm.com/xsd';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.soap:Body.Information.(XMLNSC.attr)xmlns = 'http://staples.com/certify/UserAdmin';
SET OutputRoot.XMLNSC.mySoapNS:Envelope.soap:Body.Information.UserId = '34566775';

getting the same output
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cert="http://staples.com/certify"
xmlns:xsd="http://staples.com/xsd">
<soap:Body>
<Information xmlns="" xmlns="http://staples.com/certify/UserAdmin">
<UserId>34566775</UserId>
</Information>
</soap:Body>
</soap:Envelope>

What could be the reason...may be xmlns cannot be used as an attribute,has to be used only for namespaceDeclarations?
_________________
TRY TRY UNTIL U SUCCEED
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 03, 2008 9:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Code:
SET OutputRoot.XMLNSC.entry.(XMLNSC.NamespaceDecl)xmlns:xmlns


The double xmlns:xmlns is the trick. Dunno why.
Back to top
View user's profile Send private message
broker_new
PostPosted: Thu Jul 03, 2008 11:43 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Yes,
I tried almost everything and holding my head now.
It looks to be very very simple singleattribute for Information element.
Its tough to find what is the issue in using xmlns attribute.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 03, 2008 2:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

broker_new wrote:
Yes,
I tried almost everything and holding my head now.
It looks to be very very simple singleattribute for Information element.
Its tough to find what is the issue in using xmlns attribute.

There was something in some note IIRC that said you're not supposed to use the W3 XML notations like namespace and instance (xmlns, xsi) etc ... for anything else but what they were intended for by the W3 and XML boards.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jeeth_m
PostPosted: Fri Jul 04, 2008 5:07 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Try this code.


DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://staples.com/xsd';
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE cert NAMESPACE 'http://staples.com/certify';
DECLARE JME NAMESPACE 'http://staples.com/certify/UserAdmin';

SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"soap" = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"cert" = 'http://staples.com/certify';
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"xsd" = 'http://ibm.com/xsd';

--Default namespace

SET OutputRoot.XMLNS.mySoapNS:Envelope.soap:Body.JME:Information.(XML.NamespaceDecl)xmlns = 'http://staples.com/certify/UserAdmin';
SET OutputRoot.XMLNS.mySoapNS:Envelope.soap:Body.JME:Information.JME:UserId = '34566775';
SET OutputRoot.Properties.MessageDomain = 'XMLNS';

RETURN TRUE;
END;
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
broker_new
PostPosted: Sun Jul 06, 2008 5:17 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Thanks a bunch for the solution jeeth_m.......It worked finally ...
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 » Strange Problem using XML.Attr
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.