I've verified this change of behavior between Tomcat 4.0.3 and Tomcat 
4.0.4, and Barry Levinson has tracked down the probable cause.

Despite the omission of the port in Host request headers by Microsoft 
.Net software (VS.NET and WSDL.EXE), Tomcat 4.0.3 was able to properly 
determine the port in calls to HTTPUtils.getRequestURL, Tomcat 4.0.4 
defaults it.

Suggestions?  Why can't Tomcat simply use socket.getPort()?

-------- Original Message --------
Subject: RE: Strange bug: Axis in Tomcat 4.0.4 and .NET
Date: Tue, 2 Jul 2002 15:11:38 -0400
From: "Barry Levinson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>

some more info :

looks like HttpProcessor.java changed in tomcat exposesing this VS .net
bug :
http://cvs.apache.org/viewcvs/jakarta-tomcat-4.0/catalina/src/share/org/ap
ache/catalina/connector/http/HttpProcessor.java
 > Revision 1.44 / (view) - annotate - [select for diffs] , Thu Feb 28
04:23:17 2002 UTC (4 months ago) by remm
 > Branch: MAIN
 > CVS Tags: jwsdp_10_ea2_10, jwsdp_10_ea2_09, jwsdp_10_ea2_08,
jwsdp_10_ea2_07, jwsdp_10_ea2_06, jwsdp_10_ea2_05
 > Changes since 1.43: +9 -4 lines
 > Diff to previous 1.43 (colored)
 >
 > - Fix bug 6668.
 > - If no port is specified, the default port for the service is assumed.
Note: This
 >   can break broken clients, as it forces them to specify the port in the
host header.
 > - Patch submitted by Craig Setera <craig.setera at kingland.com>

VS .net seems to be "broken" in violation of rfc 2616 section 14.23 :
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

I wonder what the chances of getting MS to fix this are?  Anyone know who
to email a bug report to?

--Barry
-----Original Message-----
From: Barry Levinson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: RE: Strange bug: Axis in Tomcat 4.0.4 and .NET


oops : I'm running tomcat 4.0.4

When I downloaded an ran tomcat 4.0.3, of course VS .net still specifies
the incorrect Host:localhost in the HTTP header, however, tomcat responds
with the correct port in the WSDL.  in 4.0.3 tomcat must get the URL info
from a combination of the connection record, and the URL specified in HTTP
1.1.

I have an additional problem with .net when the wsdl specifies the wrong
URL.  If the URL is not correct, the session is not correctly maintained
from the returned cookie.  This is the case even if I manually change the
URL in the .net generated client stubs.

For now, I'll use < 4.0.4 tomcat.

BTW - is this list moderated?  Why do my emails seem to have a 3-6hr
delay?

--Barry

-----Original Message-----
From: Barry Levinson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:21 AM
To: [EMAIL PROTECTED]
Subject: RE: Strange bug: Axis in Tomcat 4.0.4 and .NET


 >From running tcpmon, it looks like Visual Studio .net doesn't specify the
correct URL in it's HTTP Host: line.  Instead of specifying "Host:
localhost:8081" it specifies "Host: localhost".  This is probably why the
wsdl comes back with the incorrect url.

I'm running tomcat 4.0.3.
I'll download Tomcat 4.0.2 and try it again to see if there are any
differences.

--Barry

-----Original Message-----
From: Sam Ruby [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 10:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Strange bug: Axis in Tomcat 4.0.4 and .NET


Arne M. Degenring wrote:
 > Hi everybody,
 >
 > I recently upgraded to Tomcat 4.0.4 and found out a problem with .NET.
 > I'm running Tomcat on port 8081. When I access a WSDL file via IE 6.0
 > at:
 >
 > http://localhost:8081/axis/services/SomeWS?wsdl
 >
 > I get back the WSDL file which contains the correct adress location:
 >
 > <wsdlsoap:address
 > location="http://localhost:8081/axis/services/SomeWS"/>
 >
 > No problem so far. BUT: When I access the same WSDL URL from the
 > Microsoft .NET platform, e.g. via .NET WebService Studio or via .NET's
 > wsdl.exe tool, the port number is missing in the WSDL's adress
 > location!!
 >
 > <wsdlsoap:address location="http://localhost/axis/services/SomeWS"/>
 >
 > .NET's generated proxy class (SubmitWSService.cs) does not work, of
 > course, because of the missing port number. This strange behaviour first
 > occured after I upgraded to Tomcat 4.0.4. No problem with 4.0.3.
 >
 > BTW: I'm using the Axis build 2002-07-01.
 >
 > Any ideas?

I'll try to reproduce.  I've verified that 2002-07-01 w/Tomcat 4.0.3
works, running wsdl.exe against
http://nagoya.apache.org:5049/axis/services/SoapInteropImport1Port?wsdl

results in

      public Import1() {
          this.Url =
"http://nagoya.apache.org:5049/axis/services/SoapInteropImport1Port";;
      }

- Sam Ruby

Reply via email to