| Summary: | How to create external bugs for a red hat bug using XML RPC | ||
|---|---|---|---|
| Product: | [Community] Bugzilla | Reporter: | Yi Chun Chen <chenycbj> |
| Component: | WebService | Assignee: | PnT DevOps Devs <hss-ied-bugs> |
| Status: | CLOSED NOTABUG | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.4 | CC: | jmcdonal, rjoost |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-18 23:22:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
The Red Hat Bugzilla team do not provide support for Bugzilla. The documentation for adding and updated external trackers is here https://bugzilla.redhat.com/docs/en/html/api/extensions/ExternalBugs/lib/WebService.html Other API documentation can be accessed from https://bugzilla.redhat.com/docs/en/html/api/ |
Hi, I want to create an external bug for a red hat bug using XML RPC, and I wrote: public void createExternalBug(String bugID,String extSysID,String extBugID) throws DoggierException{ if(client==null){ throw new DoggierException(301,theURL); } if(!isLoggedIn){ throw new DoggierException(302,theURL); } Integer bugid=null; Integer extBZID=null; Integer extbugID=null; try{ bugid=new Integer(bugID); extBZID=new Integer(extSysID); extbugID=new Integer(extBugID); }catch(NumberFormatException e){ throw new DoggierException(303,bugID); } HashMap hm=new HashMap(); hm.put("bug_id",bugID); hm.put("ext_bz_id",extSysID); hm.put("ext_bz_bug_id",extBugID); try{ client.execute("ExternalBugs.create",new Object[]{hm}); }catch(XmlRpcException e){ e.printStackTrace(); throw new DoggierException(347,e.getMessage(),theURL); } } But errors seems: org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers response: java.lang.String cannot be cast to java.lang.Integer at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:177) at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145) at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94) at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44) at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125) at com.ibm.cde.bugzilla.custom.api.XMLDoger.createExternalBug(XMLDoger.java:651) at com.ibm.cde.bugzilla.custom.api.XMLDoger.main(XMLDoger.java:667) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1194) at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175) ... 9 more Do you know how should I write code to create external bug using XML RPC? Quite urgent for our deployment of distros bridge! Thanks!