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 » Assigning XML mesage to Character

Post new topic  Reply to topic
 Assigning XML mesage to Character « View previous topic :: View next topic » 
Author Message
aaron_blade
PostPosted: Thu Jan 21, 2010 9:17 pm    Post subject: Assigning XML mesage to Character Reply with quote

Apprentice

Joined: 21 Dec 2009
Posts: 29

Hi,

I want the below given part of XML to assign to a character varibale. How can I do that?

<rcmt:Topics xmlns:rcmt="http://www.sample.com/1.0/topics">
<rcmt:Document>Topic.Document.ORDERS05</rcmt:Document>
<rcmt:DocumentFormat> Topic.DocumentFormat.Version.1</rcmt:DocumentFormat>
<rcmt:Application>Topic.Application</rcmt:Application>
</rcmt:Topics>

I have given reference till rcmt:topics and then trying to assign this to a character variable.

Below is what I did..
DECLARE rcmt NAMESPACE 'http://www.sample.com/1.0/topics';

SET topics = CAST (ASBITSTREAM(topicRef.rcmt:Topics)AS CHAR ENCODING MQENC_NATIVE);


Here is the error message its throwing

ExceptionList
RecoverableException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp
Line:INTEGER:957
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:ESB_CORE_FLOW#FCMComposite_1_2
Label:CHARACTER:ESB_CORE_FLOW.MQInput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbComputeNode.cpp
Line:INTEGER:464
Function:CHARACTER:ImbComputeNode::evaluate
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:ESB_CORE_FLOW#FCMComposite_1_4
Label:CHARACTER:ESB_CORE_FLOW.Process_Message
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
RecoverableException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp
Line:INTEGER:612
Function:CHARACTER:SqlStatementGroup::execute
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:ESB_CORE_FLOW#FCMComposite_1_4
Label:CHARACTER:ESB_CORE_FLOW.Process_Message
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2488
Text:CHARACTER:Error detected, rethrowing
Insert
Type:INTEGER:5
Text:CHARACTER:.ESB_CORE_FLOW_Compute.Main
Insert
Type:INTEGER:5
Text:CHARACTER:28.4
Insert
Type:INTEGER:5
Text:CHARACTER:SET topics = CAST(ASBITSTREAM(topicRef.rcmt:Topics) AS CHARACTER);
ParserException
File:CHARACTER:F:\build\S610_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCParser.cpp
Line:INTEGER:737
Function:CHARACTER:ImbXMLNSCParser::refreshBitStreamFromElementsCommon
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:ESB_CORE_FLOW#FCMComposite_1_2
Label:CHARACTER:ESB_CORE_FLOW.MQInput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:5010
Text:CHARACTER:XML Writing Errors have occurred
ParserException
File:CHARACTER:F:\build\S610_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCWriter.cpp
Line:INTEGER:880
Function:CHARACTER:ImbXMLNSCWriter::writeMisc
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:5016
Text:CHARACTER:Unexpected XML type at this point in document.
Insert
Type:INTEGER:5
Text:CHARACTER:rcmt[http://www.rei.com/1.0/rcm-topics]
Insert
Type:INTEGER:5
Text:CHARACTER:namespaceDeclType
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 22, 2010 1:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The exception list does not provide the full text of the message. If you are on Windows, you can get the full text from the Event Log. Otherwise you will need to take a user trace, or look up the error message in the infocenter.
When you have it, if you are still stuck, please post the full message.
Back to top
View user's profile Send private message
aaron_blade
PostPosted: Fri Jan 22, 2010 5:28 am    Post subject: Reply with quote

Apprentice

Joined: 21 Dec 2009
Posts: 29

Do you mean you want a complete input msg??
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 22, 2010 5:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I would like to see the full text of the error message. The exception list is not very useful on its own. Sorry for not making that clear.
Back to top
View user's profile Send private message
aaron_blade
PostPosted: Fri Jan 22, 2010 7:50 am    Post subject: Reply with quote

Apprentice

Joined: 21 Dec 2009
Posts: 29

Here is the error msg from event Manager.

( brkqm_broker.default ) The element with name ''rcmt[http://www.rei.com/1.0/rcm-topics]'' and field type ''namespaceDeclType'' is not valid as the child of Root.XML or Root.XMLNSC.

Each child of Root.XMLNSC must represent a valid XML construct for the top level of an XML document. The only field types that are valid in this position are XMLNSC.Comment or XMLNSC.ProcessingInstruction.

Ensure that the message tree is structured correctly, and that each syntax element has a valid field type.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 22, 2010 10:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The ASBITSTREAM function is expecting you to supply the root node of the message tree ( i.e. OutputRoot.XMLNSC ). You are trying to serialize a fragment of a message tree, not the whole tree. Try this:
Code:
SET topics = CAST (ASBITSTREAM(topicRef.rcmt:Topics OPTIONS FolderBitstream ) AS CHAR ENCODING MQENC_NATIVE);
Back to top
View user's profile Send private message
aaron_blade
PostPosted: Fri Jan 22, 2010 11:08 am    Post subject: Reply with quote

Apprentice

Joined: 21 Dec 2009
Posts: 29

Thanks Knight!!

It Worked.
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 » Assigning XML mesage to Character
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.