Thank you Mike.  I think I overstated the problem.  I
don't know that the xml actually says "<value><long
int> 1524335 </long int></value>".  I just infered
that from the exception message (which I show below).

The xml that the server sends in reply is parsed okay
by my web-browser and other xmlrpc clients.  I think
that "long int" is an extension to the xmlrpc spec. 
And I need to know how to hack the XmlRpc classes so
that they can read "long int" data.

thanx,
mike

--- Mike Kline <[EMAIL PROTECTED]> wrote:
> Mike,
> 
> You need to create well formed xml, there are many
> ways to do this
> for your sample.  One simple way is:
> 
> <value type="long int">1231231</value>
> 
> which uses an attribute that tells the "type" of
> your value.
> 
> It is then up to you to parse the returned value to
> determine the type to assigned it to.
> 
> 
> Mike K.
> 
> 
> 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:
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

Reply via email to