|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Checking for CData in JCN |
« View previous topic :: View next topic » |
Author |
Message
|
deepnair |
Posted: Wed May 09, 2012 2:00 pm Post subject: Checking for CData in JCN |
|
|
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 |
|
 |
kimbert |
Posted: Wed May 09, 2012 2:59 pm Post subject: |
|
|
 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 |
|
 |
mqjeff |
Posted: Thu May 10, 2012 3:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can't use FolderBitStream from the Java API. |
|
Back to top |
|
 |
deepnair |
Posted: Thu May 10, 2012 6:45 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|