OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items

osb
bhopal picture bhopal · Oct 30, 2012 · Viewed 12.3k times · Source

I tested the Proxy service in Debug mode in eclipse its working fine but When i test it in Sb console i am facing the above error.

Below is my Xquery

(:: pragma bea:global-element-parameter parameter="$lookupTradeInRequest1" element="ns2:lookupTradeInRequest" location="../../../../../Interfaces/Schemas/DeviceTradeInService.xsd" ::)
(:: pragma bea:global-element-return element="ns0:InputParameters" location="../../../../../../TargetEER/Resources/DBAdapter/LookupTradeIn/xsd/LookupTradeIn_sp.xsd" ::)

declare namespace ns2 = "http://esp.t-mobile.com/mo";
declare namespace ns1 = "http://esp.t-mobile.com/2012/eo";
declare namespace ns0 = "http://xmlns.oracle.com/pcbpel/adapter/db/sp/lookupTradeIn";
declare namespace xf = "http://tempuri.org/ProductManagement/Transformation/DeviceTradeInService/lookupTradeIn/Request/lookupTradeInRequest_To_cancelTradeInDbRequest/";

declare function xf:lookupTradeInRequest_To_cancelTradeInDbRequest($lookupTradeInRequest1 as element(ns2:lookupTradeInRequest))
as element(ns0:InputParameters) {
    <ns0:InputParameters>
        <ns0:POFFERID>{ data($lookupTradeInRequest1/offerId) }</ns0:POFFERID>
        <ns0:PRMAID>{ data($lookupTradeInRequest1/RMANumber) }</ns0:PRMAID>
        <ns0:PACCOUNTNUMBER>{ data($lookupTradeInRequest1/accountNumber) }</ns0:PACCOUNTNUMBER>
        <ns0:PMSISDN>{ data($lookupTradeInRequest1/MSISDN) }</ns0:PMSISDN>
        <ns0:PSERIALNUMBER>{ data($lookupTradeInRequest1/serialNumber) }</ns0:PSERIALNUMBER>
        <ns0:PHIST>{ data($lookupTradeInRequest1/includeHistory) }</ns0:PHIST>
    </ns0:InputParameters>
};

declare variable $lookupTradeInRequest1 as element(ns2:lookupTradeInRequest) external;

xf:lookupTradeInRequest_To_cancelTradeInDbRequest($lookupTradeInRequest1)

Answer

systemhalted picture systemhalted · Dec 13, 2012

The issue is that $lookupTradeInRequest1 doesn't has any thing in it. Check if it is extracted correctly.