users@jax-rpc.java.net

RE: Null value as input

From: Ryan LeCompte <Ryan.LeCompte_at_pangonetworks.com>
Date: Thu, 15 Sep 2005 18:02:57 -0400

Isn't it better to use minOccurs="0" and maxOccurs="1" instead of using nillable="true" for interoperability?

Ryan

 

________________________________

From: Anne Thomas Manes [mailto:atmanes_at_gmail.com]
Sent: Thursday, September 15, 2005 3:49 PM
To: users_at_jax-rpc.dev.java.net
Subject: Re: Null value as input

 

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 <mailto: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 <mailto:users-unsubscribe_at_jax-rpc.dev.java.net> 
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net <mailto:users-help_at_jax-rpc.dev.java.net>