title: Oracle XML Gateway- Mapping XML to Oracle Apps API - Wrong Number or types of arguments mismatch error
body: <h3>XML GATEWAY INBOUND – CALLING AN API (PL/SQL record type IN variable) TO INSERT THE DATA INTO SAMPLE TABLE</h3>
  
  <p>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 </p>
  
  <p>Steps followed:</p>
  
  <ol>
  <li><p>I Created a sample table <code>XX_CUST_HIST(ID NUMBER, ACCOUNT_NAME VARCHAR2(50), FIRST_NAME VARCHAR2(50), LAST_NAME VARCHAR2(50), TITLE VARCHAR2(50))</code></p></li>
  <li><p>I then Created a package <code>XX_XML_DEMO_API</code> in which we have defined a record type  and   a procedure.</p></li>
  <li><p>The Record type <code>customerRecordType</code>  holds account_name , first_name, last_name and the title.</p></li>
  <li><p>The Procedure <code>insert_customer_r</code>  takes 2 IN arguments :  </p>
  
  <ol>
  <li>p_ id  number </li>
  <li>p_customer customerRecordType</li>
  </ol></li>
  <li><p>The procedure will insert the values into xx_cust_hist table</p>
  
  <pre><code>p_id -&gt; id
  p_customer.account_name -&gt; account_name
  p_customer.first_name -&gt; first_name
  p_customer.last_name -&gt; last_name
  p_customer.title -&gt; title
  </code></pre></li>
  </ol>
  
  <p>Now I need to call the procedure <code>XX_XML_DEMO_API.insert_customer_r</code>  from XML gateway.</p>
  
  <p>Following are the steps to call the procedure:</p>
  
  <ol>
  <li><p>Create  DTD </p>
  
  <pre><code>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)
  </code></pre></li>
  <li><p>Creation of XML map
  Data Definition type for Source and Destination are set to XML.</p>
  
  <p>While executing the procedure <code>XX_XML_DEMO_API.insert_customer_r</code> in post_process from the message designer, instead of 2 <code>(p_id IN   number , p_customer IN customerRecordType)</code> parameters it is showing  6 parameters <code>(p_id IN number, p_customer IN customerRecordType, account_name IN varchar2, first_name IN varchar2, last_name IN varchar2, title IN varchar2)</code>. Six parameters are getting mapped, instead of the 2 that the procedure really needs.</p></li>
  <li><p>Testing of XML map.
  Error message in transaction monitor: </p>
  
  <pre><code>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  
  </code></pre></li>
  </ol>
  
  <p>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?</p>
  
  <p>Thanks in advance.</p>