<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>This is the code, i use to invoke the Bugzilla API, also I'm using version 3.0.1 and when invoking the Version API it return the it correctly.<BR>but the problem with the User.login API.<BR> <BR>XmlRpcClientConfigImpl config = <B><FONT face="" color=#7f0055 size=2>new</B></FONT><FONT face="" size=2> XmlRpcClientConfigImpl();<BR></FONT><BR>
<P align=left>config.setServerURL(<B><FONT face="" color=#7f0055 size=2>new</B></FONT><FONT face="" size=2> URL("</FONT><FONT face="" color=#2a00ff size=2><A href="http://%3cvmware%20virtual%20ip%3e/bugzilla/xmlrpc.cgi" target=_blank>http://<VMware virtual IP>/bugzilla/xmlrpc.cgi</A></FONT><FONT face="" size=2>"));</FONT><FONT face="" size=2></P></FONT><FONT face="" size=2><BR>
<P align=left> </P><BR>
<P align=left>XmlRpcClient client = </FONT><B><FONT face="" color=#7f0055 size=2>new</B></FONT><FONT face="" size=2> XmlRpcClient();</P>client.setConfig(config);<BR></FONT><BR>
<P align=left> </P><BR>
<P align=left>Object result = client.execute(<FONT face="" color=#2a00ff size=2>"User.login"</FONT><FONT face="" size=2>, </FONT><B><FONT face="" color=#7f0055 size=2>new</B></FONT><FONT face="" size=2> Object[] {"</FONT><FONT face="" color=#2a00ff size=2><A href="mailto:mina@bugzilla.com">mina@bugzilla.com</A>"</FONT><FONT face="" size=2>, </FONT><FONT face="" color=#2a00ff size=2>"password"</FONT><FONT face="" size=2>});</P><BR></FONT><FONT face="" size=2>System.<I><FONT color=#0000c0 size=2>out</I></FONT></FONT><FONT face="" size=2>.println(result);<BR></FONT><BR><BR>Note that execute takes a list or object[] as its second parameter.<BR><BR><BR>and the exception is <BR><BR><FONT face="" color=#ff0000 size=2><BR>
<P align=left>Exception in thread "main" </FONT><U><FONT face="" color=#000080 size=2>java.lang.ClassCastException</U></FONT><FONT face="" color=#ff0000 size=2>: java.lang.String cannot be cast to java.lang.Integer</P><BR>
<P align=left>at org.apache.xmlrpc.parser.XmlRpcResponseParser.addResult(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcResponseParser.java:58</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.parser.RecursiveTypeParserImpl.endValueTag(</FONT><U><FONT face="" color=#000080 size=2>RecursiveTypeParserImpl.java:71</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.parser.XmlRpcResponseParser.endElement(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcResponseParser.java:183</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)</P><BR>
<P align=left>at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcStreamTransport.java:175</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcStreamTransport.java:145</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcHttpTransport.java:94</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcSunHttpTransport.java:44</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcClientWorker.java:53</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcClient.execute(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcClient.java:166</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcClient.execute(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcClient.java:136</U></FONT><FONT face="" color=#ff0000 size=2>)</P><BR>
<P align=left>at org.apache.xmlrpc.client.XmlRpcClient.execute(</FONT><U><FONT face="" color=#000080 size=2>XmlRpcClient.java:125</U></FONT><FONT face="" color=#ff0000 size=2>)</P>at com.newportmediainc.bzc.executer.BZCApplication.main(</FONT><U><FONT face="" color=#000080 size=2>BZCApplication.java:31</U></FONT><FONT face="" color=#ff0000 size=2>)<BR></FONT> <BR>and the TCP dump using wireshark<BR>faultString<BR><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">Can't use string ("<A href="mailto:mvictor@newportmediainc.com"><email account></A>") as a HASH ref while "strict refs" in use at Bugzilla/WebService/User.pm line 39.\n<BR></BLOCKQUOTE>faultcode<BR> <BR><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BR>server // i think this is the problem as it must return a numerical code.<BR></BLOCKQUOTE><BR>
<P dir=ltr><BR>I believe that the problem in how to send a parameters with the method name. so if anyone did it via java and apach xml-rpc please give a hand.</P><BR>
<P dir=ltr> </P><BR>
<P dir=ltr>thx.</P><BR>
<P dir=ltr> </P><BR>
<P dir=ltr>Mina<BR><BR></P><BR>
<HR id=EC_stopSpelling>
<BR><BR>> Date: Mon, 24 Sep 2007 16:17:21 -0700<BR>> From: <A href="mailto:mkanat@bugzilla.org">mkanat@bugzilla.org</A><BR>> To: <A href="mailto:developers@bugzilla.org">developers@bugzilla.org</A><BR>> Subject: Re: java xml-rpc<BR>> <BR>> On Mon, 24 Sep 2007 13:20:59 +0000 Mina Amin <<A href="mailto:minaavictor@hotmail.com">minaavictor@hotmail.com</A>><BR>> wrote:<BR>> > I'm developing a bugzilla client under java application that use<BR>> > bugzilla xml-rpc API, when using the "User.login" method a cast<BR>> > exception occurs.. any help NOTE: i'm using java 6 with apach xml-rpc<BR>> > library <BR>> <BR>> You're going to have to be way more specific than that. Show us<BR>> what code you wrote, and show us the exact error.<BR>> <BR>> Also, you're probably better off asking the people who wrote<BR>> the library, instead of us. As long as you're following the Bugzilla<BR>> API, you should be fine. Just realize that all arguments are a hash (a<BR>> Map in Java terms).<BR>> <BR>> -Max<BR>> -- <BR>> http://www.everythingsolved.com/<BR>> Competent, Friendly Bugzilla Services. And Everything Else, too.<BR><br /><hr />More photos; more messages; more whatever – Get MORE with Windows Live™ Hotmail®. NOW with 5GB storage. <a href='http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907' target='_new'>Get more!</a></body>
</html>