3 Replies Latest reply on Feb 11, 2013 8:18 PM by 974733

    OSB transformation error- BEA-382513- Error parsing XML

    974733
      Hi Gurus -

      I am struggling to fix one OSB Xquery transformation error

      <con:errorCode>BEA-382513</con:errorCode>
      <con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items

      I am passing SIL formatted data to this transformation an expecting a transformation but its keep on failing, I have tested the transformation and thats looking good.

      This is my replace operation where I am doing transformation.

      Replace [ node contents ] of [ ./* ]
      in [ body ] with

      XQuery Resource: TestProject/Common/Transformation/XQJMS2DBTransformation
      Variable Names And Bindings:
      commonInterfaceLayout1 - $body/*:CommonInterfaceLayout




      transformation file
      ------

      (:: pragma bea:global-element-parameter parameter="$commonInterfaceLayout1" element="ns0:CommonInterfaceLayout" location="../../Common/Schema/CommonInterfaceLayout.xsd" ::)
      (:: pragma bea:global-element-return element="ns1:EaiAuditCollection" location="../../Common/Schema/XSD_InsertEAIAuditDBTable.xsd" ::)

      declare namespace ns1 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertEAIAuditDBTable";
      declare namespace ns0 = "http://eai.fpl.com/schema/CommonInterfaceLayout";
      declare namespace xf = "http://tempuri.org/ErrorHandlingR1V1/XQJMS2DB/";

      declare function xf:XQJMS2DB($commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout))
      as element(ns1:EaiAuditCollection) {
      <ns1:EaiAuditCollection>
      <ns1:EaiAudit>
      <ns1:eaiAuditId></ns1:eaiAuditId>
      <ns1:messageId>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageId) }</ns1:messageId>
      <ns1:messageDate>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageReceivedDate) }</ns1:messageDate>
      <ns1:messageType>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageType) }</ns1:messageType>
      <ns1:messageSource>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageSource) }</ns1:messageSource>
      <ns1:messageTarget>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageTarget) }</ns1:messageTarget>
      <ns1:appUniqId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ApplicationUniqueId) }</ns1:appUniqId>
      <ns1:payload>{ data($commonInterfaceLayout1/ns0:Body) }</ns1:payload>
      <ns1:componentName>{ data($commonInterfaceLayout1/ns0:Header/ns0:ComponentName) }</ns1:componentName>
      <ns1:clientId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ClientId) }</ns1:clientId>
      <ns1:createDate>{ fn:current-date() }</ns1:createDate>
      <ns1:processFlag></ns1:processFlag>
      </ns1:EaiAudit>
      </ns1:EaiAuditCollection>
      };

      declare variable $commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout) external;
      xf:XQJMS2DB($commonInterfaceLayout1)



      pls advice whats wrong I am doing here.

      Edited by: KumarB on Feb 7, 2013 9:56 PM