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 Lars Schnoor <La...@ifad.dk> on 2010/02/12 16:01:26 UTC

XML-RPC timeout

Hi
I have seen that the XmlRpcClientConfigImpl has two methods to set 
timeout, there is setReplyTimeout(int pTimeout) and 
setConnectionTimeout(int pTimeout). Do these methods do anything? I have 
used these methods to set the two timeouts to 2 and 5 seconds respectively.
I setup a client with these timeouts, print out a debug statement with 
timestamp and then I attempt to execute a XML-RPC method on my server 
which does not exist.
The first thing in my catch block for the exception is a new debug 
statement that tells me that attempted XML-RPC failed after about 20 
seconds.
So, for me it looks like XML-RPC does not care about the timeouts I set, 
is this correct? Is there a way to set the timeouts and have XML-RPC 
attempt for the timeout period?
I am using Windows XP.
Thanks

Lars

Re: XML-RPC timeout

Posted by Lars Schnoor <La...@ifad.dk>.
I did and it works now, thank you!


Jochen Wiedmann wrote:
> Quite possible. Try 3.1.3.
>
>
> On Mon, Feb 15, 2010 at 11:50 AM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> When I look at the source code for XML-RPC 3.1.2 I can't see any
>> initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a newer
>> thing?
>>
>> Jochen Wiedmann wrote:
>>     
>>> Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
>>> should demonstrate you that the timeout values are set. If they aren't
>>> working, contact Sun.
>>>
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor <La...@ifad.dk>
>>> wrote:
>>>
>>>       
>>>> Would this be correct?
>>>>              XmlRpcClientConfigImpl config = new
>>>> XmlRpcClientConfigImpl();
>>>>              config.setConnectionTimeout(2000);
>>>>              config.setReplyTimeout(5000);
>>>>              this.client = new XmlRpcClient();
>>>>              this.client.setConfig(config);
>>>>              this.client.setTransportFactory(new
>>>> XmlRpcSun15HttpTransportFactory(this.client));
>>>>
>>>> I tried it, but still get about 20 seconds before the XML-RPC invocation
>>>> fails.
>>>>
>>>>
>>>> Jochen Wiedmann wrote:
>>>>
>>>>         
>>>>> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk>
>>>>> wrote:
>>>>>
>>>>>
>>>>>           
>>>>>> How do I set the transport factory? I followed the example on the
>>>>>> website.
>>>>>>
>>>>>> Jochen Wiedmann wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Are you using a proper transport factory, like
>>>>>>> XmlRpcSun15HttpTransportFactory?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> Hi
>>>>>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>>>>>> timeout,
>>>>>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>>>>>> pTimeout). Do these methods do anything? I have used these methods to
>>>>>>>> set
>>>>>>>> the two timeouts to 2 and 5 seconds respectively.
>>>>>>>> I setup a client with these timeouts, print out a debug statement
>>>>>>>> with
>>>>>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>>>>>> which
>>>>>>>> does not exist.
>>>>>>>> The first thing in my catch block for the exception is a new debug
>>>>>>>> statement
>>>>>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>>>>>> So, for me it looks like XML-RPC does not care about the timeouts I
>>>>>>>> set,
>>>>>>>> is
>>>>>>>> this correct? Is there a way to set the timeouts and have XML-RPC
>>>>>>>> attempt
>>>>>>>> for the timeout period?
>>>>>>>> I am using Windows XP.
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Lars
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>               
>>>>>
>>>>>           
>>>
>>>
>>>       
>
>
>
>   

Re: XML-RPC timeout

Posted by Jochen Wiedmann <jo...@gmail.com>.
Quite possible. Try 3.1.3.


On Mon, Feb 15, 2010 at 11:50 AM, Lars Schnoor <La...@ifad.dk> wrote:
> When I look at the source code for XML-RPC 3.1.2 I can't see any
> initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a newer
> thing?
>
> Jochen Wiedmann wrote:
>>
>> Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
>> should demonstrate you that the timeout values are set. If they aren't
>> working, contact Sun.
>>
>>
>>
>> On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor <La...@ifad.dk>
>> wrote:
>>
>>>
>>> Would this be correct?
>>>              XmlRpcClientConfigImpl config = new
>>> XmlRpcClientConfigImpl();
>>>              config.setConnectionTimeout(2000);
>>>              config.setReplyTimeout(5000);
>>>              this.client = new XmlRpcClient();
>>>              this.client.setConfig(config);
>>>              this.client.setTransportFactory(new
>>> XmlRpcSun15HttpTransportFactory(this.client));
>>>
>>> I tried it, but still get about 20 seconds before the XML-RPC invocation
>>> fails.
>>>
>>>
>>> Jochen Wiedmann wrote:
>>>
>>>>
>>>>
>>>> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>>>>
>>>>
>>>>
>>>> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> How do I set the transport factory? I followed the example on the
>>>>> website.
>>>>>
>>>>> Jochen Wiedmann wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> Are you using a proper transport factory, like
>>>>>> XmlRpcSun15HttpTransportFactory?
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Hi
>>>>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>>>>> timeout,
>>>>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>>>>> pTimeout). Do these methods do anything? I have used these methods to
>>>>>>> set
>>>>>>> the two timeouts to 2 and 5 seconds respectively.
>>>>>>> I setup a client with these timeouts, print out a debug statement
>>>>>>> with
>>>>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>>>>> which
>>>>>>> does not exist.
>>>>>>> The first thing in my catch block for the exception is a new debug
>>>>>>> statement
>>>>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>>>>> So, for me it looks like XML-RPC does not care about the timeouts I
>>>>>>> set,
>>>>>>> is
>>>>>>> this correct? Is there a way to set the timeouts and have XML-RPC
>>>>>>> attempt
>>>>>>> for the timeout period?
>>>>>>> I am using Windows XP.
>>>>>>> Thanks
>>>>>>>
>>>>>>> Lars
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
>



-- 
Germanys national anthem is the most boring in the world - how telling!

Re: XML-RPC timeout

Posted by Lars Schnoor <La...@ifad.dk>.
When I look at the source code for XML-RPC 3.1.2 I can't see any 
initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a 
newer thing?

Jochen Wiedmann wrote:
> Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
> should demonstrate you that the timeout values are set. If they aren't
> working, contact Sun.
>
>
>
> On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> Would this be correct?
>>               XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
>>               config.setConnectionTimeout(2000);
>>               config.setReplyTimeout(5000);
>>               this.client = new XmlRpcClient();
>>               this.client.setConfig(config);
>>               this.client.setTransportFactory(new
>> XmlRpcSun15HttpTransportFactory(this.client));
>>
>> I tried it, but still get about 20 seconds before the XML-RPC invocation
>> fails.
>>
>>
>> Jochen Wiedmann wrote:
>>     
>>> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>>>
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk>
>>> wrote:
>>>
>>>       
>>>> How do I set the transport factory? I followed the example on the
>>>> website.
>>>>
>>>> Jochen Wiedmann wrote:
>>>>
>>>>         
>>>>> Are you using a proper transport factory, like
>>>>> XmlRpcSun15HttpTransportFactory?
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>>>> wrote:
>>>>>
>>>>>
>>>>>           
>>>>>> Hi
>>>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>>>> timeout,
>>>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>>>> pTimeout). Do these methods do anything? I have used these methods to
>>>>>> set
>>>>>> the two timeouts to 2 and 5 seconds respectively.
>>>>>> I setup a client with these timeouts, print out a debug statement with
>>>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>>>> which
>>>>>> does not exist.
>>>>>> The first thing in my catch block for the exception is a new debug
>>>>>> statement
>>>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>>>> So, for me it looks like XML-RPC does not care about the timeouts I
>>>>>> set,
>>>>>> is
>>>>>> this correct? Is there a way to set the timeouts and have XML-RPC
>>>>>> attempt
>>>>>> for the timeout period?
>>>>>> I am using Windows XP.
>>>>>> Thanks
>>>>>>
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>>           
>>>
>>>
>>>       
>
>
>
>   

Re: XML-RPC timeout

Posted by Lars Schnoor <La...@ifad.dk>.
Are you referring to a bug in the JRE?

Jochen Wiedmann wrote:
> Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
> should demonstrate you that the timeout values are set. If they aren't
> working, contact Sun.
>
>
>
> On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> Would this be correct?
>>               XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
>>               config.setConnectionTimeout(2000);
>>               config.setReplyTimeout(5000);
>>               this.client = new XmlRpcClient();
>>               this.client.setConfig(config);
>>               this.client.setTransportFactory(new
>> XmlRpcSun15HttpTransportFactory(this.client));
>>
>> I tried it, but still get about 20 seconds before the XML-RPC invocation
>> fails.
>>
>>
>> Jochen Wiedmann wrote:
>>     
>>> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>>>
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk>
>>> wrote:
>>>
>>>       
>>>> How do I set the transport factory? I followed the example on the
>>>> website.
>>>>
>>>> Jochen Wiedmann wrote:
>>>>
>>>>         
>>>>> Are you using a proper transport factory, like
>>>>> XmlRpcSun15HttpTransportFactory?
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>>>> wrote:
>>>>>
>>>>>
>>>>>           
>>>>>> Hi
>>>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>>>> timeout,
>>>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>>>> pTimeout). Do these methods do anything? I have used these methods to
>>>>>> set
>>>>>> the two timeouts to 2 and 5 seconds respectively.
>>>>>> I setup a client with these timeouts, print out a debug statement with
>>>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>>>> which
>>>>>> does not exist.
>>>>>> The first thing in my catch block for the exception is a new debug
>>>>>> statement
>>>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>>>> So, for me it looks like XML-RPC does not care about the timeouts I
>>>>>> set,
>>>>>> is
>>>>>> this correct? Is there a way to set the timeouts and have XML-RPC
>>>>>> attempt
>>>>>> for the timeout period?
>>>>>> I am using Windows XP.
>>>>>> Thanks
>>>>>>
>>>>>> Lars
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>>           
>>>
>>>
>>>       
>
>
>
>   

Re: XML-RPC timeout

Posted by Jochen Wiedmann <jo...@gmail.com>.
Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
should demonstrate you that the timeout values are set. If they aren't
working, contact Sun.



On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor <La...@ifad.dk> wrote:
> Would this be correct?
>               XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
>               config.setConnectionTimeout(2000);
>               config.setReplyTimeout(5000);
>               this.client = new XmlRpcClient();
>               this.client.setConfig(config);
>               this.client.setTransportFactory(new
> XmlRpcSun15HttpTransportFactory(this.client));
>
> I tried it, but still get about 20 seconds before the XML-RPC invocation
> fails.
>
>
> Jochen Wiedmann wrote:
>>
>>
>> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>>
>>
>>
>> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk>
>> wrote:
>>
>>>
>>> How do I set the transport factory? I followed the example on the
>>> website.
>>>
>>> Jochen Wiedmann wrote:
>>>
>>>>
>>>> Are you using a proper transport factory, like
>>>> XmlRpcSun15HttpTransportFactory?
>>>>
>>>>
>>>>
>>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> Hi
>>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>>> timeout,
>>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>>> pTimeout). Do these methods do anything? I have used these methods to
>>>>> set
>>>>> the two timeouts to 2 and 5 seconds respectively.
>>>>> I setup a client with these timeouts, print out a debug statement with
>>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>>> which
>>>>> does not exist.
>>>>> The first thing in my catch block for the exception is a new debug
>>>>> statement
>>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>>> So, for me it looks like XML-RPC does not care about the timeouts I
>>>>> set,
>>>>> is
>>>>> this correct? Is there a way to set the timeouts and have XML-RPC
>>>>> attempt
>>>>> for the timeout period?
>>>>> I am using Windows XP.
>>>>> Thanks
>>>>>
>>>>> Lars
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
>



-- 
Germanys national anthem is the most boring in the world - how telling!

Re: XML-RPC timeout

Posted by Lars Schnoor <La...@ifad.dk>.
Would this be correct?
                XmlRpcClientConfigImpl config = new 
XmlRpcClientConfigImpl();
                config.setConnectionTimeout(2000);
                config.setReplyTimeout(5000);
                this.client = new XmlRpcClient();
                this.client.setConfig(config);
                this.client.setTransportFactory(new 
XmlRpcSun15HttpTransportFactory(this.client));

I tried it, but still get about 20 seconds before the XML-RPC invocation 
fails.


Jochen Wiedmann wrote:
> http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)
>
>
>
> On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> How do I set the transport factory? I followed the example on the website.
>>
>> Jochen Wiedmann wrote:
>>     
>>> Are you using a proper transport factory, like
>>> XmlRpcSun15HttpTransportFactory?
>>>
>>>
>>>
>>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>>> wrote:
>>>
>>>       
>>>> Hi
>>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>>> timeout,
>>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>>> pTimeout). Do these methods do anything? I have used these methods to set
>>>> the two timeouts to 2 and 5 seconds respectively.
>>>> I setup a client with these timeouts, print out a debug statement with
>>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>>> which
>>>> does not exist.
>>>> The first thing in my catch block for the exception is a new debug
>>>> statement
>>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>>> So, for me it looks like XML-RPC does not care about the timeouts I set,
>>>> is
>>>> this correct? Is there a way to set the timeouts and have XML-RPC attempt
>>>> for the timeout period?
>>>> I am using Windows XP.
>>>> Thanks
>>>>
>>>> Lars
>>>>
>>>>
>>>>         
>>>
>>>
>>>       
>
>
>
>   

Re: XML-RPC timeout

Posted by Jochen Wiedmann <jo...@gmail.com>.
http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)



On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor <La...@ifad.dk> wrote:
> How do I set the transport factory? I followed the example on the website.
>
> Jochen Wiedmann wrote:
>>
>> Are you using a proper transport factory, like
>> XmlRpcSun15HttpTransportFactory?
>>
>>
>>
>> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk>
>> wrote:
>>
>>>
>>> Hi
>>> I have seen that the XmlRpcClientConfigImpl has two methods to set
>>> timeout,
>>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>>> pTimeout). Do these methods do anything? I have used these methods to set
>>> the two timeouts to 2 and 5 seconds respectively.
>>> I setup a client with these timeouts, print out a debug statement with
>>> timestamp and then I attempt to execute a XML-RPC method on my server
>>> which
>>> does not exist.
>>> The first thing in my catch block for the exception is a new debug
>>> statement
>>> that tells me that attempted XML-RPC failed after about 20 seconds.
>>> So, for me it looks like XML-RPC does not care about the timeouts I set,
>>> is
>>> this correct? Is there a way to set the timeouts and have XML-RPC attempt
>>> for the timeout period?
>>> I am using Windows XP.
>>> Thanks
>>>
>>> Lars
>>>
>>>
>>
>>
>>
>>
>



-- 
Germanys national anthem is the most boring in the world - how telling!

Re: XML-RPC timeout

Posted by Lars Schnoor <La...@ifad.dk>.
How do I set the transport factory? I followed the example on the website.

Jochen Wiedmann wrote:
> Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory?
>
>
>
> On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> Hi
>> I have seen that the XmlRpcClientConfigImpl has two methods to set timeout,
>> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
>> pTimeout). Do these methods do anything? I have used these methods to set
>> the two timeouts to 2 and 5 seconds respectively.
>> I setup a client with these timeouts, print out a debug statement with
>> timestamp and then I attempt to execute a XML-RPC method on my server which
>> does not exist.
>> The first thing in my catch block for the exception is a new debug statement
>> that tells me that attempted XML-RPC failed after about 20 seconds.
>> So, for me it looks like XML-RPC does not care about the timeouts I set, is
>> this correct? Is there a way to set the timeouts and have XML-RPC attempt
>> for the timeout period?
>> I am using Windows XP.
>> Thanks
>>
>> Lars
>>
>>     
>
>
>
>   

Re: XML-RPC timeout

Posted by Jochen Wiedmann <jo...@gmail.com>.
Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory?



On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor <La...@ifad.dk> wrote:
> Hi
> I have seen that the XmlRpcClientConfigImpl has two methods to set timeout,
> there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
> pTimeout). Do these methods do anything? I have used these methods to set
> the two timeouts to 2 and 5 seconds respectively.
> I setup a client with these timeouts, print out a debug statement with
> timestamp and then I attempt to execute a XML-RPC method on my server which
> does not exist.
> The first thing in my catch block for the exception is a new debug statement
> that tells me that attempted XML-RPC failed after about 20 seconds.
> So, for me it looks like XML-RPC does not care about the timeouts I set, is
> this correct? Is there a way to set the timeouts and have XML-RPC attempt
> for the timeout period?
> I am using Windows XP.
> Thanks
>
> Lars
>



-- 
Germanys national anthem is the most boring in the world - how telling!