daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I am trying to get the issues from mantisbugtracker via mantisbug tracker rest api using java.but i am getting the error like below.  
  2.  
  3.     import java.net.URL;
  4.     import org.apache.axis.session.Session;
  5.     import org.mantisbt.connect.IMCSession;
  6.     import org.mantisbt.connect.axis.MCSession;
  7.     import org.mantisbt.connect.axis.Proxy;
  8.     import org.mantisbt.connect.model.IIssue;
  9.     import org.mantisbt.connect.model.IProject;
  10.     import org.mantisbt.connect.model.Issue;
  11.     public class getIssue {
  12.     public static void main(String[] args) {
  13.     // TODO Auto-generated method stub
  14.     try
  15.     {
  16.     URL url = new URL("http://MansticServerAsdress/mantis/api/soap/mantisconnect.php");        String user = "XXXX";
  17.     String pwd = "XXXX";
  18.     String projectName="banking1";
  19.     //Proxy.configure("localhost", 80);
  20.     IMCSession session=new MCSession(url, user, pwd);
  21.     System.out.println(session.toString());
  22.     IProject [] projects=session.getAccessibleProjects();
  23.     for(IProject project:projects)
  24.     {
  25.     if(projectName.equalsIgnoreCase(project.getName()))
  26.     {
  27.     System.out.println(project.getName()+"::"+project.getId());
  28.     break;
  29.     }
  30.     }
  31.     System.out.println(session.getAccessibleProjects());
  32.     long issues = session.getBiggestIssueId(33);
  33.     System.out.println(issues);
  34.  
  35.     //For getting Issue
  36.     IIssue issue=session.getIssue(issues);
  37.     System.out.println(issue.toString());
  38.             }
  39.     catch(Exception e)
  40.     {
  41.     e.printStackTrace();
  42.     }
  43.     }    
  44.     }
  45.    // Exception:
  46. ------------------------------------------------------        
  47. org.mantisbt.connect.axis.MCSession@20398b7c
  48. banking1::33
  49. [Lorg.mantisbt.connect.axis.Project;@4fb64261
  50. 2430
  51. - Exception:
  52. org.xml.sax.SAXException: Invalid element in org.mantisbt.connect.axis.AttachmentData - user_id
  53. at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:264)
  54. at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
  55. at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
  56. at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
  57. at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
  58. at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
  59. at org.apache.axis.client.Call.invoke(Call.java:2583)
  60. at org.apache.axis.client.Call.invoke(Call.java:2482)
  61. at org.apache.axis.client.Call.invoke(Call.java:1867)
  62. at org.mantisbt.connect.axis.MantisConnectBindingStub.mc_issue_get(MantisConnectBindingStub.java:1684)
  63. at org.mantisbt.connect.axis.MCSession.getIssue(MCSession.java:532)
  64. at ib.mantis.getIssue.main(getIssue.java:41)
  65. org.mantisbt.connect.MCException: org.xml.sax.SAXException: Invalid element in org.mantisbt.connect.axis.AttachmentData - user_id
  66. at org.mantisbt.connect.axis.MCSession.getIssue(MCSession.java:535)
  67. at ib.mantis.getIssue.main(getIssue.java:41)
  68. Caused by: org.xml.sax.SAXException: Invalid element in org.mantisbt.connect.axis.AttachmentData - user_id
  69. at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
  70. at org.apache.axis.client.Call.invoke(Call.java:2586)
  71. at org.apache.axis.client.Call.invoke(Call.java:2482)
  72. at org.apache.axis.client.Call.invoke(Call.java:1867)
  73. at org.mantisbt.connect.axis.MantisConnectBindingStub.mc_issue_get(MantisConnectBindingStub.java:1684)
  74. at org.mantisbt.connect.axis.MCSession.getIssue(MCSession.java:532)
  75. ... 1 more
  76. Caused by: org.xml.sax.SAXException: Invalid element in org.mantisbt.connect.axis.AttachmentData - user_id
  77. at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:264)
  78. at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
  79. at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
  80. at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
  81. at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
  82. at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
  83. at org.apache.axis.client.Call.invoke(Call.java:2583)
  84. ... 5 more
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top