From yharris@example.net Mon Sep 01 07:39:40 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 77109 invoked from network); 1 Sep 2003 07:39:39 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 07:39:39 -0000 Received: (qmail 89731 invoked by uid 500); 1 Sep 2003 07:38:42 -0000 Delivered-To: yharris@example.net Received: (qmail 89708 invoked by uid 500); 1 Sep 2003 07:38:42 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 89694 invoked from network); 1 Sep 2003 07:38:41 -0000 Received: from unknown (HELO mail2.creval.it) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 07:38:41 -0000 Received: from minetex2.creval.gcv ([83.161.120.155]) by mail2.creval.it with Microsoft SMTPSVC(5.0.2195.6713); Mon, 1 Sep 2003 09:40:56 +0200 Received: from sobb0ex1.creval.gcv ([83.161.120.155]) by minetex2.creval.gcv with Microsoft SMTPSVC(5.0.2195.6713); Mon, 1 Sep 2003 09:35:49 +0200 content-class: urn:content-classes:message Subject: R: In/out parameters MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Mon, 1 Sep 2003 09:35:11 +0200 Message-ID: <yharris@example.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: In/out parameters Thread-Index: AcNuMdm3fXYCX+NLScm5oCGGvhDM/QCJvc/g From: "Trimarchi Michele" <yharris@example.net> To: <yharris@example.net> X-OriginalArrivalTime: 01 Sep 2003 07:35:49.0085 (UTC) FILETIME=[A9DFB0D0:01C3705B] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Scott.. Thank u very much for your answer. Please , can u tell me if what i done is right? .NET expose on its WSDL (with style=3D'rpc') this response message. <message name=3D'wf.VerifyResponse'> <part name=3D'User' type=3D'xsd:boolean'/> <part name=3D'XMLData' type=3D'xsd:string'/> <part name=3D'Error' type=3D'xsd:string'/> </message> As u can see it does not define a complextype because it's using in/out = parameters (and i cannot handle it with apache soap 2.3.1). My application invokes web services with=20 Response response =3D call.invoke(new URL(stringURL), SOAPActionURI); and to get the response values it uses Parameter refValue =3D response .getReturnValue(); (to get the first = 'User' part) Vector vectorParameter=3Dresponse.getParams(); (to get the second = 'XMLData' end third 'Error' parts) I don't know if it is correct but it's working good. Bye Michele -----Messaggio originale----- Da: Scott Nichol [mailto:yharris@example.net]=20 Inviato: Friday, August 29, 2003 3:35 PM A: yharris@example.net Oggetto: Re: In/out parameters Apache SOAP does not handle output parameters. I added my own support = for this for a client of mine some time ago, but I do not think the = method was good enough for general inclusion in Apache SOAP. Basically, = all array parameters were treated as inout (since in Java, using an = array is one common way of similating a "by reference" semantic). The = values for the arrays were copied to the response message after the Java = method was called. To use this, however, the server must be aware that = the parameters are arrays, which would not be the case with existing = .NET and Axis services. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message -----=20 From: "Trimarchi Michele" <yharris@example.net> To: <yharris@example.net> Sent: Friday, August 29, 2003 4:33 AM Subject: In/out parameters Hi to all I have a big problem invoking a .NET web service that uses In/Out = parameter instead creating a complex type returned by the Procedure. Is = it possible to use in/out parameters on an RPC call with apache soap = 2.3.1 ? I saw that other implementations like AXIS and GLUE allow it = with INOUT attribute on Parameter class. Any helps will be very appreciated... Bye Michele From yharris@example.net Tue Sep 02 08:05:35 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 28863 invoked from network); 2 Sep 2003 08:05:35 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 08:05:35 -0000 Received: (qmail 43495 invoked by uid 500); 2 Sep 2003 08:04:31 -0000 Delivered-To: yharris@example.net Received: (qmail 43411 invoked by uid 500); 2 Sep 2003 08:04:29 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 43355 invoked from network); 2 Sep 2003 08:04:28 -0000 Received: from unknown (HELO mta06ps.bigpond.com) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Sep 2003 08:04:28 -0000 Received: from migasia.com ([83.161.120.155]) by mta06ps.bigpond.com (Netscape Messaging Server 4.15 mta06ps May 23 2002 23:53:28) with SMTP id HKK77X00.APF for <yharris@example.net>; Tue, 2 Sep 2003 09:43:09 +1000 Received: from cpe-144-137-74-25.nsw.bigpond.net.au ([83.161.120.155]) by psmam01.bigpond.com(MAM REL_3_3_2c 65/41970013); 02 Sep 2003 09:43:05 Message-ID: <yharris@example.net> Date: Tue, 02 Sep 2003 09:43:59 +1000 From: "Jesus M. Salvo Jr." <yharris@example.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yharris@example.net Subject: Re: Timeout on SSL sockets References: <yharris@example.net> In-Reply-To: <yharris@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 In HTTPUtils, I see this: if (timeout > 0) // Should be redundant but not every JVM likes this s.setSoTimeout(timeout); ... where the SO_TIMEOUT is set after creating the socket ( be it SSL or non-SSL ). yharris@example.net wrote: >Hi all, > >I want to have a timeout mechanism when my program send a SOAP message to a >server using SSL. It does not work in my version (2.3.1) of Apache SOAP (my >program waits indefinitely if the server do not respond). I have browsed >the nightly builds and found a fix there but it requires JDK 1.4.x. > >Anyone know if a fix exists for JDK 1.3.x? > >Thanks. > >Billy > >************************************************************ >The Hongkong and Shanghai Banking Corporation Limited >whose registered address is 1 Queen's Road Central, Hong Kong >************************************************************ > > > > > >********************************************************************** >This E-mail is confidential. It may also be legally privileged. >If you are not the addressee you may not copy, forward, disclose >or use any part of it. If you have received this message in error, >please delete it and all copies from your system and notify the >sender immediately by return E-mail. > >Internet communications cannot be guaranteed to be timely, >secure, error or virus-free. The sender does not accept liability >for any errors or omissions. >********************************************************************** > > > > > -- Jesus M. Salvo Jr. Mobile Internet Group Pty Ltd (formerly Softgame International Pty Ltd) M: 734.350.6962 T: 734.350.6962 F: 734.350.6962 PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348 From yharris@example.net Tue Sep 02 12:32:27 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 82264 invoked from network); 2 Sep 2003 12:32:27 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 12:32:27 -0000 Received: (qmail 889 invoked by uid 500); 2 Sep 2003 12:32:08 -0000 Delivered-To: yharris@example.net Received: (qmail 774 invoked by uid 500); 2 Sep 2003 12:32:06 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 738 invoked from network); 2 Sep 2003 12:32:05 -0000 Received: from unknown (HELO hkmswp06srv01.hkmswp06) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Sep 2003 12:32:05 -0000 Received: from apac-smtp-01.hsbc.com (unverified) by hkmswp06srv01.hkmswp06 (Content Technologies SMTPRS 4.2.10) with ESMTP id <yharris@example.net> for <yharris@example.net>; Tue, 2 Sep 2003 20:29:27 +0800 MIME-Version: 1.0 Sensitivity: To: yharris@example.net Subject: Memo: Re: Timeout on SSL sockets X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 Message-ID: <yharris@example.net> From: yharris@example.net Date: Tue, 2 Sep 2003 20:31:28 +0800 X-MIMETrack: S/MIME Sign by Notes Client on Billy T S KAN/TRS IBM APH/HBAP/HSBC(Release 5.0.8 |June 18, 2001) at 02/09/2003 20:41:09, Serialize by Notes Client on Billy T S KAN/TRS IBM APH/HBAP/HSBC(Release 5.0.8 |June 18, 2001) at 02/09/2003 20:41:09, Serialize complete at 02/09/2003 20:41:09, S/MIME Sign failed at 02/09/2003 20:41:09: The cryptographic key was not found, Serialize by Router on APAC-SMTP-01/SERVERS/HSBC(Release 5.0.10 |March 22, 2002) at 09/02/2003 08:31:37 PM, Serialize complete at 09/02/2003 08:31:37 PM Content-Type: multipart/alternative; boundary="=_alternative 0045AF8348256D95_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 0045AF8348256D95_= Content-Type: text/plain; charset="us-ascii" I have tried this before and it seems to work only for HTTP but not HTTPS. When looking at the source code in SSLUtils, I found the timeout is set after the SSL handshaking and I suspect that's the reason why it doesn't work. I've modified the code to set the timeout before handshaking and it works - most of the time. For some cases it doesn't work. Actually does anyone how the timeout is implemented? Would the timeout mechanism be not working if my program (which is a multi-thread one) is extremely busy? Billy To: yharris@example.net cc: Our Ref: Your Ref: Subject: Re: Timeout on SSL sockets I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 In HTTPUtils, I see this: if (timeout > 0) // Should be redundant but not every JVM likes this s.setSoTimeout(timeout); ... where the SO_TIMEOUT is set after creating the socket ( be it SSL or non-SSL ). yharris@example.net wrote: >Hi all, > >I want to have a timeout mechanism when my program send a SOAP message to a >server using SSL. It does not work in my version (2.3.1) of Apache SOAP (my >program waits indefinitely if the server do not respond). I have browsed >the nightly builds and found a fix there but it requires JDK 1.4.x. > >Anyone know if a fix exists for JDK 1.3.x? > >Thanks. > >Billy > >************************************************************ >The Hongkong and Shanghai Banking Corporation Limited >whose registered address is 1 Queen's Road Central, Hong Kong >************************************************************ > > > > > >********************************************************************** >This E-mail is confidential. It may also be legally privileged. >If you are not the addressee you may not copy, forward, disclose >or use any part of it. If you have received this message in error, >please delete it and all copies from your system and notify the >sender immediately by return E-mail. > >Internet communications cannot be guaranteed to be timely, >secure, error or virus-free. The sender does not accept liability >for any errors or omissions. >********************************************************************** > > > > > -- Jesus M. Salvo Jr. Mobile Internet Group Pty Ltd (formerly Softgame International Pty Ltd) M: 734.350.6962 T: 734.350.6962 F: 734.350.6962 PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348 ************************************************************************* This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ************************************************************************** ************************************************************ The Hongkong and Shanghai Banking Corporation Limited whose registered address is 1 Queen's Road Central, Hong Kong ************************************************************ ********************************************************************** This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. ********************************************************************** --=_alternative 0045AF8348256D95_= Content-Type: text/html; charset="us-ascii" <br><font size=2 face="sans-serif">I have tried this before and it seems to work only for HTTP but not HTTPS.</font> <br> <br><font size=2 face="sans-serif">When looking at the source code in SSLUtils, I found the timeout is set after the SSL handshaking and I suspect that's the reason why it doesn't work. I've modified the code to set the timeout before handshaking and it works - most of &nbsp;the time. For some cases it doesn't work.</font> <br> <br><font size=2 face="sans-serif">Actually does anyone how the timeout is implemented? Would the timeout mechanism be not working if my program (which is a multi-thread one) is extremely busy?</font> <br> <br><font size=2 face="sans-serif">Billy</font> <br> <br> <br> <br> <br><font size=1 color=#000080 face="sans-serif"><b>To: &nbsp; &nbsp; &nbsp; &nbsp;</b></font><font size=1 face="sans-serif">yharris@example.net</font> <br><font size=1 color=#000080 face="sans-serif"><b>cc: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</b></font> <br> <table> <tr valign=top> <td> <td> <tr valign=top> <td><font size=1 color=#000080 face="sans-serif"><b>Our Ref: &nbsp;</b></font> <td><font size=1 color=#000080 face="sans-serif"><b>Your Ref: &nbsp; </b></font></table> <br><font size=1 color=#000080 face="sans-serif"><b>Subject: &nbsp; &nbsp; &nbsp; &nbsp; </b></font><font size=1 face="sans-serif">Re: Timeout on SSL sockets</font><font size=1 color=#000080 face="sans-serif"><b> &nbsp; </b></font> <br> <br> <br> <br><font size=2><tt>I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1<br> </tt></font> <br><font size=2><tt>In HTTPUtils, I see this:<br> </tt></font> <br><font size=2><tt>if (timeout &gt; 0) &nbsp;// Should be redundant but not every JVM<br> likes this</tt></font> <br><font size=2><tt>s.setSoTimeout(timeout);<br> </tt></font> <br><font size=2><tt>... where the SO_TIMEOUT is set after creating the socket ( be it SSL or<br> non-SSL ).<br> </tt></font> <br> <br><font size=2><tt>yharris@example.net wrote:<br> </tt></font> <br><font size=2><tt>&gt;Hi all,<br> &gt;<br> &gt;I want to have a timeout mechanism when my program send a SOAP message to a<br> &gt;server using SSL. It does not work in my version (2.3.1) of Apache SOAP (my<br> &gt;program waits indefinitely if the server do not respond). I have browsed<br> &gt;the nightly builds and found a fix there but it requires JDK 1.4.x.<br> &gt;<br> &gt;Anyone know if a fix exists for JDK 1.3.x?<br> &gt;<br> &gt;Thanks.<br> &gt;<br> &gt;Billy<br> &gt;<br> &gt;************************************************************<br> &gt;The Hongkong and Shanghai Banking Corporation Limited<br> &gt;whose registered address is 1 Queen's Road Central, Hong Kong<br> &gt;************************************************************<br> &gt;<br> &gt;<br> &gt;<br> &gt;<br> &gt;<br> &gt;**********************************************************************<br> &gt;This E-mail is confidential. It may also be legally privileged.<br> &gt;If you are not the addressee you may not copy, forward, disclose<br> &gt;or use any part of it. If you have received this message in error,<br> &gt;please delete it and all copies from your system and notify the<br> &gt;sender immediately by return E-mail.<br> &gt;<br> &gt;Internet communications cannot be guaranteed to be timely,<br> &gt;secure, error or virus-free. The sender does not accept liability<br> &gt;for any errors or omissions.<br> &gt;**********************************************************************<br> &gt;<br> &gt;<br> &gt;<br> &gt;<br> &gt;<br> </tt></font> <br> <br><font size=2><tt>--<br> Jesus M. Salvo Jr.<br> Mobile Internet Group Pty Ltd<br> (formerly Softgame International Pty Ltd)<br> M: 734.350.6962<br> T: 734.350.6962<br> F: 734.350.6962<br> </tt></font> <br><font size=2><tt>PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0xC0BA5348<br> </tt></font> <br> <br> <br> <br> <br><font size=2><tt>*************************************************************************<br> This message originated from the Internet. Its originator may or<br> may not be who they claim to be and the information contained in<br> the message and any attachments may or may not be accurate.</tt></font> <br><font size=2><tt>**************************************************************************</tt></font> <br> <br> <br><font size=2 face="sans-serif"><br> <br> ************************************************************<br> The Hongkong and Shanghai Banking Corporation Limited<br> whose registered address is 1 Queen's Road Central, Hong Kong<br> ************************************************************<br> </font><CODE><FONT SIZE=3><BR> <BR> **********************************************************************<BR> This E-mail is confidential. It may also be legally privileged.<BR> If you are not the addressee you may not copy, forward, disclose<BR> or use any part of it. If you have received this message in error,<BR> please delete it and all copies from your system and notify the<BR> sender immediately by return E-mail.<BR> <BR> Internet communications cannot be guaranteed to be timely,<BR> secure, error or virus-free. The sender does not accept liability<BR> for any errors or omissions.<BR> **********************************************************************<BR> </FONT></CODE> --=_alternative 0045AF8348256D95_=-- From yharris@example.net Tue Sep 02 15:14:14 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 71204 invoked from network); 2 Sep 2003 15:14:14 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 15:14:14 -0000 Received: (qmail 71909 invoked by uid 500); 2 Sep 2003 15:13:55 -0000 Delivered-To: yharris@example.net Received: (qmail 71884 invoked by uid 500); 2 Sep 2003 15:13:55 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 71864 invoked from network); 2 Sep 2003 15:13:54 -0000 Received: from unknown (HELO rwcrmhc12.comcast.net) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Sep 2003 15:13:54 -0000 Received: from northgate (pcp01349572pcs.lowmrn01.pa.comcast.net[83.161.120.155](untrusted sender)) by comcast.net (rwcrmhc12) with SMTP id <2003090215134701400p2p0ae>; Tue, 2 Sep 2003 15:13:47 +0000 Message-ID: <021601c37165$6524ec20$6401a8c0@northgate> From: "Scott Nichol" <yharris@example.net> To: <yharris@example.net> References: <yharris@example.net> Subject: Re: Re: Timeout on SSL sockets Date: Tue, 2 Sep 2003 11:17:59 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N There are two different places for timeouts, socket connections and = socket reads. Prior to JDK 1.4, there was no way to set the timeout for = socket connections, because the Socket constructor also established the = connection. Starting with JDK 1.4, there is also a default constructor = that does not establish the connection, and a separate connect method = with a timeout parameter. Timeouts for socket reads are set by = setSoTimeout, which has been around since early JDKs. Apache SOAP has called setSoTimeout for some time. Version 2.3.1 calls = it. Only the nightly build of Apache SOAP leverages the ability of JDK = 1.4 to timeout the connect. If you are using JDK 1.3.x, you can 'hang' = on the connection, although I would not continue for an infinite amount = of time, as TCP/IP would normally stop trying to establish the = connection after a few SYNs are sent. In looking at the code, it appears as if read timeouts are not set = before handshaking, which probably makes it possible to hang = indefinitely during the handshake. I will make changes to SSLUtils to = set read timeouts before handshaking. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message -----=20 From: <yharris@example.net> To: <yharris@example.net> Sent: Tuesday, September 02, 2003 8:31 AM Subject: Memo: Re: Timeout on SSL sockets > I have tried this before and it seems to work only for HTTP but not = HTTPS. >=20 > When looking at the source code in SSLUtils, I found the timeout is = set=20 > after the SSL handshaking and I suspect that's the reason why it = doesn't=20 > work. I've modified the code to set the timeout before handshaking and = it=20 > works - most of the time. For some cases it doesn't work. >=20 > Actually does anyone how the timeout is implemented? Would the timeout = > mechanism be not working if my program (which is a multi-thread one) = is=20 > extremely busy? >=20 > Billy >=20 >=20 >=20 >=20 > To: yharris@example.net > cc:=20 >=20 >=20 >=20 > Our Ref:=20 > Your Ref:=20 > Subject: Re: Timeout on SSL sockets=20 >=20 >=20 >=20 > I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 >=20 > In HTTPUtils, I see this: >=20 > if (timeout > 0) // Should be redundant but not every JVM > likes this > s.setSoTimeout(timeout); >=20 > ... where the SO_TIMEOUT is set after creating the socket ( be it SSL = or > non-SSL ). >=20 >=20 > yharris@example.net wrote: >=20 > >Hi all, > > > >I want to have a timeout mechanism when my program send a SOAP = message to=20 > a > >server using SSL. It does not work in my version (2.3.1) of Apache = SOAP=20 > (my > >program waits indefinitely if the server do not respond). I have = browsed > >the nightly builds and found a fix there but it requires JDK 1.4.x. > > > >Anyone know if a fix exists for JDK 1.3.x? > > > >Thanks. > > > >Billy > > > >************************************************************ > >The Hongkong and Shanghai Banking Corporation Limited > >whose registered address is 1 Queen's Road Central, Hong Kong > >************************************************************ > > > > > > > > > > > = >********************************************************************** > >This E-mail is confidential. It may also be legally privileged. > >If you are not the addressee you may not copy, forward, disclose > >or use any part of it. If you have received this message in error, > >please delete it and all copies from your system and notify the > >sender immediately by return E-mail. > > > >Internet communications cannot be guaranteed to be timely, > >secure, error or virus-free. The sender does not accept liability > >for any errors or omissions. > = >********************************************************************** > > > > > > > > > > >=20 >=20 > -- > Jesus M. Salvo Jr. > Mobile Internet Group Pty Ltd > (formerly Softgame International Pty Ltd) > M: 734.350.6962 > T: 734.350.6962 > F: 734.350.6962 >=20 > PGP Public key: = http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0xC0BA5348 >=20 >=20 >=20 >=20 >=20 > = *************************************************************************= > This message originated from the Internet. Its originator may or > may not be who they claim to be and the information contained in > the message and any attachments may or may not be accurate. > = *************************************************************************= * >=20 >=20 >=20 >=20 > ************************************************************ > The Hongkong and Shanghai Banking Corporation Limited > whose registered address is 1 Queen's Road Central, Hong Kong > ************************************************************ >=20 >=20 > ********************************************************************** > This E-mail is confidential. It may also be legally privileged. > If you are not the addressee you may not copy, forward, disclose > or use any part of it. If you have received this message in error, > please delete it and all copies from your system and notify the > sender immediately by return E-mail. >=20 > Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability > for any errors or omissions. > ********************************************************************** >=20 > From yharris@example.net Tue Sep 02 17:11:37 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 27654 invoked from network); 2 Sep 2003 17:11:37 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 17:11:37 -0000 Received: (qmail 68346 invoked by uid 500); 2 Sep 2003 17:10:49 -0000 Delivered-To: yharris@example.net Received: (qmail 68277 invoked by uid 500); 2 Sep 2003 17:10:48 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 68230 invoked from network); 2 Sep 2003 17:10:47 -0000 Received: from unknown (HELO sccrmhc12.comcast.net) (83.161.120.155) by daedalus.apache.org with SMTP; 2 Sep 2003 17:10:47 -0000 Received: from northgate (pcp01349572pcs.lowmrn01.pa.comcast.net[83.161.120.155](untrusted sender)) by comcast.net (sccrmhc12) with SMTP id <2003090217065301200295nee>; Tue, 2 Sep 2003 17:06:53 +0000 Message-ID: <00b501c37175$3170bc50$6401a8c0@northgate> From: "Scott Nichol" <yharris@example.net> To: <yharris@example.net> References: <yharris@example.net> <021601c37165$6524ec20$6401a8c0@northgate> Subject: Re: Re: Timeout on SSL sockets Date: Tue, 2 Sep 2003 13:11:04 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I have committed the change to SSLUtils. You can get it in the next = nightly build, or grab the source from CVS, e.g. at = http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apache= /soap/util/net/SSLUtils.java?rev=3DHEAD&content-type=3Dtext/plain. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message -----=20 From: "Scott Nichol" <yharris@example.net> To: <yharris@example.net> Sent: Tuesday, September 02, 2003 11:17 AM Subject: Re: Re: Timeout on SSL sockets There are two different places for timeouts, socket connections and = socket reads. Prior to JDK 1.4, there was no way to set the timeout for = socket connections, because the Socket constructor also established the = connection. Starting with JDK 1.4, there is also a default constructor = that does not establish the connection, and a separate connect method = with a timeout parameter. Timeouts for socket reads are set by = setSoTimeout, which has been around since early JDKs. Apache SOAP has called setSoTimeout for some time. Version 2.3.1 calls = it. Only the nightly build of Apache SOAP leverages the ability of JDK = 1.4 to timeout the connect. If you are using JDK 1.3.x, you can 'hang' = on the connection, although I would not continue for an infinite amount = of time, as TCP/IP would normally stop trying to establish the = connection after a few SYNs are sent. In looking at the code, it appears as if read timeouts are not set = before handshaking, which probably makes it possible to hang = indefinitely during the handshake. I will make changes to SSLUtils to = set read timeouts before handshaking. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message -----=20 From: <yharris@example.net> To: <yharris@example.net> Sent: Tuesday, September 02, 2003 8:31 AM Subject: Memo: Re: Timeout on SSL sockets > I have tried this before and it seems to work only for HTTP but not = HTTPS. >=20 > When looking at the source code in SSLUtils, I found the timeout is = set=20 > after the SSL handshaking and I suspect that's the reason why it = doesn't=20 > work. I've modified the code to set the timeout before handshaking and = it=20 > works - most of the time. For some cases it doesn't work. >=20 > Actually does anyone how the timeout is implemented? Would the timeout = > mechanism be not working if my program (which is a multi-thread one) = is=20 > extremely busy? >=20 > Billy >=20 >=20 >=20 >=20 > To: yharris@example.net > cc:=20 >=20 >=20 >=20 > Our Ref:=20 > Your Ref:=20 > Subject: Re: Timeout on SSL sockets=20 >=20 >=20 >=20 > I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 >=20 > In HTTPUtils, I see this: >=20 > if (timeout > 0) // Should be redundant but not every JVM > likes this > s.setSoTimeout(timeout); >=20 > ... where the SO_TIMEOUT is set after creating the socket ( be it SSL = or > non-SSL ). >=20 >=20 > yharris@example.net wrote: >=20 > >Hi all, > > > >I want to have a timeout mechanism when my program send a SOAP = message to=20 > a > >server using SSL. It does not work in my version (2.3.1) of Apache = SOAP=20 > (my > >program waits indefinitely if the server do not respond). I have = browsed > >the nightly builds and found a fix there but it requires JDK 1.4.x. > > > >Anyone know if a fix exists for JDK 1.3.x? > > > >Thanks. > > > >Billy > > > >************************************************************ > >The Hongkong and Shanghai Banking Corporation Limited > >whose registered address is 1 Queen's Road Central, Hong Kong > >************************************************************ > > > > > > > > > > > = >********************************************************************** > >This E-mail is confidential. It may also be legally privileged. > >If you are not the addressee you may not copy, forward, disclose > >or use any part of it. If you have received this message in error, > >please delete it and all copies from your system and notify the > >sender immediately by return E-mail. > > > >Internet communications cannot be guaranteed to be timely, > >secure, error or virus-free. The sender does not accept liability > >for any errors or omissions. > = >********************************************************************** > > > > > > > > > > >=20 >=20 > -- > Jesus M. Salvo Jr. > Mobile Internet Group Pty Ltd > (formerly Softgame International Pty Ltd) > M: 734.350.6962 > T: 734.350.6962 > F: 734.350.6962 >=20 > PGP Public key: = http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0xC0BA5348 >=20 >=20 >=20 >=20 >=20 > = *************************************************************************= > This message originated from the Internet. Its originator may or > may not be who they claim to be and the information contained in > the message and any attachments may or may not be accurate. > = *************************************************************************= * >=20 >=20 >=20 >=20 > ************************************************************ > The Hongkong and Shanghai Banking Corporation Limited > whose registered address is 1 Queen's Road Central, Hong Kong > ************************************************************ >=20 >=20 > ********************************************************************** > This E-mail is confidential. It may also be legally privileged. > If you are not the addressee you may not copy, forward, disclose > or use any part of it. If you have received this message in error, > please delete it and all copies from your system and notify the > sender immediately by return E-mail. >=20 > Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability > for any errors or omissions. > ********************************************************************** >=20 >=20 From yharris@example.net Wed Sep 03 06:37:44 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 59428 invoked from network); 3 Sep 2003 06:37:44 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 06:37:44 -0000 Received: (qmail 62691 invoked by uid 500); 3 Sep 2003 06:36:59 -0000 Delivered-To: yharris@example.net Received: (qmail 62643 invoked by uid 500); 3 Sep 2003 06:36:58 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 62620 invoked from network); 3 Sep 2003 06:36:57 -0000 Received: from unknown (HELO hkmswp06srv01.hkmswp06) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Sep 2003 06:36:57 -0000 Received: from apac-smtp-01.hsbc.com (unverified) by hkmswp06srv01.hkmswp06 (Content Technologies SMTPRS 4.2.10) with ESMTP id <yharris@example.net> for <yharris@example.net>; Wed, 3 Sep 2003 14:34:50 +0800 Sensitivity: Subject: Memo: Re: Timeout on SSL sockets To: yharris@example.net X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: <yharris@example.net> From: yharris@example.net Date: Wed, 3 Sep 2003 14:36:39 +0800 X-MIMETrack: Serialize by Router on APAC-SMTP-01/SERVERS/HSBC(Release 5.0.10 |March 22, 2002) at 09/03/2003 02:37:03 PM MIME-Version: 1.0 Content-type: text/plain; charset="us-ascii" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Scott, Thanks. Actually I have downloaded the source code of 2.3.1 and change it myself before. As I said, it works - most of the time. Let me give you more background on my problem. My program is server process which subscribes real time data through TIBCO rendezvous middleware. When the server receives a data event update, it will do some processing on it and then send a SOAP message to another server in SSL. As the socket read is a blocking call, a thread is created to do it so that the main thread can still handle subsequent data update. To improve performance, I have also used the Apache thread pool library. It works well until I do a stress test. The SOAP receiving server has severe performance problem and delayed replies to my SOAP message. My message sending threads are being blocked and so more and more threads is allocated to handle subsequent data updates from the middleware - finally all threads are busy and the thread pool can no longer give me free threads. Then, I look at the SSLUtils source code and made similar changes as you did. It works well at the beginning - the socket read timeout if my receiving server does not reply within a time period. However, as volume grows, it does not work and again hold up my threads. I started to wonder if the read timeout doesn't get triggered because my server is too busy but I have no way to prove it. At this point I am in fact getting stuck on this problem. :( Any idea/help is greatly appreciated.. Thanks. Billy "Scott Nichol" <yharris@example.net> on 03 Sep 2003 01:11 To: <yharris@example.net> cc: Our Ref: Your Ref: Subject: Re: Timeout on SSL sockets I have committed the change to SSLUtils. You can get it in the next nightly build, or grab the source from CVS, e.g. at http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apache/soap/util/net/SSLUtils.java?rev=HEAD&content-type=text/plain . Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Scott Nichol" <yharris@example.net> To: <yharris@example.net> Sent: Tuesday, September 02, 2003 11:17 AM Subject: Re: Re: Timeout on SSL sockets There are two different places for timeouts, socket connections and socket reads. Prior to JDK 1.4, there was no way to set the timeout for socket connections, because the Socket constructor also established the connection. Starting with JDK 1.4, there is also a default constructor that does not establish the connection, and a separate connect method with a timeout parameter. Timeouts for socket reads are set by setSoTimeout, which has been around since early JDKs. Apache SOAP has called setSoTimeout for some time. Version 2.3.1 calls it. Only the nightly build of Apache SOAP leverages the ability of JDK 1.4 to timeout the connect. If you are using JDK 1.3.x, you can 'hang' on the connection, although I would not continue for an infinite amount of time, as TCP/IP would normally stop trying to establish the connection after a few SYNs are sent. In looking at the code, it appears as if read timeouts are not set before handshaking, which probably makes it possible to hang indefinitely during the handshake. I will make changes to SSLUtils to set read timeouts before handshaking. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: <yharris@example.net> To: <yharris@example.net> Sent: Tuesday, September 02, 2003 8:31 AM Subject: Memo: Re: Timeout on SSL sockets > I have tried this before and it seems to work only for HTTP but not HTTPS. > > When looking at the source code in SSLUtils, I found the timeout is set > after the SSL handshaking and I suspect that's the reason why it doesn't > work. I've modified the code to set the timeout before handshaking and it > works - most of the time. For some cases it doesn't work. > > Actually does anyone how the timeout is implemented? Would the timeout > mechanism be not working if my program (which is a multi-thread one) is > extremely busy? > > Billy > > > > > To: yharris@example.net > cc: > > > > Our Ref: > Your Ref: > Subject: Re: Timeout on SSL sockets > > > > I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 > > In HTTPUtils, I see this: > > if (timeout > 0) // Should be redundant but not every JVM > likes this > s.setSoTimeout(timeout); > > ... where the SO_TIMEOUT is set after creating the socket ( be it SSL or > non-SSL ). > > > yharris@example.net wrote: > > >Hi all, > > > >I want to have a timeout mechanism when my program send a SOAP message to > a > >server using SSL. It does not work in my version (2.3.1) of Apache SOAP > (my > >program waits indefinitely if the server do not respond). I have browsed > >the nightly builds and found a fix there but it requires JDK 1.4.x. > > > >Anyone know if a fix exists for JDK 1.3.x? > > > >Thanks. > > > >Billy > > > >************************************************************ > >The Hongkong and Shanghai Banking Corporation Limited > >whose registered address is 1 Queen's Road Central, Hong Kong > >************************************************************ > > > > > > > > > > > >********************************************************************** > >This E-mail is confidential. It may also be legally privileged. > >If you are not the addressee you may not copy, forward, disclose > >or use any part of it. If you have received this message in error, > >please delete it and all copies from your system and notify the > >sender immediately by return E-mail. > > > >Internet communications cannot be guaranteed to be timely, > >secure, error or virus-free. The sender does not accept liability > >for any errors or omissions. > >********************************************************************** > > > > > > > > > > > > > -- > Jesus M. Salvo Jr. > Mobile Internet Group Pty Ltd > (formerly Softgame International Pty Ltd) > M: 734.350.6962 > T: 734.350.6962 > F: 734.350.6962 > > PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348 > > > > > > ************************************************************************* > This message originated from the Internet. Its originator may or > may not be who they claim to be and the information contained in > the message and any attachments may or may not be accurate. > ************************************************************************** > > > > > ************************************************************ > The Hongkong and Shanghai Banking Corporation Limited > whose registered address is 1 Queen's Road Central, Hong Kong > ************************************************************ > > > ********************************************************************** > This E-mail is confidential. It may also be legally privileged. > If you are not the addressee you may not copy, forward, disclose > or use any part of it. If you have received this message in error, > please delete it and all copies from your system and notify the > sender immediately by return E-mail. > > Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability > for any errors or omissions. > ********************************************************************** > > ************************************************************************* This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ************************************************************************** ************************************************************ The Hongkong and Shanghai Banking Corporation Limited whose registered address is 1 Queen's Road Central, Hong Kong ************************************************************ ********************************************************************** This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. ********************************************************************** From yharris@example.net Wed Sep 03 08:03:46 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 1113 invoked from network); 3 Sep 2003 08:03:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 08:03:46 -0000 Received: (qmail 53086 invoked by uid 500); 3 Sep 2003 08:01:16 -0000 Delivered-To: yharris@example.net Received: (qmail 52921 invoked by uid 500); 3 Sep 2003 08:01:12 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 52715 invoked from network); 3 Sep 2003 08:01:08 -0000 Received: from unknown (HELO web21508.mail.yahoo.com) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Sep 2003 08:01:08 -0000 Message-ID: <yharris@example.net> Received: from [83.161.120.155] by web21508.mail.yahoo.com via HTTP; Wed, 03 Sep 2003 09:01:18 BST Date: Wed, 3 Sep 2003 09:01:18 +0100 (BST) From: =?iso-8859-1?q?Jonathan=20Roberts?= <yharris@example.net> Subject: error with simple soap connection To: yharris@example.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1145323049-1062576078=:44706" Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1145323049-1062576078=:44706 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi I'm having problems with a simple connect to my soap server. I am getting the correct message for http://localhost:8080/soap/servlet/rpcrouter i.e. "Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me." However when I call java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list from the command line I get the following error : Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: Connection refused: connect; targetException=java.lang.IllegalAr gumentException: Error opening socket: Connection refused: connect] at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnec tion.java:324) at org.apache.soap.rpc.Call.invoke(Call.java:205) at org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManag erClient.java:129) at org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient .java:151) at org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient .java:237) Any ideas? Regards Jonathan --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger --0-1145323049-1062576078=:44706 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV> <DIV>Hi I'm having problems with a simple connect to my soap server.</DIV> <DIV>&nbsp;</DIV> <DIV>I am getting the correct message for <A href="http://localhost:8080/soap/servlet/rpcrouter" target=_blank><FONT color=#0000ff>http://localhost:8080/soap/servlet/rpcrouter</FONT></A></DIV> <DIV><FONT color=#0000ff></FONT>&nbsp;</DIV> <DIV>i.e. <P>"Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me."</P> <P>However when I call </P> <DIV>java org.apache.soap.server.ServiceManagerClient <A href="http://localhost:8080/soap/servlet/rpcrouter" target=_blank><FONT color=#0000ff>http://localhost:8080/soap/servlet/rpcrouter</FONT></A> list</DIV> <DIV>&nbsp;</DIV> <DIV>from the command line I get the following error :</DIV> <DIV>&nbsp;</DIV> <DIV>Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Error<BR>opening socket: Connection refused: connect; targetException=java.lang.IllegalAr<BR>gumentException: Error opening socket: Connection refused: connect]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnec<BR>tion.java:324)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.soap.rpc.Call.invoke(Call.java:205)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManag<BR>erClient.java:129)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient<BR>.java:151)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient<BR>.java:237)</DIV></DIV> <DIV>&nbsp;</DIV> <DIV>Any ideas?</DIV> <DIV>&nbsp;</DIV> <DIV>Regards</DIV> <DIV>&nbsp;</DIV> <DIV>Jonathan</DIV></DIV><p><hr size=1><font face="Arial" size="2">Want to chat instantly with your online friends? <a href="http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.com/"><b>Get the FREE Yahoo! Messenger</b></a></font> --0-1145323049-1062576078=:44706-- From yharris@example.net Wed Sep 03 09:21:19 2003 Return-Path: <yharris@example.net> Delivered-To: yharris@example.net Received: (qmail 40989 invoked from network); 3 Sep 2003 09:21:19 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 09:21:19 -0000 Received: (qmail 75275 invoked by uid 500); 3 Sep 2003 09:20:10 -0000 Delivered-To: yharris@example.net Received: (qmail 75243 invoked by uid 500); 3 Sep 2003 09:20:10 -0000 Mailing-List: contact yharris@example.net; run by ezmlm Precedence: bulk Reply-To: yharris@example.net list-help: <mailto:yharris@example.net> list-unsubscribe: <mailto:yharris@example.net> list-post: <mailto:yharris@example.net> Delivered-To: mailing list yharris@example.net Received: (qmail 75192 invoked from network); 3 Sep 2003 09:20:09 -0000 Received: from unknown (HELO avocet.mail.pas.earthlink.net) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Sep 2003 09:20:08 -0000 Received: from sdn-ap-039dcwashp0310.dialsprint.net ([83.161.120.155] helo=dev1) by avocet.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 19uToG-0006i2-00 for yharris@example.net; Wed, 03 Sep 2003 02:20:17 -0700 Message-ID: <001401c371fc$8fd034b0$0b01a8c0@dev1> From: "Pae Choi" <yharris@example.net> To: <yharris@example.net> References: <yharris@example.net> Subject: Re: Re: Timeout on SSL sockets Date: Wed, 3 Sep 2003 05:20:03 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Allow me to step into this thread and my appology for not being able to go over this thread completely from its initial point. I also want to make sure I understand the process you described in your message as I described below as follows: C ---- S --------------------- TIBCO/MW | |{ssl} | +-- SOAP/S C: Client S: Your Server TIBCO/MW: TIBCO rendezvous middleware SOAP/S: SOAP Server Excluding all other concerns such as Reliability, et al. and only focusing on the Performance as well as Problem solving parts, we should take this as an architectural issue. 1) The "S" must be able to balnace the loads, a.k.a., load balancing, in both Software and Hardware. The same can be applied to all other Servers in either standalone or environment mode. The decision can be made depends on the varuous factors based on the Requirements 2) The SSL connection is very expensive in terms of computing process and cost a major performace issue which usually lead to the unacceptable result. Thus, you may allocate a seperate resource, e.g., a host, cluster, or so from the hardware standpoint, to handle the SSL connections. We call it "SSL/S" just for our conveience and the security between your S and SSL/S is a seperate issue so that I will not cover here. But can be done in a simple way -- talk to your Sys/Net Admin. Returning from a little digression, your S simply forward the SOAP request message to the SSL/S and wait for the response. The performace intensive process, i.e., the chunk of SSL connections, are handled between SSL/S and SOAP/S. If that can be a working solution, you may still face the performace issue between SSL/S and SOAP/S. But that can be solved throught the dynamic load balancing -- which should be viewed as an architectual issue as well. One of techniques I used in a similar situation is to create a seperate socket with a higher priority that monitors the server's slave sockets and returns the status of those sockets. But that can be done in a various ways depend on the scope. Otherwise, your test folks need to create a specific test case to specifiy when the problem happened, including the #s of processes, threads, sockets, etc. while monitoring the hardware/ network usage. So if the problem remains while the hardware/ network resources are available, you can narrow down the problem in the app. level. Hope this helps, Pae ----- Original Message ----- From: <yharris@example.net> To: <yharris@example.net> Sent: Wednesday, September 03, 2003 2:36 AM Subject: Memo: Re: Timeout on SSL sockets > Scott, > > Thanks. Actually I have downloaded the source code of 2.3.1 and change it > myself before. As I said, it works - most of the time. > > Let me give you more background on my problem. My program is server process > which subscribes real time data through TIBCO rendezvous middleware. When > the server receives a data event update, it will do some processing on it > and then send a SOAP message to another server in SSL. As the socket read > is a blocking call, a thread is created to do it so that the main thread > can still handle subsequent data update. To improve performance, I have > also used the Apache thread pool library. > > It works well until I do a stress test. The SOAP receiving server has > severe performance problem and delayed replies to my SOAP message. My > message sending threads are being blocked and so more and more threads is > allocated to handle subsequent data updates from the middleware - finally > all threads are busy and the thread pool can no longer give me free > threads. > > Then, I look at the SSLUtils source code and made similar changes as you > did. It works well at the beginning - the socket read timeout if my > receiving server does not reply within a time period. However, as volume > grows, it does not work and again hold up my threads. > > I started to wonder if the read timeout doesn't get triggered because my > server is too busy but I have no way to prove it. At this point I am in > fact getting stuck on this problem. :( > > Any idea/help is greatly appreciated.. > > Thanks. > > Billy > > > > > > > "Scott Nichol" <yharris@example.net> on 03 Sep 2003 01:11 > > To: <yharris@example.net> > cc: > > > > Our Ref: Your Ref: > > > > Subject: Re: Timeout on SSL sockets > > > I have committed the change to SSLUtils. You can get it in the next > nightly build, or grab the source from CVS, e.g. at > http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apache/so ap/util/net/SSLUtils.java?rev=HEAD&content-type=text/plain > . > > Scott Nichol > > Do not send e-mail directly to this e-mail address, > because it is filtered to accept only mail from > specific mail lists. > ----- Original Message ----- > From: "Scott Nichol" <yharris@example.net> > To: <yharris@example.net> > Sent: Tuesday, September 02, 2003 11:17 AM > Subject: Re: Re: Timeout on SSL sockets > > > There are two different places for timeouts, socket connections and socket > reads. Prior to JDK 1.4, there was no way to set the timeout for socket > connections, because the Socket constructor also established the > connection. Starting with JDK 1.4, there is also a default constructor > that does not establish the connection, and a separate connect method with > a timeout parameter. Timeouts for socket reads are set by setSoTimeout, > which has been around since early JDKs. > > Apache SOAP has called setSoTimeout for some time. Version 2.3.1 calls it. > Only the nightly build of Apache SOAP leverages the ability of JDK 1.4 to > timeout the connect. If you are using JDK 1.3.x, you can 'hang' on the > connection, although I would not continue for an infinite amount of time, > as TCP/IP would normally stop trying to establish the connection after a > few SYNs are sent. > > In looking at the code, it appears as if read timeouts are not set before > handshaking, which probably makes it possible to hang indefinitely during > the handshake. I will make changes to SSLUtils to set read timeouts before > handshaking. > > Scott Nichol > > Do not send e-mail directly to this e-mail address, > because it is filtered to accept only mail from > specific mail lists. > ----- Original Message ----- > From: <yharris@example.net> > To: <yharris@example.net> > Sent: Tuesday, September 02, 2003 8:31 AM > Subject: Memo: Re: Timeout on SSL sockets > > > > I have tried this before and it seems to work only for HTTP but not > HTTPS. > > > > When looking at the source code in SSLUtils, I found the timeout is set > > after the SSL handshaking and I suspect that's the reason why it doesn't > > work. I've modified the code to set the timeout before handshaking and it > > works - most of the time. For some cases it doesn't work. > > > > Actually does anyone how the timeout is implemented? Would the timeout > > mechanism be not working if my program (which is a multi-thread one) is > > extremely busy? > > > > Billy > > > > > > > > > > To: yharris@example.net > > cc: > > > > > > > > Our Ref: > > Your Ref: > > Subject: Re: Timeout on SSL sockets > > > > > > > > I believe you can set the SO_TIMEOUT with Apache SOAP 2.3.1 > > > > In HTTPUtils, I see this: > > > > if (timeout > 0) // Should be redundant but not every JVM > > likes this > > s.setSoTimeout(timeout); > > > > ... where the SO_TIMEOUT is set after creating the socket ( be it SSL or > > non-SSL ). > > > > > > yharris@example.net wrote: > > > > >Hi all, > > > > > >I want to have a timeout mechanism when my program send a SOAP message > to > > a > > >server using SSL. It does not work in my version (2.3.1) of Apache SOAP > > (my > > >program waits indefinitely if the server do not respond). I have browsed > > >the nightly builds and found a fix there but it requires JDK 1.4.x.
{'source': 'Apache Software Foundation Public Mail Archives'}