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 » Problem parsing using ASBITSTREAM

Post new topic  Reply to topic
 Problem parsing using ASBITSTREAM « View previous topic :: View next topic » 
Author Message
PK
PostPosted: Wed Feb 24, 2010 5:20 am    Post subject: Problem parsing using ASBITSTREAM Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

Hi
I am taking a XMLNSC message as input and converting it to Bit stream and adding it to a Message .I am using WMB version 6.1.0.5
While parsing it the output is not having the data .
Following is the code that I have used

DECLARE performanceData BLOB ASBITSTREAM(InputRoot.XMLNSC.Performance ENCODING InputProperties.Encoding CCSID InputProperties.CodedCharSetId OPTIONS FolderBitStream);
SET OutputRoot.SOAP.Body.ns:performanceResponse.performanceData = CAST(performanceData AS BLOB);
DECLARE P1 BLOB OutputRoot.SOAP.Body.ns:performanceResponse.performanceData;
CREATE FIELD Environment.XMLNSC.Performance TYPE Name;
CREATE LASTCHILD OF Environment.XMLNSC.Performance PARSE(P1 ENCODING InputProperties.Encoding CCSID InputProperties.CodedCharSetId OPTIONS FolderBitStream);




THis is the actual data
<Performance>
<Data>
<ProjectId>1234</ProjectId>
<DataSetId>111</DataSetId>
<StatusCode>111</StatusCode>
<StatusDesc>perform1</StatusDesc>
</Data>
</Performance>


This is the what I am getting after parsing ..NO data


( ['MQROOT' : 0x2dc2468]
(0x01000000:Name):XMLNSC = (
(0x01000000:Name):Performance = (
(0x01000000:Name):Root = ( ['MQROOT' : 0x6ff0868]
(0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0x2d0e6c0]
(0x03000000:NameValue):MessageSet = NULL
(0x03000000:NameValue):MessageType = NULL
(0x03000000:NameValue):MessageFormat = NULL
(0x03000000:NameValue):Encoding = NULL
(0x03000000:NameValue):CodedCharSetId = NULL
(0x03000000:NameValue):Transactional = NULL
(0x03000000:NameValue):Persistence = NULL
(0x03000000:NameValue):CreationTime = NULL
(0x03000000:NameValue):ExpirationTime = NULL
(0x03000000:NameValue):Priority = NULL
(0x03000000:NameValue):ReplyIdentifier = NULL
(0x03000000:NameValue):ReplyProtocol = 'SOAP-AXIS2' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = NULL
(0x03000000:NameValue):IdentitySourceType = NULL
(0x03000000:NameValue):IdentitySourceToken = NULL
(0x03000000:NameValue):IdentitySourcePassword = NULL
(0x03000000:NameValue):IdentitySourceIssuedBy = NULL
(0x03000000:NameValue):IdentityMappedType = NULL
(0x03000000:NameValue):IdentityMappedToken = NULL
(0x03000000:NameValue):IdentityMappedPassword = NULL
(0x03000000:NameValue):IdentityMappedIssuedBy = NULL
)
(0x01000000:Name):MQMD =
)
)
)
)


Can anyone tell me is there any problem with the ASBITSTREAM
Ihave tried to use ASBITSTREAM with RootBitStream option and without option also . I that case the Bitstream is not getting created.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 24, 2010 6:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I assume this is the same problem as http://www.mqseries.net/phpBB2/viewtopic.php?t=52659. If nobody is replying to your thread, a polite 'any ideas?' usually works well - on the original thread.

I suggest that you split the problem into its two parts. Check that the BLOB which you are creating is correct. You can do that easily by CASTing it as CHARACTER and then inspecting it via a Trace node or the debugger.

Quote:
Ihave tried to use ASBITSTREAM with RootBitStream option and without option also . I that case the Bitstream is not getting created.
ASBITSTREAM does not just fail silently. What error(s) did you get? ( take a user trace, or look in Windows event viewer ).
Back to top
View user's profile Send private message
PK
PostPosted: Wed Feb 24, 2010 8:36 am    Post subject: Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

kimbert wrote:
I assume this is the same problem as http://www.mqseries.net/phpBB2/viewtopic.php?t=52659. If nobody is replying to your thread, a polite 'any ideas?' usually works well - on the original thread.

I suggest that you split the problem into its two parts. Check that the BLOB which you are creating is correct. You can do that easily by CASTing it as CHARACTER and then inspecting it via a Trace node or the debugger.

Quote:
Ihave tried to use ASBITSTREAM with RootBitStream option and without option also . I that case the Bitstream is not getting created.
ASBITSTREAM does not just fail silently. What error(s) did you get? ( take a user trace, or look in Windows event viewer ).




Thanks for your advice.I will keep dat in mind .
Back to top
View user's profile Send private message
vairavan
PostPosted: Wed Feb 24, 2010 1:21 pm    Post subject: Reply with quote

Apprentice

Joined: 22 Apr 2008
Posts: 42

This code perfectly works... Try having a MQ output node after this ESQL part. I am able to see the output in the queue.

Code:
CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN      
      DECLARE ns NAMESPACE 'http://www.company.com';
      DECLARE performanceData BLOB
         ASBITSTREAM(InputRoot.XMLNSC.Performance
         ENCODING InputProperties.Encoding
         CCSID InputProperties.CodedCharSetId
         OPTIONS FolderBitStream);      
      SET OutputRoot.SOAP.Body.ns:performanceResponse.performanceData =
         performanceData;      
      DECLARE P1 BLOB OutputRoot.SOAP.Body.ns:performanceResponse.performanceData;
      CREATE FIELD Environment.XMLNSC.Performance TYPE Name;
      CREATE LASTCHILD OF Environment.XMLNSC.Performance
         PARSE(P1 ENCODING InputProperties.Encoding
                CCSID InputProperties.CodedCharSetId
                OPTIONS FolderBitStream);
      RETURN TRUE;
   END;



Output:
Code:
<SOAP_Domain_Msg>
 <Body>
  <NS1:performanceResponse xmlns:NS1="http://www.company.com">
   <performanceData>3c506572666f726d616e63653e3c446174613e3c50
726f6a65637449643e313233343c2f50726f6a65637449643e3c446174
6153657449643e3131313c2f4461746153657449643e3c53746174757
3436f64653e3131313c2f537461747573436f64653e3c5374617475734
46573633e706572666f726d313c2f537461747573446573633e3c2f446
174613e3c2f506572666f726d616e63653e</performanceData>
  </NS1:performanceResponse>
 </Body>
</SOAP_Domain_Msg>

[edit]edited for readability[/edit]
Back to top
View user's profile Send private message
PK
PostPosted: Thu Feb 25, 2010 3:02 am    Post subject: Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

Hi ,
I have converted the BLOB data to CHAR its showin proper ata . I cudnt understnd wats happening while parsing its not retrieving any data.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Feb 25, 2010 3:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Experiment with using RootBitstream mode instead of FolderBitstream. Look in the event log to see whether there are any error messages. Take a user trace to see why the parse is failing.
These are basic diagnostic procedures for any message flow developer - you should be doing them automatically.
Back to top
View user's profile Send private message
PK
PostPosted: Thu Feb 25, 2010 4:58 am    Post subject: Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

kimbert wrote:
Experiment with using RootBitstream mode instead of FolderBitstream. Look in the event log to see whether there are any error messages. Take a user trace to see why the parse is failing.
These are basic diagnostic procedures for any message flow developer - you should be doing them automatically.


I have tried with RootStream as well in that case I am getting error while parsing.
It saying its a folder type

I am getting confused with This parsing with RootBitStream and FolderBitStream options. Though I have read some document regarding that but I really cudnt understand why its saying it as Folder type though its a simple XML message and I am pointing to the root of the message while RootBitstream.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Feb 25, 2010 5:26 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

have you followed kimbert's suggestion and taken a user trace of the messagee as itis Parsed? This will show much more detail about the actual error. Don't forget to disconnect any debugger session first.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
PK
PostPosted: Thu Feb 25, 2010 11:19 pm    Post subject: Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

[quote="smdavies99"]have you followed kimbert's suggestion and taken a user trace of the messagee as itis Parsed? This will show much more detail about the actual error. Don't forget to disconnect any debugger session first.[/quote]
I have used trace and seen in event viewer as well ,its having problem in creating the proper XMLNSC structure.

The element with name ''Data'' and field type ''folderType'' is not valid as the child of Root.XML or Root.XMLNSCach 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.

Can any one tell me wat can be the reason?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Feb 25, 2010 11:38 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Would you like to add a trace node after the compute node and post here the output of the ${Root} tree? This I am sure would help us to understand your problem.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
PK
PostPosted: Fri Feb 26, 2010 3:21 am    Post subject: Reply with quote

Novice

Joined: 22 Feb 2010
Posts: 12

[quote="smdavies99"]Would you like to add a trace node after the compute node and post here the output of the ${Root} tree? This I am sure would help us to understand your problem.[/quote]

I have checked it after parsing it in that compute node its parsing properly .Actually I am sending BLOB data as a SOAP response .When I am getting that response from SOAPRequest node the BLOB is not coming properly.What could be the reason ?
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 26, 2010 3:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need to go back to basics. The task you are trying to accomplish is fairly simple, and many users of this forum have got it to work.

I suggest that you solve this yourself now. Use the diagnostic techniques recommended ( trace nodes and user trace ) and solve the problem one step at a time. Read error messages in full, and try to do what they recommend.
If you *really* cannot work out what's going wrong, describe the problem accurately, tell us what you have done to diagnose it, and provide the full text of any error messages.
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 » Problem parsing using ASBITSTREAM
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.