Oracle XML Gateway - 将 XML 映射到 Oracle Apps API - 参数数量或类型错误不匹配错误

发布于 2025-01-07 23:33:21 字数 1963 浏览 3 评论 0原文

XML 网关入站 – 调用 API(PL/SQL 记录类型 IN 变量)将数据插入样本表

我正在使用 XML Gateway 通过以“记录类型”作为参数的过程调用将数据推送到 Oracle Apps。尽管遵循了《Oracle XML Gateway 用户指南》中描述的流程,但我还是收到了“错误编号”或参数类型不匹配错误。

步骤如下:

  1. 我创建了一个示例表 XX_CUST_HIST(ID NUMBER, ACCOUNT_NAME VARCHAR2(50) )、FIRST_NAME VARCHAR2(50)、LAST_NAME VARCHAR2(50)、标题VARCHAR2(50))

  2. 然后我创建了一个包XX_XML_DEMO_API,我们在其中定义了记录类型和过程。

  3. 记录类型 customerRecordType 保存 account_name 、first_name、last_name 和标题。

  4. 过程insert_customer_r需要2个IN参数:

    1. p_ ID 号
    2. p_customer customerRecordType
  5. 该过程将把值插入到 xx_cust_hist 表中

    <前><代码>p_id -> ID p_customer.account_name ->;帐户名称 p_customer.first_name ->;名 p_customer.last_name ->姓 p_customer.title->标题

现在我需要从 XML 网关调用过程 XX_XML_DEMO_API.insert_customer_r

以下是调用该过程的步骤:

  1. 创建 DTD

    元素 NEW_CUSTOMER_APIR (DATAAREA)
    元素数据区域 (CUSTOMER_DATA)
    元素 CUSTOMER_DATA(ID、CUSTOMER_RECORD)
    元素 ID (#PCDATA)
    元素 CUSTOMER_RECORD(ACCOUNT_NAME、FIRST_NAME、LAST_NAME、TITLE)
    元素帐户_名称 (#PCDATA)
    元素 FIRST_NAME (#PCDATA)
    元素 LAST_NAME (#PCDATA)
    元素标题 (#PCDATA)
    
  2. 创建 XML 映射 源和目标的数据定义类型设置为 XML。

    在消息设计器的 post_process 中执行过程 XX_XML_DEMO_API.insert_customer_r 时,它显示 6 个参数,而不是 2 个 (p_id IN number , p_customer IN customerRecordType) 参数 <代码>(p_id IN 数字,p_customer IN customerRecordType,account_name IN varchar2,first_name IN varchar2,last_name IN varchar2,标题IN varchar2)。映射了六个参数,而不是过程真正需要的 2 个。

  3. XML 映射测试。 事务监视器中的错误消息:

    ORA-06550: 第 1 行,第 7 列:PLS-00306: 中的参数数量或类型错误
    调用“INSERT_CUSTOMER_R”ORA-06550:第 1 行,第 7 列: 
    PL/SQL:语句被忽略 - ECX_ACTIONS.BIND_PROC_VARIABLES  
    

进程执行并产生了步骤 3 中给出的错误消息。 标准文档不清楚如何完成此操作。 作为 XML 网关技术的新手,我无法了解错误消息可能是什么以及该过程的哪一步产生了该消息。有人可以帮助我进一步进行吗?

提前致谢。

XML GATEWAY INBOUND – CALLING AN API (PL/SQL record type IN variable) TO INSERT THE DATA INTO SAMPLE TABLE

I am using XML Gateway to push data into Oracle Apps using a procedure call with “Record Type” as the parameter. I am getting a “wrong number” or types of arguments mismatch error inspite of following the process described in the Oracle XML Gateway User’s Guide

Steps followed:

  1. I Created a sample table XX_CUST_HIST(ID NUMBER, ACCOUNT_NAME VARCHAR2(50), FIRST_NAME VARCHAR2(50), LAST_NAME VARCHAR2(50), TITLE VARCHAR2(50))

  2. I then Created a package XX_XML_DEMO_API in which we have defined a record type and a procedure.

  3. The Record type customerRecordType holds account_name , first_name, last_name and the title.

  4. The Procedure insert_customer_r takes 2 IN arguments :

    1. p_ id number
    2. p_customer customerRecordType
  5. The procedure will insert the values into xx_cust_hist table

    p_id -> id
    p_customer.account_name -> account_name
    p_customer.first_name -> first_name
    p_customer.last_name -> last_name
    p_customer.title -> title
    

Now I need to call the procedure XX_XML_DEMO_API.insert_customer_r from XML gateway.

Following are the steps to call the procedure:

  1. Create DTD

    ELEMENT NEW_CUSTOMER_APIR (DATAAREA)
    ELEMENT DATAAREA (CUSTOMER_DATA)
    ELEMENT CUSTOMER_DATA (ID, CUSTOMER_RECORD)
    ELEMENT ID (#PCDATA)
    ELEMENT CUSTOMER_RECORD (ACCOUNT_NAME, FIRST_NAME, LAST_NAME, TITLE)
    ELEMENT ACCOUNT_NAME    (#PCDATA)
    ELEMENT FIRST_NAME (#PCDATA)
    ELEMENT LAST_NAME (#PCDATA)
    ELEMENT TITLE (#PCDATA)
    
  2. Creation of XML map
    Data Definition type for Source and Destination are set to XML.

    While executing the procedure XX_XML_DEMO_API.insert_customer_r in post_process from the message designer, instead of 2 (p_id IN number , p_customer IN customerRecordType) parameters it is showing 6 parameters (p_id IN number, p_customer IN customerRecordType, account_name IN varchar2, first_name IN varchar2, last_name IN varchar2, title IN varchar2). Six parameters are getting mapped, instead of the 2 that the procedure really needs.

  3. Testing of XML map.
    Error message in transaction monitor:

    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in
    call to 'INSERT_CUSTOMER_R' ORA-06550: line 1, column 7: 
    PL/SQL: Statement ignored -           ECX_ACTIONS.BIND_PROC_VARIABLES  
    

The process executed and produced the error message given in the step 3.
The standard documentation is unclear on how this should be done.
Being a newbie to the XML Gateway technology I am unable to get a clue about what the error message could be and which step of the process produced the message. Could anyone help me to proceed further?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文