Hi Anjana.

The sql query consult a function in postgresql that accept at least one
parameter of the 26 that it have.

I have 26 parameter in an operation that make a search based only in the
parameters specified, not null or empty. The WSDL types generate by the DS
look like this:

<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"/>
<xs:element minOccurs="0" name="sex" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="edad" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="npadre" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="nmadre" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="peso" nillable="true" type="xs:float"/>
<xs:element minOccurs="0" name="estatura" nillable="true" type="xs:float"/

My idea is that if I introduce only  pnombre and fecha_nac the operation
return all the records that match with this  parameters in the database. And
all the others parameters appears as null or empty in the SOAP.

This is the SOAP message to the service:
    <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>  
       <soapenv:Body>  
          <ns1:buscarDatosPersona
xmlns:ns1="http://ws.wso2.org/dataservice";>  
             <ns1:pnombre>Samuel</ns1:pnombre>  
          </ns1:buscarDatosPersona>  
       </soapenv:Body>  
    </soapenv:Envelope>  

I need that in this incoming SOAP message all the elements appear in NULL or
empty, but the specified by me in the client. By now only pnombre is there,
because I put it  in the client.

And this is the fault SOAP response :
    <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>  
       <soapenv:Header />  
       <soapenv:Body>  
          <soapenv:Fault>  
             <soapenv:Code>  
                <soapenv:Value>soapenv:Receiver</soapenv:Value>  
             </soapenv:Code>  
             <soapenv:Reason>  
                <soapenv:Text xml:lang="en-US">DS Fault Message: Error in
pre-fetching dataNested Exception:-javax.xml.stream.XMLStreamException: DS
Fault Message: Error in 'CallQuery.extractParams', cannot find Param with
type:query-param name:sapellidoSource Data Service:-Name: PersonaLocation:
/opt/wso2wsas-3.2.1/repository/deployment/server/dataservices/Persona.dbsDes
cription: N/ADefault Namespace: http://ws.wso2.org/dataserviceCurrent
Request Name: buscarDatosPersonaCurrent Params:
{pnombre=Samuel}</soapenv:Text>  
             </soapenv:Reason>  
             <soapenv:Detail>  
                <axis2ns7:DataServiceFault
xmlns:axis2ns7="http://ws.wso2.org/dataservice";>DS Fault Message: Error in
pre-fetching dataNested Exception:-javax.xml.stream.XMLStreamException: DS
Fault Message: Error in 'CallQuery.extractParams', cannot find Param with
type:query-param name:sapellidoSource Data Service:-Name: PersonaLocation:
/opt/wso2wsas-3.2.1/repository/deployment/server/dataservices/Persona.dbsDes
cription: N/ADefault Namespace: http://ws.wso2.org/dataserviceCurrent
Request Name: buscarDatosPersonaCurrent Params:
{pnombre=Samuel}</axis2ns7:DataServiceFault>  
             </soapenv:Detail>  
          </soapenv:Fault>  
       </soapenv:Body>  
    </soapenv:Envelope>  

I need a way to specified in the incoming SOAP message all the element in
null or empty.

Jorge.


-----Mensaje original-----
De: [email protected] [mailto:[email protected]] En
nombre de Anjana Fernando
Enviado el: viernes, 28 de enero de 2011 15:32
Para: [email protected]
Asunto: Re: [Carbon-dev] DS Fault Message: Error in
'CallQuery.extractParams', cannot find Param

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

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

Reply via email to