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 » Problems With Attach Statement.

Post new topic  Reply to topic
 Problems With Attach Statement. « View previous topic :: View next topic » 
Author Message
Kumar4
PostPosted: Wed Aug 22, 2007 8:14 am    Post subject: Problems With Attach Statement. Reply with quote

Apprentice

Joined: 12 Aug 2007
Posts: 27

Hi,

I have a situration where the XML elements should be attached dynamically. I'm using LocalEnvironment to capture the elements and using ATTACH statement to attach those elements.But the Broker complains as below

BIP2332E: Err
or attaching field '(0x01000010):XMLNS' to field '(0x01000000):Data' which already has a parent.

Is there anyway that I can attach dynamic references to Output Message.?

Below is code

CREATE LASTCHILD OF OutputLocalEnvironment DOMAIN 'XMLNS' FROM InputRoot.XMLNS.Messages.Message.Data.(XML.Element)*;

DECLARE ToBeAttached REFERENCE TO OutputLocalEnvironment.*[<];

ATTACH ToBeAttached TO OutputRoot.XML.Message.Data AS FIRSTCHILD;

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 22, 2007 8:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You've already been told you have to detach it first.

There's really little need to create it in the LocalEnvironment first, and then move it to OutputRoot. You can just create it in OutputRoot in the first place.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
boogey
PostPosted: Wed Aug 22, 2007 2:34 pm    Post subject: Reply with quote

Novice

Joined: 01 Jan 2007
Posts: 21

Do try to get the correct version of the loadable implentation library and try it again
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 22, 2007 3:45 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

boogey wrote:
Do try to get the correct version of the loadable implentation library and try it again


That makes absolutely no sense at all.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Kumar4
PostPosted: Thu Aug 23, 2007 6:20 am    Post subject: Reply with quote

Apprentice

Joined: 12 Aug 2007
Posts: 27

Hi,

Even though, I detach and attach the dynamic refernces. seems like it is stuck at the same error,

following is the error, I still get. Is there any other way of dealing this?
BIP2340E: Err
or attaching field 'XMLNS' to field 'Data' which belongs to a message in a different group.

CREATE LASTCHILD OF InputLocalEnvironment DOMAIN 'XMLNS' FROM InputRoot.XMLNS.Messages.Message.messageData.(XML.Element)*;
DECLARE ToBeAttached REFERENCE TO InputLocalEnvironment.*[<];
DETACH ToBeAttached;
ATTACH ToBeAttached TO OutputRoot.XML.Message.Data AS LASTCHILD;

Please let me know, Could you please brief the explanation. As it helps me to understand it better.

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 23, 2007 6:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

DO NOT create the field in InputLocalEnvironment.

It's not mutable.

Also, why are you trying to attach an XMLNS tree to an XML domain OutputRoot?

And why would you possibly think that it would work?

Please don't use XML domain.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Kumar4
PostPosted: Thu Aug 23, 2007 10:46 am    Post subject: Reply with quote

Apprentice

Joined: 12 Aug 2007
Posts: 27

Thanks for the suggestion.

I changed the group from XML to XMLNS and tried again. This time it gives me the following error:

BIP2340E: Err
or attaching field 'XMLNS' to field 'Data' which belongs to a message in a different group.

I'm not sure where the mistake is , But I could say that the element was attached to the correct group where it supposed to be.

follwoing is the code

CREATE LASTCHILD OF Environment DOMAIN 'XMLNS' FROM InputRoot.XMLNS.Messages.Message.Data.*;
DECLARE ToBeAttached REFERENCE TO Environment.*[<];
DETACH ToBeAttached;
ATTACH ToBeAttached TO OutputRoot.XMLNS.Message.Data AS LASTCHILD;

Is there anything which I overlooked?
Please let me know , btw thanks for your continued support on this


Last edited by Kumar4 on Mon Aug 27, 2007 7:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Thu Aug 23, 2007 9:15 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Can a message be detached from Environment and attached to OutputRoot?
For that matter can we detach and attach message trees from other message trees?
I changed the code to :
Code:
      CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNS' FROM InputRoot.XMLNS.Messages.Message.Data.*;
      DECLARE ToBeAttached REFERENCE TO OutputRoot.*[<];
      DETACH ToBeAttached;
      ATTACH ToBeAttached TO OutputRoot.XMLNS.Message.MIKData AS LASTCHILD;

This is working fine.
However this may not be what you want.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Kumar4
PostPosted: Fri Aug 24, 2007 6:47 am    Post subject: Reply with quote

Apprentice

Joined: 12 Aug 2007
Posts: 27

Hi,

Thanks for the reply, that one works for me.

But the thing is , I get Input data from CDATA structure of a XML Message. I'm pulling out a message from CDATA inside XML.

This code doesnt work for that scenario. As the error shown above follows.

Regards
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 » Problems With Attach Statement.
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.