users@jax-rpc.java.net

Re: Null value as input

From: Mariano Garcia <mgarcia_at_entel.es>
Date: Fri, 16 Sep 2005 09:11:14 +0200

I started designing the service as rpc style service, and I cannot
change it now. I have used a nillable option, but the client continues
failing (it crashs when he tries to serialize the null parameter).

What is the different between using a nillable option and using
minOccurs=0??

On Thu, 2005-09-15 at 12:49 -0700, Anne Thomas Manes wrote:
> Design the service as a document style service rather than RPC, and
> define your input element like this:
>
> <xsd:element name="getAlarmsRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="dateFrom" type="xsd:dateTime"
> nillable="true"/>
> <xsd:element name="dataTo" type="xsd:dateTime"
> nillable="true"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> ...
> <wsdl:message name=getAlarmsRequest">
> <wsdl:part name="body" element="tns:getAlarms"/>
> </wsdl:message>
>
> On 9/14/05, Mariano Garcia <mgarcia_at_entel.es> wrote:
> Hi all,
>
> I need to do a webservice that receives two dates as input
> message. This
> is the input message:
>
> <wsdl:message name="getAlarmsRequest">
> <wsdl:part name="dateFrom" type="xsd:dateTime"/>
> <wsdl:part name="dateTo" type="xsd:dateTime"/>
> </wsdl:message>
>
> One of the service specs is that the client can call this
> service using
> null values (in this case the service will use the current
> date). Is
> this possible? how? My client crashs when it tries to send the
> request:
>
> [java] java.rmi.RemoteException: unexpected null value for
> literal data;
> nested exception is:
> [java] unexpected null value for literal data
>
> Regards,
>
> --
> Mariano García González :: Analista Programador
> -----------------------------------------------
>
> Entel IT Consulting, SA
> Tlf. 91 567 07 36
> Mobile. 619 08 70 90
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail:
> users-help_at_jax-rpc.dev.java.net
>
>
-- 
Mariano García González :: Analista Programador
-----------------------------------------------
Entel IT Consulting, SA
Tlf.    91 567 07 36
Mobile. 619 08 70 90