title: WSO2 DATA SERVICES Nested Querys. How can i
body: <p>we have three querys, one select and two insert queries. 
  We have to execute the select query and it returns a row with four fields.
  Then we have to use these four fields to excute the inserts querys.
  Select query works fine, but when WSO2 ESB try to execute the next nested query fails, and show the next error </p>
  
  <pre><code>Unable to sendViaPost to url[http://6f478fba7fca:8280/services/...........SOAP12Endpoint] {org.apache.axis2.transport.http.HTTPSender
  </code></pre>
  
  <p>This is the xml about our data service.</p>
  
  <pre><code>&lt;query id="updateASMCRRN" useConfig="DATABASE1_PRE"&gt;
        &lt;sql&gt;UPDATE BOSA_ASMCRRCN SET RT_COD=:RT_COD, SET RT_DATE_DAT=to_date(:RT_DATE_DAT,'YYYY-MM-DD HH:MI:SS'), WHERE SUMMON_COD=:SUMMON_COD AND SUMREQ_SEQTMP=:SUMREQ_SEQTMP&lt;/sql&gt;
        &lt;param name="RT_COD" sqlType="STRING"/&gt;
        &lt;param name="RT_DATE_DAT" sqlType="STRING"/&gt;
        &lt;param name="SUMMON_COD" sqlType="STRING"/&gt;
        &lt;param name="SUMREQ_SEQTMP" sqlType="INTEGER"/&gt;
     &lt;/query&gt;
  </code></pre>
  
  <p>......</p>
  
  <pre><code>&lt;query id="selectNewSol" useConfig="DATABASE2_PRE"&gt;
        &lt;sql&gt;SELECT  s.NUMEROREGISTRO, to_char(s.FECHA,'YYYY-MM-DD HH:MI:SS') AS FECHA, v1.C_CLAVE_ID, v1.A_VALOR AS SUMMON_COD, v2.C_CLAVE_ID, v2.A_VALOR AS SUMREQ_SEQTMP FROM  adel.ae_solicitudes s, adel.ae_valores v1, adel.ae_valores v2 WHERE s.CODFORMULARIO='1057' AND s.B_PROCESADA=1  AND s.NUMEROREGISTRO = v1.NUMEROREGISTRO   AND v1.C_CLAVE_ID='.SUMMON_COD' AND s.NUMEROREGISTRO = v2.NUMEROREGISTRO  AND v2.C_CLAVE_ID='.SUMREQ_SEQTMP'&lt;/sql&gt;
        &lt;sql dialect="oracle"&gt;SELECT  s.NUMEROREGISTRO, to_char(s.FECHA,'YYYY-MM-DD HH:MI:SS') AS FECHA, v1.C_CLAVE_ID, v1.A_VALOR AS SUMMON_COD, v2.C_CLAVE_ID, v2.A_VALOR AS SUMREQ_SEQTMP FROM  adel.ae_solicitudes s, adel.ae_valores v1, adel.ae_valores v2 WHERE s.CODFORMULARIO='1057' AND  s.B_PROCESADA=1 AND s.NUMEROREGISTRO = v1.NUMEROREGISTRO  AND v1.C_CLAVE_ID='.SUMMON_COD' AND s.NUMEROREGISTRO = v2.NUMEROREGISTRO AND v2.C_CLAVE_ID='.SUMREQ_SEQTMP'&lt;/sql&gt;
        &lt;result element="Solicitudes" rowName="Solicitud"&gt;
           &lt;element export="SUMMON_COD" name="SUMMON_COD" query-param="SUMMON_COD" xsdType="string"/&gt;
           &lt;element export="RT_COD" name="RT_COD" query-param="NUMEROREGISTRO" xsdType="string"/&gt;
           &lt;element export="RT_DATE_DAT" name="RT_DATE_DAT" query-param="FECHA" xsdType="string"/&gt;
           &lt;element export="SUMREQ_SEQTMP" name="SUMREQ_SEQTMP" query-param="SUMREQ_SEQTMP" xsdType="integer"/&gt;
           &lt;call-query href="updateASMCRRN"&gt;
              &lt;with-param name="RT_COD" query-param="NUMEROREGISTRO"/&gt;
              &lt;with-param name="RT_DATE_DAT" query-param="FECHA"/&gt;
              &lt;with-param name="SUMMON_COD" query-param="SUMMON_COD"/&gt;
              &lt;with-param name="SUMREQ_SEQTMP" query-param="SUMREQ_SEQTMP"/&gt;
           &lt;/call-query&gt;
        &lt;/result&gt;
     &lt;/query&gt;
     &lt;operation name="selectNewSol"&gt;
        &lt;call-query href="selectNewSol"/&gt;
     &lt;/operation&gt;
  </code></pre>
  
  <p>Now this is the error:</p>
  
  <pre><code> ERROR {org.apache.synapse.transport.passthru.PassThroughHttpSender} -  Failed to submit the response {org.apache.synapse.transport.passthru.PassThroughHttpSender}
  org.apache.axis2.AxisFault: DS Fault Message: Error in 'SQLQuery.processPostNormalQuery': DS Fault Message: Error in 'SQLQuery.processPostNormalQuery': operation not allowed
  DS Code: DATABASE_ERROR
  Nested Exception:-
  java.sql.SQLException: operation not allowed
  
  DS Code: DATABASE_ERROR
  Source Data Service:-
  Name: pollingSolicitudesADEL
  Location: /pollingSolicitudesADEL.dbs
  Description: N/A
  Default Namespace: http://ws.wso2.org/dataservice
  Current Request Name: selectNewSol
  Current Params: {}
  Nested Exception:-
  DS Fault Message: Error in 'SQLQuery.processPostNormalQuery': operation not allowed
  DS Code: DATABASE_ERROR
  Nested Exception:-
  java.sql.SQLException: operation not allowed
  
  
          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
          at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo
  </code></pre>
  
  <p>Thanks in advance for any help.</p>