This discussion is archived
5 Replies Latest reply: Mar 5, 2013 2:48 PM by vladodias RSS

'Write' failed due to: Translation Error.

akdasari Newbie
Currently Being Moderated
Hi
I'm trying to convert csv and write to a file using FielAdapters in 11g. While reading input i created .xsd using native builder. and using same for write fileadapter. my flow is ReadFileAdapter-->Receive-->invoke-->writeFileAdapter.
Is this right? when I deploy and run I'm getting

<01-Mar-2013 10:09:23 o'clock GMT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> ReadInput ReadInputAdapter Service ReadInput was unable to perform delivery of inbound message to the composite default/ReadWriteFile!1.0*soa_40862c80-62ba-4425-b7e6-5fcfb5c5b4e4 due to: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Write' failed due to: Translation Error.
Translation Error.
Error while translating message to native format.
Please make sure that the payload for the outbound interaction conforms to the schema.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</summary>
,detail=<detail>Element not completed: 'TestRoot'</detail>
,code=<code>null</code>}
>

I want to convert csv and write as an xml to output file. can some body help me whats is wrong?

here is my xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/ReadInput"
targetNamespace="http://TargetNamespace.com/ReadInput"
elementFormDefault="qualified"
attributeFormDefault="unqualified"

nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="US-ASCII"
>


<xsd:element name="TestRoot">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TestRecord" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="C1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="C4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:schema>

and csv file
12, John, ryegate, Essex
23, Will, wilow, orlean

I also tried inbuild advane function on invoke activity
ora:doTranslateFromNative(bpws:getVariableData('ReceiveInput_Read_InputVariable'),'xsd/Hello2_8.xsd','Test','DOM')

even this didn't work.

can somebody help me how to write as xml from csv?
Thanks

Edited by: user11132693 on Mar 1, 2013 3:01 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points