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 » Checking for CData in JCN

Post new topic  Reply to topic
 Checking for CData in JCN « View previous topic :: View next topic » 
Author Message
deepnair
PostPosted: Wed May 09, 2012 2:00 pm    Post subject: Checking for CData in JCN Reply with quote

Apprentice

Joined: 07 Feb 2012
Posts: 35

Hi - I have the esql code as below
Code:

   
      IF  FIELDTYPE(InputRoot.XMLNSC.*:Envelope.*:Body) = XMLNSC.CDataField THEN
         SET TempBlob = ASBITSTREAM(InputRoot.XMLNSC.*:Envelope.*:Body.(XMLNSC.CDataField),InputRoot.Properties.Encoding,InputRoot.Properties.CodedCharSetId,'','','',FolderBitStream);         
      ELSE
         SET TempBlob = ASBITSTREAM(InputRoot.XMLNSC.*:Envelope.*:Body,InputRoot.Properties.Encoding,InputRoot.Properties.CodedCharSetId,'','','',FolderBitStream);                  
      END IF;
      SET SoapBodyString = CAST(TempBlob AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);


This code checks if there is Cdata in Body if yes it processes in a particular way - how can we implement the same in JAVA in JCN ?

Thanks
Deep Nair
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 09, 2012 2:59 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

It certainly does process it in a 'particular' way - but I am struggling to understand why. Can you explain why you are not just doing this?
Code:
SET SoapBodyString = InputRoot.XMLNSC.*:Envelope.*:Body;


btw, this ESQL path ref is wrong:
Code:
InputRoot.XMLNSC.*:Envelope.*:Body.(XMLNSC.CDataField)
You should write this instead:
Code:
InputRoot.XMLNSC.*:Envelope.(XMLNSC.CDataField)*:Body
...but I don't think you need to write either of those ( see my first comment above ).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 10, 2012 3:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can't use FolderBitStream from the Java API.
Back to top
View user's profile Send private message
deepnair
PostPosted: Thu May 10, 2012 6:45 am    Post subject: Reply with quote

Apprentice

Joined: 07 Feb 2012
Posts: 35

Quote:
Kimbert
It certainly does process it in a 'particular' way - but I am struggling to understand why. Can you explain why you are not just doing this?
SET SoapBodyString = InputRoot.XMLNSC.*:Envelope.*:Body;


Its because the Body will contain an XML inside either with CData or without CData, something like
Code:
<ns1:Body><Emp><test>check</test></Emp></ns1:Body>
OR
Code:
<ns1:Body><CData>[[<Emp><test>check</test></Emp>]]</ns1:Body>


Quote:
Kimbert
btw, this ESQL path ref is wrong: Code:
InputRoot.XMLNSC.*:Envelope.*:Body.(XMLNSC.CDataField)
You should write this instead: Code:
InputRoot.XMLNSC.*:Envelope.(XMLNSC.CDataField)*:Body

The body contains a CData but the Body Tag is not inside CData like in the above example.
Please suggest if this is not the correct approach.
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 » Checking for CData in JCN
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.