Yeah, you are correct, the registerTransport piece sets up protocol handlers
with https defaulting to 443. I'll add documentation in ServiceURL class to
clarify usage. In terms of API, the only piece we could do is add another
method that handles 443/80 as special port numbers and overrides it with
8443/8080.

The Util.registerTransport() method needs to be invoked only once per JVM.

Rachana

> -----Original Message-----
> From: Jaime Frey [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 08, 2008 6:51 PM
> To: Charles Bacon
> Cc: Rachana Ananthakrishnan; [email protected]
> Subject: Re: [gt-user] default WS port in 4.2
> 
> I was still having trouble and I've finally figured it out.  
> org.globus.axis.util.Util is making java.net.URL behave incorrectly.
> 
> If org.globus.axis.util.Util.registerTransport() is called 
> before any  
> URL objects are created, then URL.getPort() returns 443 for 
> any https  
> URLs, even if no port was given in the URL string passed to the  
> constructor. This causes org.globus.wsrf.client.ServiceURL to think  
> the user specified a port of 443 in the URL passed to it, so it  
> doesn't set the default port of 8443.
> 
> If I create a throw-away URL object before calling  
> Util.registerTransport(), then subsequent calls to URL.getPort()  
> properly return -1 if the URL string passed to the 
> constructor didn't  
> include a port number.
> 
> Side question: I presume 
> org.globus.axis.util.Util.registerTransport()  
> only needs to be called once in my application, before attempting to  
> initiate any connections using secure transport. Is that correct?
> 
>   -- Jaime
> 
> On Jun 26, 2008, at 12:13 PM, Charles Bacon wrote:
> 
> > This has been updated in CVS.  The 
> globus_4_2_branch/nightly.tar.gz  
> > won't have it, but you should be able to do cvs updates in source- 
> > trees/* to get the two updates - one to GramJob, the other in wsrf/ 
> > java/.  If so, can you see whether that fixes all your outstanding  
> > issues?
> >
> > Thanks,
> >
> > Charles
> >
> > On Jun 25, 2008, at 4:36 PM, Jaime Frey wrote:
> >
> >> The delegation command-line tools (globus-credential-delegate and  
> >> globus-delegation-client) don't default to 8443. I get connection  
> >> failed errors if I don't include the port number.
> >>
> >> The GramJob java class also doesn't default to port 8443.
> >>
> >> -- Jaime
> >>
> >> On Jun 25, 2008, at 4:02 PM, Rachana Ananthakrishnan wrote:
> >>
> >>> Little tricky: at CoG level what is being used is correct.
> >>>
> >>> I think the client API in WS clients should clean up the URL  
> >>> provided - so
> >>> DelegationUtil should be doing a better job. Delegate and 
> Refresh  
> >>> clients
> >>> (that use DelegationUtil) default to 8443 correctly - 
> just the API  
> >>> is not
> >>> catching tha default case.
> >>>
> >>> Maybe something that can be fixed in a point release, but 
> I think  
> >>> it might
> >>> break compatibility.
> >>>
> >>> My best answer now is for me to document it, so 
> DelegationUtil API  
> >>> users
> >>> will know what to expect.
> >>>
> >>> Rachana
> >>>
> >>>> -----Original Message-----
> >>>> From: Jaime Frey [mailto:[EMAIL PROTECTED]
> >>>> Sent: Wednesday, June 25, 2008 3:59 PM
> >>>> To: Rachana Ananthakrishnan
> >>>> Subject: Re: [gt-user] default WS port in 4.2
> >>>>
> >>>> So what's the solution here? If port 8443 is to remain 
> the default
> >>>> port for Globus WS deployments (as the service code and C
> >>>> client code
> >>>> seem to assume), shouldn't that be the default port for the java
> >>>> client code?
> >>>>
> >>>> -- Jaime
> >>>>
> >>>> On Jun 25, 2008, at 3:18 PM, Rachana Ananthakrishnan wrote:
> >>>>
> >>>>> This seems to be a result of following change in CoG JGlobus:
> >>>>>
> >>>>> "(11/06) Changed the default port returned by https 
> handler to 443
> >>>>>      instead of 8443:
> >>>>>      http://bugzilla.globus.org/globus/show_bug.cgi?id=4842";
> >>>>>
> >>>>> Despite the bug stating that it has been fixed in
> >>>> globus_4_0_branch,
> >>>>> I see
> >>>>> that the Handler class in 4.0.x for https, continues to
> >>>> return 8443. I
> >>>>> presume this is to keep backwards compatibility. In 4.2
> >>>> (and trunk),
> >>>>> the
> >>>>> https handler, sets it to 443.
> >>>>>
> >>>>> As mentioned in the bug, looks like there is a ServiceURL
> >>>> class that
> >>>>> can be
> >>>>> used to expand contact strings and it uses default of 443
> >>>> for https
> >>>>> in both
> >>>>> trunk and branch. Delegation service does not use the ServiceURL
> >>>>> class and
> >>>>> hence directly uses CoG values.
> >>>>>
> >>>>> It seems to that it was intended to move to 443 as default
> >>>> port for
> >>>>> https.
> >>>>> So if anything, branch returning 8443 seems incorrect. 
> I'll add a
> >>>>> note on
> >>>>> this change to the documentation once 4.2 documents are open for
> >>>>> commits.
> >>>>> But don't think reverting to 8443 is the solution in 
> trunk nor is
> >>>>> changing
> >>>>> 4.0.x delegation client behavior because of backwards  
> >>>>> compatibility
> >>>>> constraints.
> >>>>>
> >>>>> Rachana
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: [EMAIL PROTECTED]
> >>>>>> [mailto:[EMAIL PROTECTED] On Behalf Of Jaime Frey
> >>>>>> Sent: Wednesday, June 25, 2008 12:01 PM
> >>>>>> To: [email protected]
> >>>>>> Subject: Re: [gt-user] default WS port in 4.2
> >>>>>>
> >>>>>> I'm using the DelegationUtil class's delegate() function. I'm
> >>>>>> converting code written for Globus 4.0 to work with 
> 4.2. Under  
> >>>>>> 4.0,
> >>>>>> calling DelegationUtil.delegate() with a bare hostname
> >>>>>> delegated just
> >>>>>> fine to a container listening on port 8443. With 4.2, I have to
> >>>>>> include the port to avoid a connection refused exception.
> >>>>>>
> >>>>>> -- Jaime
> >>>>>>
> >>>>>> On Jun 25, 2008, at 11:47 AM, Charles Bacon wrote:
> >>>>>>
> >>>>>>> Can you be more specific about what APIs you're using?  I'm
> >>>>>> not sure
> >>>>>>> the java clientside APIs are as monolithic as all that.
> >>>>>> 8443 should
> >>>>>>> still be the default.
> >>>>>>>
> >>>>>>>
> >>>>>>> Charles
> >>>>>>>
> >>>>>>> On Jun 25, 2008, at 11:29 AM, Jaime Frey wrote:
> >>>>>>>
> >>>>>>>> The default port used in the java client web services
> >>>>>> tools doesn't
> >>>>>>>> appear to be 8443 anymore in Globus 4.2. But that is the  
> >>>>>>>> default
> >>>>>>>> port when I stand up a 4.2 WS container. Thus, when I
> >>>>>> don't include
> >>>>>>>> the port with the service location, the client tools report
> >>>>>>>> connection failed. But I can't determine what port they
> >>>>>> are trying
> >>>>>>>> to connect to.
> >>>>>>>>
> >>>>>>>> Is this change intentional?
> 
> 
> +--------------------------------+-----------------------------------+
> |           Jaime Frey           | I used to be a heavy gambler.     |
> |       [EMAIL PROTECTED]        | But now I just make mental bets.  |
> | http://www.cs.wisc.edu/~jfrey/ | That's how I lost my mind.        |
> +--------------------------------+-----------------------------------+
> 
> 

Reply via email to