You can not have empty values in xml elements for ints/longs/etc. This is not allowed by the xml schema spec. Nillable=true means you can supply this:
<bar xsi:nil="true"/> And then bar will be a null value. Otherwise its interpreted as just "" and that is not a valid number. Cheers, - Dan On 1/19/07, Chris Lehew <[EMAIL PROTECTED]> wrote:
I'm seeing unexpected behavior with the way XFire (using Aegis mapping) handles nullable parameters. Here's a simplified example... For the service method: @WebMethod public void processFoo(@WebParam(name="bar") Long bar); XFire generates the following for the 'bar' parameter: <xsd:element name="bar" type="xsd:long" nillable="true" minOccurs="1" maxOccurs="1"/> Looks fine. However, if a client wishes to pass null into the 'bar' parameter, passing the xml <bar></bar> or <bar/> causes XFire to throw a NumberFormatException, trying to parse an empty string into a long. Is there a preferred way to handle nulls that I'm missing? Thanks! Chris -- View this message in context: http://www.nabble.com/Nullable-parameter-issue-tf3042166.html#a8456366 Sent from the XFire - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
-- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
