title: Is it possible to have output mapping optional in WSO2 data services?
body: <p>I have Oracle stored procedure which has Oracle REF CURSOR as OUT parameter. When data is present in the DB, one select statement is executed and REF CURSOR will have columns from the select statements mapped which can be accessed in the OUTPUT mapping of the data service.  However when there is no data for corresponding input to stored procedure different select statement is executed. This second SELECT statement has different set of columns. (In short Either of 2 selects statements are executed depending upon input to stored procedure with different set of columns in both select statements)</p>
  
  <p>Since we define the output mapping with DB columns in Data service and in this scenario since different select statments, with different set of columns, are getting executed, data service is unable to find all the columns defined in the output mapping every time I execute the stored procedure hence I get following error</p>
  
  <pre><code>&lt;axis2ns19:DataServiceFault xmlns:axis2ns19="http://ws.wso2.org/dataservice"&gt;Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processStoredProcQuery'
  DS Code: DATABASE_ERROR
  Source Data Service:-
  Name: GET_USER_DS
  Location: /GET_USER_DS.dbs
  Description: N/A
  Default Namespace: http://ws.wso2.org/dataservice
  Current Request Name: USER_op
  Current Params: {in_user_id=111111111}
  Nested Exception:-
  DS Fault Message: Error in 'StaticOutputElement.execute', cannot find parameter with type:column name:DASHBOARDID
  DS Code: INCOMPATIBLE_PARAMETERS_ERROR
  "
  </code></pre>
  
  <p>Is there any way to define optional output mapping for the Data serivces so that even though column in the output mapping is not available in returned result set I will not get this error? </p>
  
  <p>Please let me know.
  thanks
  Abhijit</p>