users@jax-rpc.java.net

Re: Null value as input

From: Anne Thomas Manes <atmanes_at_gmail.com>
Date: Sat, 24 Sep 2005 15:48:17 -0400

Use document style.

On 9/23/05, Mariano Garcia <mgarcia_at_entel.es> wrote:
>
> so how can i write my wsdl file to be able to call a service method from
> client side using a null value as input parameter?
>
> Another question:
>
> How does wscompile generate the java code when wsdl file has some
> parameters with minOccurs=0?
>
> On Thu, 2005-09-22 at 21:31 -0700, Anne Thomas Manes wrote:
> > nillable is not a valid attribute in a <wsdl:part> definition.
> >
> > Anne
> >
> > On 9/19/05, Mariano Garcia <mgarcia_at_entel.es> wrote:
> > Mmmm... maybe something is wrong in my WSDL file. When I run
> > my client
> > (generated using wscompile from WSDL file) it crashs because
> > of the nil
> > input parameter.
> >
> > Can I call the stub function using 'null' as input parameter??
> > This is
> > the message I use:
> >
> > <wsdl:message name="getAlarmsRequest">
> > <wsdl:part name="dateFrom" type="xsd:dateTime"
> > nillable="true"/>
> > <wsdl:part name="dateTo" type="xsd:dateTime"
> > nillable="true"/>
> > </wsdl:message>
> >
> > And I call it as following:
> >
> > myWebservice.getAlarms(null, toDate, getAlarmsState,
> > getAlarmsHolder);
> >
> > It is a little strange because client tells me this:
> >
> > java.rmi.RemoteException : unexpected null value for literal
> > data;
> > nested exception is:
> > [java] unexpected null value for literal data
> > [...]
> > Caused by: unexpected null value for literal data
> > [...]
> >
> > Maybe I forgot some option in wscompile that generates a stub
> > that
> > allows a null value as input parameter.. ¿?
> >
> > On Fri, 2005-09-16 at 09:54 -0700, Anne Thomas Manes wrote:
> > > minOccurs="0" means that you can send a message which does
> > not contain
> > > the element in question.
> > > nillable="true" means that you can send a message with the
> > element
> > > value specified as nil="true".
> > >
> > > On 9/16/05, Mariano Garcia < mgarcia_at_entel.es> wrote:
> > > 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
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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
>
>