You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Rob Jellinghaus <ro...@nimblefish.com> on 2004/04/23 23:37:00 UTC

RE: Xmlrpc and unsupported types

I had exactly the same problem.

No, xmlrpc does not support this out of the box.

I have written some fairly compact reflection-based code to convert Java
beans and Java collections into simpler structures that XML-RPC can
handle.  As a bonus, it converts longs, characters, nulls, floats, and
other data types not supported by XML-RPC.  I have also wrapped it with
a client-side java.lang.reflect.Proxy.  The end result is that you can
make calls that look and feel like RMI but that use XML-RPC behind the
scenes.

It works pretty well.  However, it is definitely out of scope for
XML-RPC.  Is there any kind of XML-RPC extensions package or other side
project that I could submit this to?  There's no doubt that many people
could make use of it (viz. Colin's email!).....

Cheers!
Rob



-----Original Message-----
From: Colin Bester [mailto:cbester@site-controls.com] 
Sent: Friday, April 23, 2004 2:32 PM
To: xmlrpc-user@ws.apache.org
Subject: Xmlrpc and unsupported types

Not sure if xmlrpc is able to do what I require and would appreciate
some advice. 
I am looking for a light method (application will be running on embedded
pc platform running linux) to allow transfer of java object via rpc.
In my application I have a collection of java classes (my objects) that
I want to transfer via rpc on demand from client. Objects (java class)
contain standard java types as well as my own java objects.
e.g. 
Class someclass 
{ 
        private String someString; 
        private Integer someInt; 
        private myClass someClass; 
... 
} 
In the RPCHandler I want to be able to return 'someclass' object for
client retrieval. 
On going through documentation I get the feeling that it is possible to
write ones own type handlers and would appreciate comment on whether
this is indeed possible and maybe some clues (links) on how to do this
(I haven't found reference on how to do this).
If this is not possible, is there any other suggestion besides
serializing object over socket connection? 
Thanks, 
Colin 




Re: Xmlrpc and unsupported types

Posted by Daniel Rall <dl...@collab.net>.
Rob, not that I now of.  You could certainly start such a project on 
SourceForge, or if you post the code here an people like it, we could create a 
"contrib" sub-directory inside the CVS repo for unsupported tools and additions 
like this.

- Dan


Rob Jellinghaus wrote:
> I had exactly the same problem.
> 
> No, xmlrpc does not support this out of the box.
> 
> I have written some fairly compact reflection-based code to convert Java
> beans and Java collections into simpler structures that XML-RPC can
> handle.  As a bonus, it converts longs, characters, nulls, floats, and
> other data types not supported by XML-RPC.  I have also wrapped it with
> a client-side java.lang.reflect.Proxy.  The end result is that you can
> make calls that look and feel like RMI but that use XML-RPC behind the
> scenes.
> 
> It works pretty well.  However, it is definitely out of scope for
> XML-RPC.  Is there any kind of XML-RPC extensions package or other side
> project that I could submit this to?  There's no doubt that many people
> could make use of it (viz. Colin's email!).....
> 
> Cheers!
> Rob
> 
> -----Original Message-----
> From: Colin Bester [mailto:cbester@site-controls.com] 
> Sent: Friday, April 23, 2004 2:32 PM
> To: xmlrpc-user@ws.apache.org
> Subject: Xmlrpc and unsupported types
> 
> Not sure if xmlrpc is able to do what I require and would appreciate
> some advice. 
> I am looking for a light method (application will be running on embedded
> pc platform running linux) to allow transfer of java object via rpc.
> In my application I have a collection of java classes (my objects) that
> I want to transfer via rpc on demand from client. Objects (java class)
> contain standard java types as well as my own java objects.
> e.g. 
> Class someclass 
> { 
>         private String someString; 
>         private Integer someInt; 
>         private myClass someClass; 
> ... 
> } 
> In the RPCHandler I want to be able to return 'someclass' object for
> client retrieval. 
> On going through documentation I get the feeling that it is possible to
> write ones own type handlers and would appreciate comment on whether
> this is indeed possible and maybe some clues (links) on how to do this
> (I haven't found reference on how to do this).
> If this is not possible, is there any other suggestion besides
> serializing object over socket connection? 
> Thanks, 
> Colin 


Re: Xmlrpc and unsupported types

Posted by Daniel Rall <dl...@collab.net>.
Rob, not that I now of.  You could certainly start such a project on 
SourceForge, or if you post the code here an people like it, we could create a 
"contrib" sub-directory inside the CVS repo for unsupported tools and additions 
like this.

- Dan


Rob Jellinghaus wrote:
> I had exactly the same problem.
> 
> No, xmlrpc does not support this out of the box.
> 
> I have written some fairly compact reflection-based code to convert Java
> beans and Java collections into simpler structures that XML-RPC can
> handle.  As a bonus, it converts longs, characters, nulls, floats, and
> other data types not supported by XML-RPC.  I have also wrapped it with
> a client-side java.lang.reflect.Proxy.  The end result is that you can
> make calls that look and feel like RMI but that use XML-RPC behind the
> scenes.
> 
> It works pretty well.  However, it is definitely out of scope for
> XML-RPC.  Is there any kind of XML-RPC extensions package or other side
> project that I could submit this to?  There's no doubt that many people
> could make use of it (viz. Colin's email!).....
> 
> Cheers!
> Rob
> 
> -----Original Message-----
> From: Colin Bester [mailto:cbester@site-controls.com] 
> Sent: Friday, April 23, 2004 2:32 PM
> To: xmlrpc-user@ws.apache.org
> Subject: Xmlrpc and unsupported types
> 
> Not sure if xmlrpc is able to do what I require and would appreciate
> some advice. 
> I am looking for a light method (application will be running on embedded
> pc platform running linux) to allow transfer of java object via rpc.
> In my application I have a collection of java classes (my objects) that
> I want to transfer via rpc on demand from client. Objects (java class)
> contain standard java types as well as my own java objects.
> e.g. 
> Class someclass 
> { 
>         private String someString; 
>         private Integer someInt; 
>         private myClass someClass; 
> ... 
> } 
> In the RPCHandler I want to be able to return 'someclass' object for
> client retrieval. 
> On going through documentation I get the feeling that it is possible to
> write ones own type handlers and would appreciate comment on whether
> this is indeed possible and maybe some clues (links) on how to do this
> (I haven't found reference on how to do this).
> If this is not possible, is there any other suggestion besides
> serializing object over socket connection? 
> Thanks, 
> Colin 


RE: Xmlrpc and unsupported types

Posted by Colin Bester <cb...@site-controls.com>.
I think that this could be a really neat solution (especially for
lightweight systems) and would be willing to assist.

Colin
-----Original Message-----
From: Rob Jellinghaus [mailto:robj@nimblefish.com] 
Sent: Friday, April 23, 2004 4:37 PM
To: xmlrpc-user@ws.apache.org
Cc: xmlrpc-dev@ws.apache.org
Subject: RE: Xmlrpc and unsupported types


I had exactly the same problem.

No, xmlrpc does not support this out of the box.

I have written some fairly compact reflection-based code to convert Java
beans and Java collections into simpler structures that XML-RPC can handle.
As a bonus, it converts longs, characters, nulls, floats, and other data
types not supported by XML-RPC.  I have also wrapped it with a client-side
java.lang.reflect.Proxy.  The end result is that you can make calls that
look and feel like RMI but that use XML-RPC behind the scenes.

It works pretty well.  However, it is definitely out of scope for XML-RPC.
Is there any kind of XML-RPC extensions package or other side project that I
could submit this to?  There's no doubt that many people could make use of
it (viz. Colin's email!).....

Cheers!
Rob



-----Original Message-----
From: Colin Bester [mailto:cbester@site-controls.com] 
Sent: Friday, April 23, 2004 2:32 PM
To: xmlrpc-user@ws.apache.org
Subject: Xmlrpc and unsupported types

Not sure if xmlrpc is able to do what I require and would appreciate some
advice. 
I am looking for a light method (application will be running on embedded pc
platform running linux) to allow transfer of java object via rpc. In my
application I have a collection of java classes (my objects) that I want to
transfer via rpc on demand from client. Objects (java class) contain
standard java types as well as my own java objects. e.g. 
Class someclass 
{ 
        private String someString; 
        private Integer someInt; 
        private myClass someClass; 
... 
} 
In the RPCHandler I want to be able to return 'someclass' object for client
retrieval. 
On going through documentation I get the feeling that it is possible to
write ones own type handlers and would appreciate comment on whether this is
indeed possible and maybe some clues (links) on how to do this (I haven't
found reference on how to do this). If this is not possible, is there any
other suggestion besides serializing object over socket connection? 
Thanks, 
Colin 





RE: Xmlrpc and unsupported types

Posted by Colin Bester <cb...@site-controls.com>.
I have been looking at TypeFactory and DefaultTypeFactory to see where they
fit into the scheme of things.

Doing a search through all the xml-rpc source does not find reference to
either of these classes.

What are these classes for?

Colin Bester
Office: (512) 306-9400


-----Original Message-----
From: Rob Jellinghaus [mailto:robj@nimblefish.com] 
Sent: Friday, April 23, 2004 4:37 PM
To: xmlrpc-user@ws.apache.org
Cc: xmlrpc-dev@ws.apache.org
Subject: RE: Xmlrpc and unsupported types


I had exactly the same problem.

No, xmlrpc does not support this out of the box.

I have written some fairly compact reflection-based code to convert Java
beans and Java collections into simpler structures that XML-RPC can handle.
As a bonus, it converts longs, characters, nulls, floats, and other data
types not supported by XML-RPC.  I have also wrapped it with a client-side
java.lang.reflect.Proxy.  The end result is that you can make calls that
look and feel like RMI but that use XML-RPC behind the scenes.

It works pretty well.  However, it is definitely out of scope for XML-RPC.
Is there any kind of XML-RPC extensions package or other side project that I
could submit this to?  There's no doubt that many people could make use of
it (viz. Colin's email!).....

Cheers!
Rob



-----Original Message-----
From: Colin Bester [mailto:cbester@site-controls.com] 
Sent: Friday, April 23, 2004 2:32 PM
To: xmlrpc-user@ws.apache.org
Subject: Xmlrpc and unsupported types

Not sure if xmlrpc is able to do what I require and would appreciate some
advice. 
I am looking for a light method (application will be running on embedded pc
platform running linux) to allow transfer of java object via rpc. In my
application I have a collection of java classes (my objects) that I want to
transfer via rpc on demand from client. Objects (java class) contain
standard java types as well as my own java objects. e.g. 
Class someclass 
{ 
        private String someString; 
        private Integer someInt; 
        private myClass someClass; 
... 
} 
In the RPCHandler I want to be able to return 'someclass' object for client
retrieval. 
On going through documentation I get the feeling that it is possible to
write ones own type handlers and would appreciate comment on whether this is
indeed possible and maybe some clues (links) on how to do this (I haven't
found reference on how to do this). If this is not possible, is there any
other suggestion besides serializing object over socket connection? 
Thanks, 
Colin