Paras
Paras

Reputation: 338

how to save payload of soa composite to xml file?

i am working on oracle SOA project in which i want to save csv data to XML file. till now i got the payload in form of xml using Translate activity but i can only use it directly. I want to save the pay load to xml file.

i am facing following error :

<?xml version="1.0" encoding="UTF-8"?><bpelFault>
   <faultType>0</faultType>
   <subLanguageExecutionFault xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
      <part name="summary">
         <summary>An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("../Transformations/Transformation.xsl", $Receive_Read_InputVariable.body)</summary>
      </part>
      <part name="code">
         <code>XPath expression failed to execute</code>
      </part>
      <part name="detail">
         <detail>XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("../Transformations/Transformation.xsl", $Receive_Read_InputVariable.body)
The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/CSV_To_XML_rev1.0/Transformations/Transformation.xsl&lt;Line 30, Column 109&gt;: XML-22031: (Error) Variable not defined: 'oracle_empty_param'.
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
</detail>
      </part>
   </subLanguageExecutionFault>
</bpelFault>

I am working with oracle soa suite 12c.

Upvotes: 0

Views: 992

Answers (1)

Sam Donato
Sam Donato

Reputation: 481

It sounds like you want to convert a variable to a string. I would use an XSL transform. Input to the transform would be your newly translated variable and the output be a plain old String variable. The transform would look like this:

  <xsl:template match="/">
    <tns:myString>
      <xsl:copy-of select="/ns0:RootElement"/>
    </tns:myString>
  </xsl:template>

If you wanted to, you could then write this string to the file adapter

Upvotes: 0

Related Questions