Hi Mike, You may want to read the XML-RPC spec at http://www.xmlrpc.com/spec for more information on the data types supported by XML-RPC. In the "Scalar <value>s" section, it says that integers are "four byte signed integers" and are denoted by <i4> or <int>. Further down in the 1/21/99 update, specific questions about allowable ranges for int and double are mentioned. It says that int is strictly defined as 32 bit, while double is "implementation-dependent".
It seems to me that your options are to somehow pack your large numbers into the other data types (string or several ints) or to use a different web services protocol like SOAP. If it was my project I might try using the packed int approach, i.e. 4 32 bit ints are packed to make a single 128 bit int. You could put them in a struct or a vector, the advantage of the struct being that you can explicitly name them "int-byte1", "int-byte2", etc. -- Ryan Hoegg ISIS Networks mike marsh wrote: >I learned about XMLRPC only a few days ago, so if it >sounds like I don't know what I'm talking about >then...I don't. > >MY QUESTION: >I think I want to know how to make my XmlRpcClient >understand <value><long int> 1524335 </long >int></value>. > >MY SITUATION: >I need to connect to a Zope database via XmlRpc. I >try calling a particular method, but an >XmlRpcException gets thrown. The exception string >says "cannot marshal <type 'long int'>. I suppose I >need an XmlRpc parser that can interpret <long int> >and create a Long object. Can someone tell me how to >modifiy org.apache.xml.XmlRpc.java? > >Below is some more info that may help explain my >problem. > >Thanks in advance, >mike > >STACK TRACE: >My code generates the following stack trace. >org.apache.xmlrpc.XmlRpcException: Unexpected Zope >exception: cannot marshal <type 'long int'> objects > at >org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java:414) > at >org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:149) > at >ncmi.dbclient.DBClient.query(DBClient.java:42) > at ncmi.dbclient.Browser.main(Browser.java:91) > >Client calling procedure >'EMDB.Groups.Group_1.Project_59.Microscopy.values' >with parameters [] >Beginning parsing XML input stream >startElement: methodResponse >startElement: value >startElement: struct >startElement: member >startElement: name >endElement: name >startElement: value >startElement: int >endElement: int >endElement: value >endElement: member >startElement: member >startElement: name >endElement: name >startElement: value >startElement: string >endElement: string >endElement: value >endElement: member >endElement: struct >endElement: value >endElement: fault >endElement: methodResponse >DEBUG: >
