在wso2esb中代理Bugzilla

时间:2012-06-14 06:10:33

标签: xml-rpc esb wso2 bugzilla wso2esb

在向Bugzilla的代理webservice(wso2esb)发送请求时,我收到异常: wso2esb中的端点:https://bugzilla.mozilla.org/xmlrpc.cgi

Exception in thread "main" org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned unexpected status: Internal Server Error
    at org.apache.xmlrpc.client.XmlRpcCommonsTransport.checkStatus(XmlRpcCommonsTransport.java:259)
    at org.apache.xmlrpc.client.XmlRpcCommonsTransport.getInputStream(XmlRpcCommonsTransport.java:118)
    at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:152)
    at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
    at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
    at Ser.main(Ser.java:55)

我在客户端的代码是:

 public static void main(String[] args){
                    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
            config.setServerURL(new URL("https://127.0.0.1:8243/services/bugzilla"));
            XmlRpcClient client = new XmlRpcClient();
            client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
            client.setConfig(config);


            Map<String , Object> map = new HashMap<String , Object>();
            map.put("login", "********@****.com");
            map.put("password", "#######");
            map.put("remember", true);





                    HashMap res = (HashMap)client.execute("User.login", new Object[]{ map });

            System.out.println(res);
            }

我的服务器端日志是:

[2012-06-14 11:33:53,167] ERROR - ServerWorker Error processing POST request 
org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found methodCall
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:174)
    at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
    at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found methodCall
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:305)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:252)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:234)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
    at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
    at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
    at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
    at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
    at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:179)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
    ... 6 more

我认为这应该是服务器端问题..

1 个答案:

答案 0 :(得分:0)

你使用的是bugzilla rest api吗? https://wiki.mozilla.org/Bugzilla:REST_API