rss
SOATUBE
Oracle
Custom Search SOABYTE here

Thursday, May 5, 2011

Alternate way of using ora:toCDATA

















About CDATA
All text in an XML document will be parsed by the parser.But text inside a CDATA section will be ignored by the parser.

Recently while using ora:toCDATA I was having using during run-time.

Finally, it worked with the following approach.
1>   
                  1> Paste the following code before the assign activity where ora:toCDATA is being used.

<bpelx:exec name="SetTitle" language="java" version="1.5">");<![CDATA[setTitle((String)getVariableData("Title"));
java.lang.String a = new java.lang.String("<?xml version =\"1.0\"  ?>"); 
       setVariableData("XmlDec",a);]]></bpelx:exec>
2>     
         2>     In assign activity the code will be something like below:--
<copy>
<from expression="ora:toCDATA(concat(bpws:getVariableData('XmlDec'),ora:getContentAsString(bpws:getVariableData('SourceVar','/tns:request)))) "/>
                        <to variable="TargetVar”
                            part="parameters"
                            query="/ns1:response"/>
                    </copy>

And you are done.

0 comments:

Post a Comment

 
Blogger Profile