Hi Jorge, It is not the clear what your intention is. As I see, you've defined an SQL query which requires two parameters. So why would you need to pass only one parameter? .. If you're meaning you're only passing an actual value on one parameter and passing null or an empty string to another, then it will work - but not in tryit. If you used the try-it tool to test this, when the input fields of the try it is not given values (kept empty), tryit treats that fields as simply not given (the SOAP message will not have that specific element), and not an empty string, as you would expect for an string type parameter. So simply it is not possible to give an empty string or a null value using tryit. For that, you should code-gen a stub and invoke the operation.
Cheers, Anjana. On Fri, Jan 28, 2011 at 8:33 PM, Jorge Infante Osorio <[email protected]> wrote: > Hi Prabath. > > De: [email protected] [mailto:[email protected]] En > nombre de Prabath Abeysekera > Enviado el: viernes, 28 de enero de 2011 8:44 > Para: [email protected] > Asunto: Re: [Carbon-dev] DS Fault Message: Error in > 'CallQuery.extractParams', cannot find Param > > Hi Jorge, > On Fri, Jan 28, 2011 at 2:05 AM, Jorge Infante Osorio <[email protected]> > wrote: > 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. > > If you've declared two input mappings against two fields in your sql query, > yes you need to pass values to both of them. > > In which way I can specified that it's not necessary to pass the two > values?? > > Part of WSDL types: > <xs:element minOccurs="0" name="pnombre" nillable="true" type="xs:string"/> > <xs:element minOccurs="0" name="snombre" nillable="true" type="xs:string"/> > <xs:element minOccurs="0" name="papellido" nillable="true" > type="xs:string"/> > <xs:element minOccurs="0" name="sapellido" nillable="true" > type="xs:string"/> > <xs:element minOccurs="0" name="lnacimiento" nillable="true" > type="xs:string"/> > <xs:element minOccurs="0" name="fecha_nac" nillable="true" type="xs:date"/> > > Jorge. > > > 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 > > > Regards, > -- > Prabath Abeysekara > Software Engineer > WSO2 Inc. > Email: [email protected] > Mobile: +94718124514 > > > > _______________________________________________ > Carbon-dev mailing list > [email protected] > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > -- Anjana Fernando Software Engineer WSO2, Inc.; http://wso2.com lean.enterprise.middleware _______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
