|
Hi Manav, The only way I could think of doing this was to hack XmlRpcClient and XmlRpcClientWorker classes. In XmlRpcClientWorker.java do the following - 1. declare a private variable private String xmlStr; 2. decalre two methods public setXmlStr(String str) { this.xmlStr = str; } public String getXmlStr() { return this.xmlStr; } 3. In XmlRpcClientWorker hack the method (maybe on line 55) public Object execute(XmlRpcClientRequest xmlRpcRequest, XmlRpcTransport transport) throws XmlRpcException, XmlRpcClientException, IOException { long now = 0; Object response = PROCESSING_ERROR_FLAG; if (XmlRpc.debug) { now = System.currentTimeMillis(); } try { byte[] request = requestProcessor.encodeRequestBytes (xmlRpcRequest, responseProcessor.getEncoding()); // ADD ONE LINE HERE setXmlStr(new String(request)); InputStream is = transport.sendXmlRpc(request); response = responseProcessor.decodeResponse(is); return response; } catch (IOException ioe) { throw ioe; } // more code bla bla } } } } } 4. In XmlRpcClient hack the method (maybe on line 187) public Object execute(XmlRpcClientRequest request, XmlRpcTransport transport) throws XmlRpcException, IOException { XmlRpcClientWorker worker = getWorker(false); try { Object retval = worker.execute(request, transport); // Get your XML String and use the way you want String str = worker.getXmlStr(); return retval; } finally { releaseWorker(worker, false); } } Thats All! (ofcourse you have to recompile the classes) Its strange that there are no straightforward methods of getting the xml string directly. I am sending this mail to group coz it will be great to know if there IS another way! Manvendra Baghel wrote: hi Yixing I am new to XML RPC .Please can you tell how to view XML of XML-RPC request |
- <i4> and array type question,please help Yixing Ma
- Re: <i4> and array type question,please help Adam Taft
- Re: <i4> and array type question,please help Manvendra Baghel
- Re: <i4> and array type question,please he... Yixing Ma
- Re: <i4> and array type question,pleas... Manvendra Baghel
- Re: <i4> and array type question,p... Yixing Ma
- Re: <i4> and array type question,please he... rjoshi
- RE: <i4> and array type question,please help Karnes, Derek

