Hi Jorge,

On Thu, Apr 7, 2011 at 7:46 PM, Jorge Infante Osorio <[email protected]> wrote:
> Hi all.
>
> In a data service query I need to specified 3 input parameters, numero3 is
> mandatory, and numero1 and numero2 are optional, numero1 or numero2, but I
> need to pass [numero1 and numero3] or [numero 2 and numero3] not numero3
> alone. How can I do that?

You can either do that in the client application itself, or if you
really need to enforce it in DSS, you can write a custom validator
[1]. There you can get something called the "validation context",
which gives you access to other parameter names and its values, so you
can enforce your logic there.

[1] 
http://wso2.org/project/solutions/data-services/java/2.5.1/docs/validation.html

Cheers,
Anjana.

>
>
>
>       <param name="numero1" paramType="SCALAR" sqlType="STRING" type="IN"
> ordinal="1" defaultValue="#{NULL}" />
>
>       <param name="numero2" paramType="SCALAR" sqlType="STRING" type="IN"
> ordinal="2" defaultValue="#{NULL}" />
>
>       <param name="numero3" paramType="SCALAR" sqlType="STRING" type="IN"
> ordinal="3" />
>
>
>
>
>
> Thanks,
>
> Ing. Jorge Infante Osorio.
>
> J´Dpto Soluciones SOA.
>
> CDAE.
>
> UCI
>
>
>
> _______________________________________________
> 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

Reply via email to