You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Dirk Lahmann <la...@bibliothek.uni-halle.de> on 2002/02/18 17:19:38 UTC

unicode

hi out there,

i have some problems 'sending' unicode-strings via 
'org.apache.xmlrpc' to my java-apps... does the implementation 
'org.apache.xmlrpc' support unicode-strings?

thank you... 


--
Dirk Lahmann
Universitaets- und Landesbibliothek Sachsen-Anhalt
06098 Halle
Germany
Tel.: 49-(0)345-55-22058
lahmann@bibliothek.uni-halle.de

Re: Return value 'null' not supported

Posted by Daniel Rall <dl...@finemaltcoding.com>.
http://xml-rpc.com/spec

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


Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
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: Return value 'null' not supported

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: <rp...@xml.apache.org>; "Daniel Rall" <dl...@finemaltcoding.com>
Sent: Tuesday, February 19, 2002 6:12 PM
Subject: Re: Return value 'null' not supported


> Hi all,
>
> I did not log it as a bug yet.  I found a problem in my code that allowed
the 2 XmlDecls to be in the response.
> I have not had time to try and do a degenerate case to verify that this is
a problem in XML-RPC or not.

Rick,

    It's probably best to wait for you to track this down. However we do
seem to have several reports of :

Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end of
file found

Which is how MinML reports that it hit EOF whilst looking for an end tag.

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


Re: Return value 'null' not supported

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Rick Blair" <bl...@xanadu.ds.boeing.com>
To: <rp...@xml.apache.org>; "Daniel Rall" <dl...@finemaltcoding.com>
Sent: Tuesday, February 19, 2002 6:12 PM
Subject: Re: Return value 'null' not supported


> Hi all,
>
> I did not log it as a bug yet.  I found a problem in my code that allowed
the 2 XmlDecls to be in the response.
> I have not had time to try and do a degenerate case to verify that this is
a problem in XML-RPC or not.

Rick,

    It's probably best to wait for you to track this down. However we do
seem to have several reports of :

Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end of
file found

Which is how MinML reports that it hit EOF whilst looking for an end tag.

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


Re: Return value 'null' not supported

Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
Hi all,

	I did not log it as a bug yet.  I found a problem in my code that allowed the 2 XmlDecls to be in the response.  
I have not had time to try and do a degenerate case to verify that this is a problem in XML-RPC or not.  

Thanks

Rick

On Tuesday 19 February 2002 16:05, Daniel Rall wrote:
> "John Wilson" <tu...@wilson.co.uk> writes:
> > Null is a non standard extension to XML-RPC. Hannes used to support it
> > but removed it when Dave Winer (who owns the spec) voiced his disapproval
> > of the extension.
> >
> > I think that the code may have a problem with this situation. I spent
> > some time working with Rick Blair on a similar point.
> >
> > I think that the server returns something like
> >
> > <?xml version="1.0"?>
> > <methodResponse>
> >    <params>
> >       <param>
> >          <value>
> > <?xml version="1.0"?>
> > <methodResponse>
> >    <fault>
> >       <value>
> >          <struct>
> >             <member>
> >                <name>faultString</name>
> >                <value><string>java.lang.RuntimeException: null value not
> > supported by XML-RPC</string></value>
> >                </member>
> >             <member>
> >                <name>faultCode</name>
> >                <value><int>0</int></value>
> >                </member>
> >             </struct>
> >          </value>
> >       </fault>
> >    </methodResponse>
> >
> > Which is obviously wrong. Rick was going to report it as a bug but he has
> > yet to do so, so I will;)
> >
> > I was going to test this and offer a patch but I'm afraid I a bit pressed
> > for time at the moment.
>
> If you don't have time to patch it, logging an issue at
> http://nagoya.apache.org/bugzilla/ would be a big help.

Re: Return value 'null' not supported

Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
Hi all,

	I did not log it as a bug yet.  I found a problem in my code that allowed the 2 XmlDecls to be in the response.  
I have not had time to try and do a degenerate case to verify that this is a problem in XML-RPC or not.  

Thanks

Rick

On Tuesday 19 February 2002 16:05, Daniel Rall wrote:
> "John Wilson" <tu...@wilson.co.uk> writes:
> > Null is a non standard extension to XML-RPC. Hannes used to support it
> > but removed it when Dave Winer (who owns the spec) voiced his disapproval
> > of the extension.
> >
> > I think that the code may have a problem with this situation. I spent
> > some time working with Rick Blair on a similar point.
> >
> > I think that the server returns something like
> >
> > <?xml version="1.0"?>
> > <methodResponse>
> >    <params>
> >       <param>
> >          <value>
> > <?xml version="1.0"?>
> > <methodResponse>
> >    <fault>
> >       <value>
> >          <struct>
> >             <member>
> >                <name>faultString</name>
> >                <value><string>java.lang.RuntimeException: null value not
> > supported by XML-RPC</string></value>
> >                </member>
> >             <member>
> >                <name>faultCode</name>
> >                <value><int>0</int></value>
> >                </member>
> >             </struct>
> >          </value>
> >       </fault>
> >    </methodResponse>
> >
> > Which is obviously wrong. Rick was going to report it as a bug but he has
> > yet to do so, so I will;)
> >
> > I was going to test this and offer a patch but I'm afraid I a bit pressed
> > for time at the moment.
>
> If you don't have time to patch it, logging an issue at
> http://nagoya.apache.org/bugzilla/ would be a big help.

Re: Return value 'null' not supported

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"John Wilson" <tu...@wilson.co.uk> writes:

> Null is a non standard extension to XML-RPC. Hannes used to support it but
> removed it when Dave Winer (who owns the spec) voiced his disapproval of the
> extension.
>
> I think that the code may have a problem with this situation. I spent some
> time working with Rick Blair on a similar point.
>
> I think that the server returns something like
>
> <?xml version="1.0"?>
> <methodResponse>
>    <params>
>       <param>
>          <value>
> <?xml version="1.0"?>
> <methodResponse>
>    <fault>
>       <value>
>          <struct>
>             <member>
>                <name>faultString</name>
>                <value><string>java.lang.RuntimeException: null value not
> supported by XML-RPC</string></value>
>                </member>
>             <member>
>                <name>faultCode</name>
>                <value><int>0</int></value>
>                </member>
>             </struct>
>          </value>
>       </fault>
>    </methodResponse>
>
> Which is obviously wrong. Rick was going to report it as a bug but he has
> yet to do so, so I will;)
>
> I was going to test this and offer a patch but I'm afraid I a bit pressed
> for time at the moment.

If you don't have time to patch it, logging an issue at
http://nagoya.apache.org/bugzilla/ would be a big help.

Empty return value

Posted by Phil Wilson <pi...@hotmail.com>.
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: Return value 'null' not supported

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"John Wilson" <tu...@wilson.co.uk> writes:

> Null is a non standard extension to XML-RPC. Hannes used to support it but
> removed it when Dave Winer (who owns the spec) voiced his disapproval of the
> extension.
>
> I think that the code may have a problem with this situation. I spent some
> time working with Rick Blair on a similar point.
>
> I think that the server returns something like
>
> <?xml version="1.0"?>
> <methodResponse>
>    <params>
>       <param>
>          <value>
> <?xml version="1.0"?>
> <methodResponse>
>    <fault>
>       <value>
>          <struct>
>             <member>
>                <name>faultString</name>
>                <value><string>java.lang.RuntimeException: null value not
> supported by XML-RPC</string></value>
>                </member>
>             <member>
>                <name>faultCode</name>
>                <value><int>0</int></value>
>                </member>
>             </struct>
>          </value>
>       </fault>
>    </methodResponse>
>
> Which is obviously wrong. Rick was going to report it as a bug but he has
> yet to do so, so I will;)
>
> I was going to test this and offer a patch but I'm afraid I a bit pressed
> for time at the moment.

If you don't have time to patch it, logging an issue at
http://nagoya.apache.org/bugzilla/ would be a big help.

Re: Return value 'null' not supported

Posted by John Wilson <tu...@wilson.co.uk>.
Null is a non standard extension to XML-RPC. Hannes used to support it but
removed it when Dave Winer (who owns the spec) voiced his disapproval of the
extension.

I think that the code may have a problem with this situation. I spent some
time working with Rick Blair on a similar point.

I think that the server returns something like

<?xml version="1.0"?>
<methodResponse>
   <params>
      <param>
         <value>
<?xml version="1.0"?>
<methodResponse>
   <fault>
      <value>
         <struct>
            <member>
               <name>faultString</name>
               <value><string>java.lang.RuntimeException: null value not
supported by XML-RPC</string></value>
               </member>
            <member>
               <name>faultCode</name>
               <value><int>0</int></value>
               </member>
            </struct>
         </value>
      </fault>
   </methodResponse>

Which is obviously wrong. Rick was going to report it as a bug but he has
yet to do so, so I will;)

I was going to test this and offer a patch but I'm afraid I a bit pressed
for time at the moment.

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


----- Original Message -----
From: "Martin Skopp" <sk...@riege.de>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 12:50 PM
Subject: Return value 'null' not supported


> Hi,
>
> I have a server method usually returning a native result of class
> String.  Works perfect.
> Until it returns "null"... For returning "null", I get the following
error:
>
>    Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end
> of file found
>
> After switching the server into debug mode, I get:
>
>    Searching for method: getService
>    Parameter 0: class java.lang.String = lalala
>    outparam = null
>    java.lang.RuntimeException: null value not supported by XML-RPC
>            at org.apache.xmlrpc.XmlRpc.writeObject(XmlRpc.java)
>            at
> org.apache.xmlrpc.XmlRpcServer$Worker.writeResponse(XmlRpcServer.java
>    )
>
> I can work around that of course... To improve org.apache.xmlrpc, think
> about the following:
>
> Is "null" not supported by the XML-RPC specs?
>
> Is there hope that "null" will be supported by org.apache.xmlrpc in the
future?
>
> If "null" is allowed by the specs, can someone put this on a TODO
> list/implement it?
>
> If "null" is NOT allowed by the specs, maybe a developer can change the
> error message a bit?  Instead "Fatal error parsing XML", I would prefer
> "Invalid method return value 'null' by [NAME_OF_CLASS_AND_METHOD] - not
> allowed by XMLRPC specs" or similar...
>
> Thanks,
>
>
> Martin Skopp
> --
> Riege Software International GmbH
> http://www.riege.com  info: mailto:info@riege.com
> Support: mailto:maint@riege.de
>
>


Re: Return value 'null' not supported

Posted by Daniel Rall <dl...@finemaltcoding.com>.
http://xml-rpc.com/spec

Re: Return value 'null' not supported

Posted by John Wilson <tu...@wilson.co.uk>.
Null is a non standard extension to XML-RPC. Hannes used to support it but
removed it when Dave Winer (who owns the spec) voiced his disapproval of the
extension.

I think that the code may have a problem with this situation. I spent some
time working with Rick Blair on a similar point.

I think that the server returns something like

<?xml version="1.0"?>
<methodResponse>
   <params>
      <param>
         <value>
<?xml version="1.0"?>
<methodResponse>
   <fault>
      <value>
         <struct>
            <member>
               <name>faultString</name>
               <value><string>java.lang.RuntimeException: null value not
supported by XML-RPC</string></value>
               </member>
            <member>
               <name>faultCode</name>
               <value><int>0</int></value>
               </member>
            </struct>
         </value>
      </fault>
   </methodResponse>

Which is obviously wrong. Rick was going to report it as a bug but he has
yet to do so, so I will;)

I was going to test this and offer a patch but I'm afraid I a bit pressed
for time at the moment.

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


----- Original Message -----
From: "Martin Skopp" <sk...@riege.de>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 12:50 PM
Subject: Return value 'null' not supported


> Hi,
>
> I have a server method usually returning a native result of class
> String.  Works perfect.
> Until it returns "null"... For returning "null", I get the following
error:
>
>    Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end
> of file found
>
> After switching the server into debug mode, I get:
>
>    Searching for method: getService
>    Parameter 0: class java.lang.String = lalala
>    outparam = null
>    java.lang.RuntimeException: null value not supported by XML-RPC
>            at org.apache.xmlrpc.XmlRpc.writeObject(XmlRpc.java)
>            at
> org.apache.xmlrpc.XmlRpcServer$Worker.writeResponse(XmlRpcServer.java
>    )
>
> I can work around that of course... To improve org.apache.xmlrpc, think
> about the following:
>
> Is "null" not supported by the XML-RPC specs?
>
> Is there hope that "null" will be supported by org.apache.xmlrpc in the
future?
>
> If "null" is allowed by the specs, can someone put this on a TODO
> list/implement it?
>
> If "null" is NOT allowed by the specs, maybe a developer can change the
> error message a bit?  Instead "Fatal error parsing XML", I would prefer
> "Invalid method return value 'null' by [NAME_OF_CLASS_AND_METHOD] - not
> allowed by XMLRPC specs" or similar...
>
> Thanks,
>
>
> Martin Skopp
> --
> Riege Software International GmbH
> http://www.riege.com  info: mailto:info@riege.com
> Support: mailto:maint@riege.de
>
>


Return value 'null' not supported

Posted by Martin Skopp <sk...@riege.de>.
Hi,

I have a server method usually returning a native result of class 
String.  Works perfect.
Until it returns "null"... For returning "null", I get the following error:

   Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end 
of file found

After switching the server into debug mode, I get:

   Searching for method: getService
   Parameter 0: class java.lang.String = lalala
   outparam = null
   java.lang.RuntimeException: null value not supported by XML-RPC
           at org.apache.xmlrpc.XmlRpc.writeObject(XmlRpc.java)
           at 
org.apache.xmlrpc.XmlRpcServer$Worker.writeResponse(XmlRpcServer.java
   )

I can work around that of course... To improve org.apache.xmlrpc, think 
about the following:

Is "null" not supported by the XML-RPC specs?

Is there hope that "null" will be supported by org.apache.xmlrpc in the future?

If "null" is allowed by the specs, can someone put this on a TODO 
list/implement it?

If "null" is NOT allowed by the specs, maybe a developer can change the 
error message a bit?  Instead "Fatal error parsing XML", I would prefer 
"Invalid method return value 'null' by [NAME_OF_CLASS_AND_METHOD] - not 
allowed by XMLRPC specs" or similar...

Thanks,


Martin Skopp
-- 
Riege Software International GmbH
http://www.riege.com  info: mailto:info@riege.com
Support: mailto:maint@riege.de


Return value 'null' not supported

Posted by Martin Skopp <sk...@riege.de>.
Hi,

I have a server method usually returning a native result of class 
String.  Works perfect.
Until it returns "null"... For returning "null", I get the following error:

   Fatal error parsing XML: org.xml.sax.SAXParseException: unexpected end 
of file found

After switching the server into debug mode, I get:

   Searching for method: getService
   Parameter 0: class java.lang.String = lalala
   outparam = null
   java.lang.RuntimeException: null value not supported by XML-RPC
           at org.apache.xmlrpc.XmlRpc.writeObject(XmlRpc.java)
           at 
org.apache.xmlrpc.XmlRpcServer$Worker.writeResponse(XmlRpcServer.java
   )

I can work around that of course... To improve org.apache.xmlrpc, think 
about the following:

Is "null" not supported by the XML-RPC specs?

Is there hope that "null" will be supported by org.apache.xmlrpc in the future?

If "null" is allowed by the specs, can someone put this on a TODO 
list/implement it?

If "null" is NOT allowed by the specs, maybe a developer can change the 
error message a bit?  Instead "Fatal error parsing XML", I would prefer 
"Invalid method return value 'null' by [NAME_OF_CLASS_AND_METHOD] - not 
allowed by XMLRPC specs" or similar...

Thanks,


Martin Skopp
-- 
Riege Software International GmbH
http://www.riege.com  info: mailto:info@riege.com
Support: mailto:maint@riege.de


Re: unicode

Posted by Hannes Wallnöfer <ha...@helma.at>.
Hi,

The default encoding used in Apache XML-RPC is ISO-8859-1 for 
compatibility with other implementations, but you can set the encoding 
to any Java-supported encoding. Calling

    XmlRpc.setEncoding ("UTF8");

before you first make a call or receive any calls should solve your 
problem. If not let us know.


Hannes


Dirk Lahmann wrote:
> hi out there,
> 
> i have some problems 'sending' unicode-strings via 
> 'org.apache.xmlrpc' to my java-apps... does the implementation 
> 'org.apache.xmlrpc' support unicode-strings?
> 
> thank you... 
> 
> 
> --
> Dirk Lahmann
> Universitaets- und Landesbibliothek Sachsen-Anhalt
> 06098 Halle
> Germany
> Tel.: 49-(0)345-55-22058
> lahmann@bibliothek.uni-halle.de
> 




Re: unicode

Posted by Hannes Wallnöfer <ha...@helma.at>.
Hi,

The default encoding used in Apache XML-RPC is ISO-8859-1 for 
compatibility with other implementations, but you can set the encoding 
to any Java-supported encoding. Calling

    XmlRpc.setEncoding ("UTF8");

before you first make a call or receive any calls should solve your 
problem. If not let us know.


Hannes


Dirk Lahmann wrote:
> hi out there,
> 
> i have some problems 'sending' unicode-strings via 
> 'org.apache.xmlrpc' to my java-apps... does the implementation 
> 'org.apache.xmlrpc' support unicode-strings?
> 
> thank you... 
> 
> 
> --
> Dirk Lahmann
> Universitaets- und Landesbibliothek Sachsen-Anhalt
> 06098 Halle
> Germany
> Tel.: 49-(0)345-55-22058
> lahmann@bibliothek.uni-halle.de
> 




Re: unicode

Posted by Andreas Bednarz <an...@education-one.de>.
Hi,

simply try it with a CDATA section, xml rpc does not allow a direct sending
(see w3c docs).

Hope having helped,

Andreas
----- Original Message -----
From: "Dirk Lahmann" <la...@bibliothek.uni-halle.de>
To: <rp...@xml.apache.org>
Sent: Monday, February 18, 2002 5:19 PM
Subject: unicode


> hi out there,
>
> i have some problems 'sending' unicode-strings via
> 'org.apache.xmlrpc' to my java-apps... does the implementation
> 'org.apache.xmlrpc' support unicode-strings?
>
> thank you...
>
>
> --
> Dirk Lahmann
> Universitaets- und Landesbibliothek Sachsen-Anhalt
> 06098 Halle
> Germany
> Tel.: 49-(0)345-55-22058
> lahmann@bibliothek.uni-halle.de
>


Re: unicode

Posted by Andreas Bednarz <an...@education-one.de>.
Hi,

simply try it with a CDATA section, xml rpc does not allow a direct sending
(see w3c docs).

Hope having helped,

Andreas
----- Original Message -----
From: "Dirk Lahmann" <la...@bibliothek.uni-halle.de>
To: <rp...@xml.apache.org>
Sent: Monday, February 18, 2002 5:19 PM
Subject: unicode


> hi out there,
>
> i have some problems 'sending' unicode-strings via
> 'org.apache.xmlrpc' to my java-apps... does the implementation
> 'org.apache.xmlrpc' support unicode-strings?
>
> thank you...
>
>
> --
> Dirk Lahmann
> Universitaets- und Landesbibliothek Sachsen-Anhalt
> 06098 Halle
> Germany
> Tel.: 49-(0)345-55-22058
> lahmann@bibliothek.uni-halle.de
>