none
WCF-Oracle adapter's culture support for decimal RRS feed

  • Question

  • Hi there,

    When attempting to call a basic Oracle function with an array of a user defined record type containing an integer and a decimal, the BizTalk Server 2009 Oracle Adapter throws (re-throws?) an exception indicating the decimal value of 67.0 is invalid. The adapter is unable to correctly translate the value to the appropriate target destination culture (French) which should be 67,0

    The workaround to map to this value forcefully is unacceptable as we usually would not have knowledge of which culture the DB is configured as.

    The error is

    Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The value for field "VALUE" is invalid. ---> System.ArgumentException: ORA-22062: chaîne d'entrée [67.0] non valide
       at Oracle.DataAccess.Types.OracleDecimal..ctor(String numStr, String format)
       at Oracle.DataAccess.Types.OracleDecimal..ctor(String numStr)
       at Microsoft.Adapters.OracleCommon.OracleCommonMetadataUtils.CreateParameterValue(OracleDbType oracleType, Object xmlValue, OracleConnection dbConn, Boolean ignoreLOB, String fieldName)
       --- End of inner exception stack trace ---

    The message sent is

    <ns0:MY_PROC xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/DWH_DEV/Package/DWH_COT_LEGALENTITY_PKG">
      <ns0:IN_LENT_ARRAY>
        <ns1:DWH_COT_LEGALENTITY_PKGMY_RECORDRECORD xmlns:ns1="http://Microsoft.LobServices.OracleDB/2007/03/DWH_DEV/Package/DWH_COT_LEGALENTITY_PKG/MY_PROC">
          <ns1:ID>0</ns1:ID>
          <ns1:VALUE>67.0</ns1:VALUE>
        </ns1:DWH_COT_LEGALENTITY_PKGMY_RECORDRECORD>
      </ns0:IN_LENT_ARRAY>
    </ns0:MY_PROC>

    The pakage spec looks like The

     

    TYPE my_record IS RECORD

    (

     

    Id NUMBER, 

    Value NUMBER(6,4)

    );

     

     

    TYPE cot_my_record_array is TABLE OF my_record INDEX BY

    BINARY_INTEGER;

     

     

    PROCEDURE my_proc (in_lent_array cot_my_record_array);

    Subsequently we also tried to generate custom UDT assemblies via the VS2008 designer, however although the XSD and binding artefacts are created, the actual output dll is not. This is a seperate issue but thought I'd mention it here. Any and all help would be appreciated.

    Many thanks,

    Hein

    Friday, January 13, 2012 3:41 PM

All replies

  • I am not sure the culture/locale information is part of the generated schema. Is the Oracle database or package set to use a locale of French?

    I am not an expert on how the international formats work in Oracle, but is there a way to specify the locale or collation in the package?

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 24, 2012 6:37 PM
    Moderator