Hi all.
I use a Dataservice that have 2 incoming parameters and when I pass two
values the service work fine, but when I pass only one parameter the service
fail.

I want to know if this is the normal behavior and if I can configure the
service to accept only one parameter of two.

This is the service:
<data name="Inmueble" enableBatchRequests="false" enableBoxcarring="false"
serviceStatus="active">         
   <description></description>         
   <config id="bbb">                  
      <property name="carbon_datasource_name">bbb</property>         
   </config>         
   <query id="obtenerDatosInmueble" useConfig="bbb">                  
      <sql>SELECT * from datos.fn_datos_inmueble(?,?)</sql>

      <result element="inmuebles" rowName="inmueble">

         <element name="numero_matriculacion" column="numero_matriculacion"
xsdType="xs:string" />                           
          ……
      </result>                  
      <param name="nmatriculacion" paramType="SCALAR" sqlType="STRING"
type="IN" ordinal="1" />                  
      <param name="ncatastral" paramType="SCALAR" sqlType="STRING" type="IN"
ordinal="2" />         
   </query>         
   <operation name="obtenerDatosInmueble">                  
      <description></description>                  
      <call-query href="obtenerDatosInmueble">                           
         <with-param name="nmatriculacion" query-param="nmatriculacion" />

         <with-param name="ncatastral" query-param="ncatastral" />

      </call-query>         
   </operation>
</data>

When I only pass  nmatriculacion  or ncatastral the service fail with this
error:

[2011-01-27 15:27:41,336] ERROR -  Error in in-out message receiver
{org.wso2.carbon.dataservices.core.DBInOutMessageReceiver}
DS Fault Message: Error in pre-fetching data
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in
'CallQuery.extractParams', cannot find Param with type:query-param
name:ncatastral
Source Data Service:-
Name: Inmueble
Location:
/opt/wso2wsas-3.2.1/repository/deployment/server/dataservices/Inmueble.dbs
Description: Brinda los datos que describen a un inmueble. Proporciona una
información actualizada y precisa a todos los entes autorizados a
consultarla.
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: obtenerDatosInmueble
Current Params: {}

Jorge.

_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to