On Fri, Feb 26, 2010 at 11:35 AM, Simon Laws <[email protected]> wrote: > So this seems to come down to how we interpret "/Catalog" in two > different places. > > 1/ In javascript > 2/ In an SCA (JSONRPC) binding URI > > I think it should be interpreted, in both of these places, in a way > that is consistent with the specification of relative URIs in RFC2396 > [1]. > > In the browser /Catalog will be interpreted as a root relative URL. In > your case you have http://localhost:8080/Catalog. >
Yes, this is the browser expectation. > In the SCA binding we are indicating that we want the Catalog service > made available at the URI "/Catalog". In lieu of a absolute path > wouldn't we expect the runtime to interpret this a URI relative to the > base URL with no path element, i.e. http://localhost:8080/Catalog? > Yes, that is my expectation as well, but it's not what's happening when using host webapp in 2.x, where a service with URI /Catalog is being registered relatively to the web application context root and is available as http://localhost:9090/sample-store-webapp/Catalog > Another way to look at this is to ask how would you configure the > binding if you did want the service to appear below the context root > (which is possibly a reasonable, and safer, thing to do)? > This is a good question, and seems like a reasonable thing, particularly if we want to scope the service to your application and have multiple different versions of the same service provided form different applications.... but if we can make the scenarios above working, then, as long as the binding uri is properly configured, things should work one way or another. > If the binding uri were "Catalog" then the current code I believe adds > the structural URI in front of the relative URI giving something like. > http://localhost:8080/context/component/service/Catalog. Which seems > OK to me. In this case we've just constructed the base URI to which > the binding URI is considered to be relative. As long as users > understand this then can get any particular effect by manipulating the > relative URI that they specify. > Yes, correct... > > [1] http://www.w3.org/TR/xmlschema-2/#RFC2396 > -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
