ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fahad.aizaz" <fahadai...@gmail.com>
Subject Re: View client xml request before execution
Date Tue, 10 Nov 2009 20:17:10 GMT

Hi,

I used a serializer and created a string expression of the xml request.

Thanks for your response.

Fahad



fahad.aizaz wrote:
> 
> Hi Guys,
> 
> The purpose I am trying to achieve is to view the XML request in the
> "console" or "a file" before I use the execute method.
> 
> For example:
> The client code looks like this
> 
> public class XmlRpc {
> 
>     XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> 
>     public XmlWriter
> 
>     XmlRpc() {    }
> 
>     public void PrepareRequest() {
>         HashMap data = new HashMap();
>         data.put("Type", new String("ABC") );
>         data.put("Name", new String("DEF") );
>         data.put("TransID", new String("987654") );
>         data.put("originTimeStamp", new Date() );
>         Vector params = new Vector();
>         params.addElement(data);
>         
> 
>         XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> 
>         try {
>             config.setServerURL(new URL("http://192.168.0.1/owa"));
>             config.setUserAgent("Gateway");
>         } catch (MalformedURLException e) {
>             // TODO
>             System.err.println(e);
>         }
>         XmlRpcClient client = new XmlRpcClient();
>         client.setConfig(config);
> 
>         try {
>            System.out.println(client.execute("TestMethod", params));
>         } catch (XmlRpcException e) {
>             // TODO
>              System.err.println(e);
>         }
>     }
> 
> }
> 
> I would like to know if there is way that before i use the "execute"
> method to sent the information to the server, what is the xml request has
> been formulated. Is there anyway to see the XML request formulated and
> sent to file or console or any logger.
> 
> Your guidance would be highly appreciable.
> 
> regards,
> Fahad Aizaz
> 

-- 
View this message in context: http://old.nabble.com/View-client-xml-request-before-execution-tp26271804p26289084.html
Sent from the Apache Xml-RPC - User mailing list archive at Nabble.com.


Mime
View raw message