You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-user@xml.apache.org by Phil Wilson <pi...@hotmail.com> on 2002/03/28 16:42:45 UTC

Empty return value

Hi,

Part of the return from an XML-RPC call I make is an empty field
(<value><dateTime.iso8601></dateTime.iso8601></value> in fact), but the
included MiniML parser chokes on this (unparseable date: "").

As far as I'm aware, an empty element is valid XML, so shouldn't this be
dealt with?

Thanks,

Phil

Re: Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
----- Original Message -----
From: "John Wilson"
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 7:29 PM

> The exception does not come from the parser. It comes from XmlRPC.java.

You're right of course; it's been a long day, and the words "MiniML" just
leapt out at me. How could I ever have doubted it? ;)

> I'm a little puzzled as to what you are trying to achieve here. What date
> value do you think should be passed on to the use code?

I was actually expecting the server I connected to to return a dateTime, and
was caught a bit off-guard when an error was thrown. I just thought I'd
enquire here to make sure I wasn't mistaken in thinking that empty values
shouldn't be passed (the server programmer had said to me that it was a grey
area, but that he'd done it anyway).

Thanks for your help!

Phil

Re: Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
----- Original Message -----
From: "John Wilson"
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 7:29 PM

> The exception does not come from the parser. It comes from XmlRPC.java.

You're right of course; it's been a long day, and the words "MiniML" just
leapt out at me. How could I ever have doubted it? ;)

> I'm a little puzzled as to what you are trying to achieve here. What date
> value do you think should be passed on to the use code?

I was actually expecting the server I connected to to return a dateTime, and
was caught a bit off-guard when an error was thrown. I just thought I'd
enquire here to make sure I wasn't mistaken in thinking that empty values
shouldn't be passed (the server programmer had said to me that it was a grey
area, but that he'd done it anyway).

Thanks for your help!

Phil

Re: Empty return value

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Phil Wilson" <pi...@hotmail.com>
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 7:23 PM
Subject: Re: Empty return value


> > can you post the error you get?
>
> Sure thing,
>
> Here's what I get
>
> startElement: dateTime.iso8601
> endElement: dateTime.iso8601
> java.lang.RuntimeException: Unparseable date: ""
>  at org.apache.xmlrpc.XmlRpc$Value.characterData(XmlRpc.java:597)
>  at org.apache.xmlrpc.XmlRpc.endElement(XmlRpc.java:388)
>  at uk.co.wilson.xml.MinML.parse(MinML.java)
>  at uk.co.wilson.xml.MinML.parse(MinML.java)
>  at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:270)
>  at
>
org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(XmlRpcClientLite.java:
> 162)
>  at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:149)
>  at xurbleTest.main(xurbleTest.java:205)
> java.io.IOException: Unparseable date: ""
>
>
> > I.E. It's well formed XML but not valid XML-RPC
>
> I couldn't see anything in the XML-RPC spec about blank values, but if an
> XML-RPC call is just XML (as you cleared up for me recently!), it _should_
> be able to deal with it, shouldn't it?

The exception does not come from the parser. It comes from XmlRPC.java. The
Apache XML-RPC system requires a dateTime.iso8601 element to contain a
date/time. The spec says that a dateTime.iso8601 should contain a date/time.
A zero length sting is not a date/time.

I'm a little puzzled as to what you are trying to achieve here. What date
value do you think should be passed on to the use code?

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: Empty return value

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Phil Wilson" <pi...@hotmail.com>
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 7:23 PM
Subject: Re: Empty return value


> > can you post the error you get?
>
> Sure thing,
>
> Here's what I get
>
> startElement: dateTime.iso8601
> endElement: dateTime.iso8601
> java.lang.RuntimeException: Unparseable date: ""
>  at org.apache.xmlrpc.XmlRpc$Value.characterData(XmlRpc.java:597)
>  at org.apache.xmlrpc.XmlRpc.endElement(XmlRpc.java:388)
>  at uk.co.wilson.xml.MinML.parse(MinML.java)
>  at uk.co.wilson.xml.MinML.parse(MinML.java)
>  at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:270)
>  at
>
org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(XmlRpcClientLite.java:
> 162)
>  at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:149)
>  at xurbleTest.main(xurbleTest.java:205)
> java.io.IOException: Unparseable date: ""
>
>
> > I.E. It's well formed XML but not valid XML-RPC
>
> I couldn't see anything in the XML-RPC spec about blank values, but if an
> XML-RPC call is just XML (as you cleared up for me recently!), it _should_
> be able to deal with it, shouldn't it?

The exception does not come from the parser. It comes from XmlRPC.java. The
Apache XML-RPC system requires a dateTime.iso8601 element to contain a
date/time. The spec says that a dateTime.iso8601 should contain a date/time.
A zero length sting is not a date/time.

I'm a little puzzled as to what you are trying to achieve here. What date
value do you think should be passed on to the use code?

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
> can you post the error you get?

Sure thing,

Here's what I get

startElement: dateTime.iso8601
endElement: dateTime.iso8601
java.lang.RuntimeException: Unparseable date: ""
 at org.apache.xmlrpc.XmlRpc$Value.characterData(XmlRpc.java:597)
 at org.apache.xmlrpc.XmlRpc.endElement(XmlRpc.java:388)
 at uk.co.wilson.xml.MinML.parse(MinML.java)
 at uk.co.wilson.xml.MinML.parse(MinML.java)
 at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:270)
 at
org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(XmlRpcClientLite.java:
162)
 at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:149)
 at xurbleTest.main(xurbleTest.java:205)
java.io.IOException: Unparseable date: ""


> I.E. It's well formed XML but not valid XML-RPC

I couldn't see anything in the XML-RPC spec about blank values, but if an
XML-RPC call is just XML (as you cleared up for me recently!), it _should_
be able to deal with it, shouldn't it?

Thanks,

Phil

Re: Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
> can you post the error you get?

Sure thing,

Here's what I get

startElement: dateTime.iso8601
endElement: dateTime.iso8601
java.lang.RuntimeException: Unparseable date: ""
 at org.apache.xmlrpc.XmlRpc$Value.characterData(XmlRpc.java:597)
 at org.apache.xmlrpc.XmlRpc.endElement(XmlRpc.java:388)
 at uk.co.wilson.xml.MinML.parse(MinML.java)
 at uk.co.wilson.xml.MinML.parse(MinML.java)
 at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java:270)
 at
org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(XmlRpcClientLite.java:
162)
 at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:149)
 at xurbleTest.main(xurbleTest.java:205)
java.io.IOException: Unparseable date: ""


> I.E. It's well formed XML but not valid XML-RPC

I couldn't see anything in the XML-RPC spec about blank values, but if an
XML-RPC call is just XML (as you cleared up for me recently!), it _should_
be able to deal with it, shouldn't it?

Thanks,

Phil

Re: Empty return value

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Phil Wilson" <pi...@hotmail.com>
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 3:42 PM
Subject: Empty return value


> Hi,
>
> Part of the return from an XML-RPC call I make is an empty field
> (<value><dateTime.iso8601></dateTime.iso8601></value> in fact), but the
> included MiniML parser chokes on this (unparseable date: "").
>
> As far as I'm aware, an empty element is valid XML, so shouldn't this be
> dealt with?

Phil,

can you post the error you get?

I suspect the parser is happy with the XML but the XL-RPC code itself will
not like it as it is not a valid date.

I.E. It's well formed XML but not valid XML-RPC

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: Empty return value

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Phil Wilson" <pi...@hotmail.com>
To: <rp...@xml.apache.org>
Sent: Thursday, March 28, 2002 3:42 PM
Subject: Empty return value


> Hi,
>
> Part of the return from an XML-RPC call I make is an empty field
> (<value><dateTime.iso8601></dateTime.iso8601></value> in fact), but the
> included MiniML parser chokes on this (unparseable date: "").
>
> As far as I'm aware, an empty element is valid XML, so shouldn't this be
> dealt with?

Phil,

can you post the error you get?

I suspect the parser is happy with the XML but the XL-RPC code itself will
not like it as it is not a valid date.

I.E. It's well formed XML but not valid XML-RPC

John Wilson
The Wilson Partnership
http://www.wilson.co.uk