Call a UDF inside an Oracle Adpater message

Home Page Forums BizTalk 2004 – BizTalk 2010 Call a UDF inside an Oracle Adpater message

Viewing 1 reply thread
  • Author
    Posts
    • #17350
      Hi

      I have an Oracle DB with a function that can be used inside an insert
      statement

      Such that

      insert into CDI_SOR_DEFS (EX_SOR_NUM, SOR_REF, SOURCE_CODE,
      CATALOGUE_SOURCE) values(DECODE(customer_card_loc(31,null,null),null,31 ,null),
      'TEST','TEST','TEST')

      (customer_card_loc() – is the function)

      This works fine in SQLPlus however when i try and call this function
      through Biztalk and an XML message

      such that

      <ns0:Insert
      xmlns:ns0="http://schemas.microsoft.com/[OracleDb://LFC/CDI/Tables/CDI_SOR_DEFS]"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ns0:Rows>
            <ns0:InsertRecord>
              <ns0:EX_SOR_NUM>DECODE(customer_card_loc(31,null,null ),null,31
      ,null)
      </ns0:EX_SOR_NUM>
              <ns0:SOR_REF>506003</ns0:SOR_REF>
              <ns0:SOURCE_CODE>W</ns0:SOURCE_CODE>
              <ns0:CATALOGUE_SOURCE>CATALOGUE</ns0:CATALOGUE_SOURCE>
             </ns0:InsertRecord>
      </ns0:Rows>
      </ns0:Insert>

      It fails

      Any pointers would be great

      Thanks

      Simon

    • #17354

      Is the Xsd type for "ns0:EX_SOR_NUM" xs:int?  If so, I would suspect your error is from validation.

      If it's string, I would suspect you are receiving an Oracle error.  Can you confirm and respond with any errors related to this issue?

      I haven't had any luck calling functions directly, but sprocs within a package (Oracle 9i/10g) work fine.  The Stored Procedure approach could be an option for you, but I'm not yet sure if you can achieve your desired results of passing a function directly.  I'd like to try it myself and see if we can compare notes.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.