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 » ParserException : when sending XMLNSC to MQOutput Node

Post new topic  Reply to topic
 ParserException : when sending XMLNSC to MQOutput Node « View previous topic :: View next topic » 
Author Message
shashivarungupta
PostPosted: Tue Aug 26, 2014 3:08 pm    Post subject: ParserException : when sending XMLNSC to MQOutput Node Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Hi,

As a part of some message flow designing.. I am getting a silly ParserException.

Code:
ParserException
   File:CHARACTER:F:\build\slot1\S800_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCWriter.cpp
   Line:INTEGER:953
   Function:CHARACTER:ImbXMLNSCWriter::writeMisc
   Type:CHARACTER:
   Name:CHARACTER:
   Label:CHARACTER:
   Catalog:CHARACTER:BIPmsgs
   Severity:INTEGER:3
   Number:INTEGER:5016
   Text:CHARACTER:Unexpected XML type at this point in document.
   Insert
         Type:INTEGER:5
         Text:CHARACTER:Response
   Insert
         Type:INTEGER:5
         Text:CHARACTER:folderType


Following is the code, where some fields are coded with ESQL to generate an XMLNSC output message to the MQOutput Node, which is directly connected to the Out Terminal of this Compute Node 'PositiveMessageBuilding'. The compute mode of the compute node is set to have 'Message'.

Quote:
CREATE COMPUTE MODULE MechanismMFlow1_PositiveMessageBuilding
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET Environment.MQMD = InputRoot.MQMD;

CALL CopyEntireMessage();

-- LOGIC BLOCK STARTS
DECLARE FN CHARACTER NULL;
SET FN = InputRoot.XMLNSC.DETAILS.PERSONAL.NAME.FIRSTNAME ;

SET OutputRoot.XMLNSC.Response.Agreed VALUE = 'YES';
-- LOGIC BLOCK ENDS

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;


Any suggestion.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Tue Aug 26, 2014 5:01 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

My bad, I didn't supply the input message(example) with the question(OP) earlier, to make the things more clear.

Quote:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DETAILS>
<PERSONAL>
<NAME>
<FIRSTNAME>abc</FIRSTNAME>
<MIDDLENAME>def</MIDDLENAME>
<LASTNAME>ghi</LASTNAME>
</NAME>
<PRIMARYAPPLICANT>Y</PRIMARYAPPLICANT>
<FAMILYMEMBERS>3</FAMILYMEMBERS>
<DOB>18122014</DOB>
</PERSONAL>
</DETAILS>

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
vishnurajnr
PostPosted: Tue Aug 26, 2014 6:07 pm    Post subject: Reply with quote

Centurion

Joined: 08 Aug 2011
Posts: 134
Location: Trivandrum

Quote:
CALL CopyEntireMessage();
.....
SET OutputRoot.XMLNSC.Response.Agreed VALUE = 'YES';


This statement is causing the issue since it will create two XML Root elements which is not as per the XML standards.

It can be like :
Quote:
SET OutputRoot.XMLNSC.DETAILS.Response.Agreed VALUE = 'YES';
Back to top
View user's profile Send private message Visit poster's website
shashivarungupta
PostPosted: Tue Aug 26, 2014 6:52 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

vishnurajnr wrote:
Quote:
CALL CopyEntireMessage();
.....
SET OutputRoot.XMLNSC.Response.Agreed VALUE = 'YES';


This statement is causing the issue since it will create two XML Root elements which is not as per the XML standards.

It can be like :
Quote:
SET OutputRoot.XMLNSC.DETAILS.Response.Agreed VALUE = 'YES';



Thanks a lot for this valuable input.

And if I don't take the Payload/Message Data from InputRoot by calling CopyEntireMessage() to OutputRoot ., and wanted to set the new XML Root field to the output message, how that can be done ?
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Tue Aug 26, 2014 7:59 pm    Post subject: Reply with quote

Grand High Poobah

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

The same way you assign part A of the input tree to part B of the output tree.
You should be able to find enough examples for instance in the SOAP examples with the SOAP extract subflows...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ParserException : when sending XMLNSC to MQOutput Node
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.