You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by hezjing <he...@gmail.com> on 2008/09/23 16:34:04 UTC

How to see XML-RPC request and response?

Hi
I'm using Apache XML-RPC to create a client, and send requests to a server.

How can I see the request and response in XML format?


Both client and server are running on the same Solaris server.


-- 

Hez

Re: XML RPC call hangs

Posted by Hybris <hy...@gmail.com>.
> Just to give you an update, I've tried xmlrpc-client-3.1.1, configuring it this way:
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(url);
> config.setReplyTimeout(60000);
> config.setConnectionTimeout(60000);
> _client = new XmlRpcClient();
> _client.setConfig(config);

I was having a lot of problems (mainly with streaming and compression 
that in some combination caused the client to hang and othe errors) 
using the commons transport that i believed to be better. The problems 
went away switching back to the default sun transport.
Try using a different trasport for the client.

[ANN] VTD-XML extended edition released

Posted by jimmy Zhang <cr...@comcast.net>.
The Java version of extended VTD-XmL is released and available for download.
This version supports 256 GB max file sizes and memory mapped capabilities.
The updated documentation is also available for download. In short, you can
basically do full XPath query on documents that are bigger than memory space
available on your machine.

A special thanks to Duane May who provided value suggestions and inputs and
helped refine the VTD specs to make this happen.

To download the package and the documentation, go to
https://sourceforge.net/project/downloading.php?group_id=110612&use_mirror=&filename=vtd-xml_2.4_doc.zip&64621261

https://sourceforge.net/project/downloading.php?group_id=110612&use_mirror=&filename=ximpleware_extended_2.4.zip&99532507




RE: XML RPC call hangs

Posted by Craig Spry <Cr...@redflex.com.au>.
Hello All,

The below worked, but you need to put version 3.0 of the http client in the class path and put in this line of code:
_client.setTransportFactory(new XmlRpcCommonsTransportFactory(_client));

Now the code works as I would have expected it to.

Thanks for your help,
Craig Spry

-----Original Message-----
From: Gam [mailto:gamaliel@fastmail.fm]
Sent: Friday, 10 October 2008 7:17 PM
To: xmlrpc-dev@ws.apache.org
Subject: Re: XML RPC call hangs

Hello Craig,
I second Hybris on this.

I ran into the same problem as you when I started using this library.
I think the problem is that the transport factory you are using DOES
NOT honor your timeout setting in XmlRpcClientConfig because it's
simply not implemented.
Unfortunately, I don't remember by heart which one does or doesn't.
They are listed here:
http://ws.apache.org/xmlrpc/client.html
You may check the code.

--

Sometimes ago, I noted that the version 3.x of this library started
to be very difficult to grasp for new user. I ran into many problems
when I switched from v2 to v3. I wrote that I felt it's against the
xmlrpc philosophy, but my post didn't get much echo.
I guess it's fair since the primary users of this library are the
ones developing it.
IMHO, v3 wanted to become more generic (we always say, it's better)
but lost pragmatism in the development. Now, we you set Reply or
Connection timeouts, you must be aware that your current transport
might or might not use the setting... You will then lose a lot of
valuable time "debugging" your ignorance...
Anyway, I believe v2 or maybe the RedStone library (http://
xmlrpc.sourceforge.net/ that I'll try next time I need to implement
xmlrpc) are better choices if you only need to do simple stuff with
xmlrpc.

Best Regards,
Gam.


On 10 Oct 2008, at 10:36, Craig Spry wrote:

> Hello List,
>
> Just to give you an update, I've tried xmlrpc-client-3.1.1,
> configuring it this way:
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(url);
> config.setReplyTimeout(60000);
> config.setConnectionTimeout(60000);
> _client = new XmlRpcClient();
> _client.setConfig(config);
>
> And I still get the same result.
>
> Thanks,
> Craig
> -----Original Message-----
> From: Craig Spry [mailto:CraigS@redflex.com.au]
> Sent: Friday, 10 October 2008 10:33 AM
> To: xmlrpc-dev@ws.apache.org
> Subject: XML RPC call hangs
>
> Hello List,
>
> I'm using xmlrpc-client-3.0 calling a XML RPC method on apache
> running on windows.  When I make a certain call it causes apache to
> hang on the windows machine.  Now I have my XML RPC client
> configured like this:
>
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(url);
> config.setReplyTimeout(60000);
> _client = new XmlRpcClient();
> _client.setConfig(config);
>
> Now I would expect that when this call hangs the client should wait
> around for 60 seconds then throw an exception, but instead it waits
> around until I restart the apache server.  Is there a way to
> configure the client to not hang when the server does?
>
> Thanks
> Craig Spry
>
> If you are not an authorised recipient of this e-mail, please
> contact me at Redflex immediately by return phone call or by email.
> In this case, you should not read, print, retransmit, store or act
> in reliance on this e-mail or any attachments, and should destroy
> all copies of them. This e-mail and any attachments are
> confidential and may contain privileged information and/or
> copyright material of Redflex or third parties. You should only
> retransmit, distribute or commercialise the material if you are
> authorised to do so. This notice should not be removed.
>
>
> If you are not an authorised recipient of this e-mail, please
> contact me at Redflex immediately by return phone call or by email.
> In this case, you should not read, print, retransmit, store or act
> in reliance on this e-mail or any attachments, and should destroy
> all copies of them. This e-mail and any attachments are
> confidential and may contain privileged information and/or
> copyright material of Redflex or third parties. You should only
> retransmit, distribute or commercialise the material if you are
> authorised to do so. This notice should not be removed.
>


If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.


Re: XML RPC call hangs

Posted by Gam <ga...@fastmail.fm>.
Hello Craig,
I second Hybris on this.

I ran into the same problem as you when I started using this library.  
I think the problem is that the transport factory you are using DOES  
NOT honor your timeout setting in XmlRpcClientConfig because it's  
simply not implemented.
Unfortunately, I don't remember by heart which one does or doesn't.  
They are listed here:
http://ws.apache.org/xmlrpc/client.html
You may check the code.

--

Sometimes ago, I noted that the version 3.x of this library started  
to be very difficult to grasp for new user. I ran into many problems  
when I switched from v2 to v3. I wrote that I felt it's against the  
xmlrpc philosophy, but my post didn't get much echo.
I guess it's fair since the primary users of this library are the  
ones developing it.
IMHO, v3 wanted to become more generic (we always say, it's better)  
but lost pragmatism in the development. Now, we you set Reply or  
Connection timeouts, you must be aware that your current transport  
might or might not use the setting... You will then lose a lot of  
valuable time "debugging" your ignorance...
Anyway, I believe v2 or maybe the RedStone library (http:// 
xmlrpc.sourceforge.net/ that I'll try next time I need to implement  
xmlrpc) are better choices if you only need to do simple stuff with  
xmlrpc.

Best Regards,
Gam.


On 10 Oct 2008, at 10:36, Craig Spry wrote:

> Hello List,
>
> Just to give you an update, I've tried xmlrpc-client-3.1.1,  
> configuring it this way:
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(url);
> config.setReplyTimeout(60000);
> config.setConnectionTimeout(60000);
> _client = new XmlRpcClient();
> _client.setConfig(config);
>
> And I still get the same result.
>
> Thanks,
> Craig
> -----Original Message-----
> From: Craig Spry [mailto:CraigS@redflex.com.au]
> Sent: Friday, 10 October 2008 10:33 AM
> To: xmlrpc-dev@ws.apache.org
> Subject: XML RPC call hangs
>
> Hello List,
>
> I'm using xmlrpc-client-3.0 calling a XML RPC method on apache  
> running on windows.  When I make a certain call it causes apache to  
> hang on the windows machine.  Now I have my XML RPC client  
> configured like this:
>
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(url);
> config.setReplyTimeout(60000);
> _client = new XmlRpcClient();
> _client.setConfig(config);
>
> Now I would expect that when this call hangs the client should wait  
> around for 60 seconds then throw an exception, but instead it waits  
> around until I restart the apache server.  Is there a way to  
> configure the client to not hang when the server does?
>
> Thanks
> Craig Spry
>
> If you are not an authorised recipient of this e-mail, please  
> contact me at Redflex immediately by return phone call or by email.  
> In this case, you should not read, print, retransmit, store or act  
> in reliance on this e-mail or any attachments, and should destroy  
> all copies of them. This e-mail and any attachments are  
> confidential and may contain privileged information and/or  
> copyright material of Redflex or third parties. You should only  
> retransmit, distribute or commercialise the material if you are  
> authorised to do so. This notice should not be removed.
>
>
> If you are not an authorised recipient of this e-mail, please  
> contact me at Redflex immediately by return phone call or by email.  
> In this case, you should not read, print, retransmit, store or act  
> in reliance on this e-mail or any attachments, and should destroy  
> all copies of them. This e-mail and any attachments are  
> confidential and may contain privileged information and/or  
> copyright material of Redflex or third parties. You should only  
> retransmit, distribute or commercialise the material if you are  
> authorised to do so. This notice should not be removed.
>


RE: XML RPC call hangs

Posted by Craig Spry <Cr...@redflex.com.au>.
Hello List,

Just to give you an update, I've tried xmlrpc-client-3.1.1, configuring it this way:
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(url);
config.setReplyTimeout(60000);
config.setConnectionTimeout(60000);
_client = new XmlRpcClient();
_client.setConfig(config);

And I still get the same result.

Thanks,
Craig
-----Original Message-----
From: Craig Spry [mailto:CraigS@redflex.com.au]
Sent: Friday, 10 October 2008 10:33 AM
To: xmlrpc-dev@ws.apache.org
Subject: XML RPC call hangs

Hello List,

I'm using xmlrpc-client-3.0 calling a XML RPC method on apache running on windows.  When I make a certain call it causes apache to hang on the windows machine.  Now I have my XML RPC client configured like this:

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(url);
config.setReplyTimeout(60000);
_client = new XmlRpcClient();
_client.setConfig(config);

Now I would expect that when this call hangs the client should wait around for 60 seconds then throw an exception, but instead it waits around until I restart the apache server.  Is there a way to configure the client to not hang when the server does?

Thanks
Craig Spry

If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.


If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.


XML RPC call hangs

Posted by Craig Spry <Cr...@redflex.com.au>.
Hello List,

I'm using xmlrpc-client-3.0 calling a XML RPC method on apache running on windows.  When I make a certain call it causes apache to hang on the windows machine.  Now I have my XML RPC client configured like this:

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(url);
config.setReplyTimeout(60000);
_client = new XmlRpcClient();
_client.setConfig(config);

Now I would expect that when this call hangs the client should wait around for 60 seconds then throw an exception, but instead it waits around until I restart the apache server.  Is there a way to configure the client to not hang when the server does?

Thanks
Craig Spry

If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.