rss
SOATUBE
Oracle
Custom Search SOABYTE here

Tuesday, January 18, 2011

Delimited String to XML nodeset


















INPUT

  <?xml version="1.0" encoding="UTF-8" ?>
<ns1:process xmlns:ns1="http://xmlns.oracle.com/Application2_jws/delimitedstring/BPELProcess1" xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <ns1:input>a,b,c,d,e</ns1:input>
  </ns1:process>

EXPECTED OUTPUT


<outputVariable>
<part name="payload" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><processResponse xmlns="http://xmlns.oracle.com/Application2_jws/delimitedstring/BPELProcess1">
   <result>a</result>

<result>b</result>
<result>c</result>
<result>d</result>
<result>e</result>
</processResponse>

</part>
</outputVariable>

LOGIC

<assign name="Assign_1">
            <bpelx:copyList>
                <bpelx:from expression="oraext:create-nodeset-from-delimited-string('{http://xmlns.oracle.com/Application2_jws/delimitedstring/BPELProcess1}result',bpws:getVariableData('inputVariable','payload','/client:process/client:input'),',')"/>
                <bpelx:to variable="outputVariable" part="payload"
                          query="/client:processResponse/client:result"/>
            </bpelx:copyList>
        </assign>

6 comments:

Anonymous said...

I have tried using the same steps explained, but I am getting the error as:
XPath query string returns multiple nodes. The assign activity part and query are returning multiple nodes.
But I have used the Assign Copylist operation and my result element is unbounded

Team Fusion said...

Could you send me the project if not yet resolved..

teamfusion.oracle@gmail.com

k said...

I am also getting the error "XPath query string returns multiple nodes". My result element is unbounded. Please help.

Team Fusion said...

For the time being you can try alternate method http://www.soabyte.com/2010/09/convert-comma-delimited-data-to-xml.html .I will have to look into it..Please send the project if possible to soabyte@gmail.com

vivek garg said...

http://soawork.blogspot.in/2012/08/delimited-string-to-xml-in-soa-11g.html

vivek garg said...

Http://soawork.blogspot.com/

Go thourgh "Delimited to XML " post from this blog

Post a Comment

 
Blogger Profile