On 8/30/07, Venkata Krishnan <[EMAIL PROTECTED]> wrote:
>
> Sounds ok to me.  In an earlier version of the RMI Binding, I did
> something
> like this with the getUri method of Binding class.
>
> - Venkat
>
> On 8/29/07, ant elder <[EMAIL PROTECTED] > wrote:
> >
> > I've not yet been able to find any good way to reliably work out the
> > complete service URL in all environments. What i think maybe the best
> > approach is to add a getBaseURI method to the Tuscany ServletHost
> > interface
> > so that can be used by bindings. So then it would be down to each
> > ServletHost impl to set this  correctly rather than the Axis2 binding to
> > work it out. So for example for WebappServletHost it would be the webapp
>
> > url
> > like, http://localhost:8080/helloworld-ws-service-webapp, for the war
> > distro
> > http://localhost:8080/tuscany , for Geronimo http://localhost:8080 etc.
> >
> > Does something like this sound ok or does anyone have any better ideas?
> >
> >    ...ant
> >
> > On 8/26/07, Vamsavardhana Reddy < [EMAIL PROTECTED]> wrote:
> > >
> > > One more observation...  when the binding URI is "
> > > http://localhost:8080/hello/HelloWorldService"; the service is
> available
> > at
> > > that URL.  Only "http://localhost:8080/hello/HelloWorldService?wsdl "
> > > results in an exception.  Here is what I did.
> > > 1.  Deploy the HelloWorld sample with binding URI "
> > > http://localhost:8080/HelloWorldService ".
> > > 2.  Get the wsdl by accessing "
> > > http://localhost:8080/HelloWorldService?wsdl"; and save to a disk file.
> > > 3.  Now redeploy HelloWorld sample with binding URI "
> > http://localhost:8080/
> > > hello/HelloWorldService".
> > > 4. Using WebServices Explorer in Eclipse, and the saved wsdl file from
> > > step2, access the service at url in step3.
> > >
> > > Vamsi
> > >
> > > On 8/26/07, Vamsavardhana Reddy <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > On 8/26/07, ant elder < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Ok what happens with a uri of
> > > > > http://localhost:8080/HelloWorldService?wsdl<
> > http://localhost:8080/hello/HelloWorldService?wsdl>
> > > >
> > > >
> > > > I have fixed the problem in plugin code so that it uses a context
> root
> > > > "/" as well.  After the fix, I am able to use
> > > > http://localhost:8080/HelloWorldService?wsdl<
> > http://localhost:8080/hello/HelloWorldService?wsdl>as uri.  And for this
> > uri (that ?wsdl in the uri did not matter), I am able
> > > > to access the wsdl using
> http://localhost:8080/HelloWorldService?wsdl<
> > http://localhost:8080/hello/HelloWorldService?wsdl>
> > > >
> > > >
> > > > (sorry to keep bouncing this back to you, i've not been able to get
> > the
> > > > > Geronimo integration to build locally yet so can't test this
> myself)
> > > >
> > > >
> > > > Let me see if I can quickly provide  the built plugin so that you
> can
> > > > install it in Geronimo 2.0.1.
> > > >
> > > >
> > > >    ...ant
> > > > >
> > > > > On 8/26/07, Vamsavardhana Reddy < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 8/26/07, ant elder < [EMAIL PROTECTED] > wrote:
> > > > > > >
> > > > > > > Is "/hello" the mapping for some Geronimo servlet or
> application
> > > > > > > thing?
> > > > > >
> > > > > >
> > > > > > "/hello" is not mapped to any application.
> > > > > >
> > > > > > What happens if you change the uri in the SCDL to have  <
> > binding.wsuri="/HelloWorldService"/>?
> > > > > >
> > > > > >
> > > > > > In this case, GeronimoServletHost.addServletMapping() is getting
> > > > > > invoked with (" http://localhost:8085/HelloWorldService";,
> > > > > > Axis2ServiceServlet).  Since there is no http connector on 8085,
> > the method
> > > > > > is throwing an Exception.
> > > > > >
> > > > > > Thanks,
> > > > > > >
> > > > > > >    ...ant
> > > > > > >
> > > > > > > On 8/26/07, Vamsavardhana Reddy < [EMAIL PROTECTED] > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 8/26/07, ant elder < [EMAIL PROTECTED]> wrote:
> > > > > > > > >
> > > > > > > > > So that must mean in the setContextRoot method at line 279
> > in
> > > > > > > > > TuscanyListingAgent that configContext.getContextRoot() is
> > > > > > > > > returning " http://localhost:8080/hello/ " right?
> > > > > > > >
> > > > > > > >
> > > > > > > > configContext.getContextRoot() is returning "hello".
> > > > > > > >
> > > > > > > >
> > > > > > > > Can you debug Axis2ServiceServlet on line 230 and see what
> > gets
> > > > > > > > > set on th eline configContext.setContextRoot (
> > > > > > > > > request.getContextPath());?
> > > > > > > >
> > > > > > > >
> > > > > > > > request.getContextPath() is evaluating to "/hello" .
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > >    ...ant
> > > > > > > > >
> > > > > > > > > On 8/26/07, Vamsavardhana Reddy < [EMAIL PROTECTED]>
> > wrote:
> > > > > > > > > >
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > The URL is "
> > http://localhost:8080/hello/HelloWorldService?wsdl";
> > > > > > > > > > .  When I debug the code, I am noticing that in
> > > > > > > > > > TuscanyListingAgent.processListService () around line
> 101,
> > > > > > > > > > the filePart is "
> > > > > > > > > > http://localhost:8080/hello/HelloWorldService " and
> > > > > > > > > > findAxisServiceName() is returning
> > "/hello/HelloWorldService".  Inside
> > > > > > > > > > setContextRoot() arounf line 286, mapping =
> > > > > > > > > > filePart.substring() is getting called with paramters
> (28,
> > > > > > > > > > 21) which is resulting in the Exception.  That -7 in the
> > exception message
> > > > > > > > > > is this 21-28.
> > > > > > > > > >
> > > > > > > > > > Vamsi
> > > > > > > > > >
> > > > > > > > > > On 8/26/07, ant elder < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > >
> > > > > > > > > > > On 8/25/07, Vamsavardhana Reddy < [EMAIL PROTECTED]>
> > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi,
> > > > > > > > > > > >
> > > > > > > > > > > > I have deployed HelloWorld webservice sample (jar
> > > > > > > > > > > attached in this mail)
> > > > > > > > > > > > in Tuscany plugin for Geronimo.  This plugin is
> using
> > > > > > > > > > > > 1.0-incubating-SNAPSHOT jars published on
> > > > > > > > > > > 2007-08-23.  The sample deploys
> > > > > > > > > > > > fine.  But, when I access
> > > > > > > > > > > > http://localhost:8080/hello/HelloWorldService?wsdl ,
> I
> > > > > > > > > > > am getting a
> > > > > > > > > > > > StringIndexOutOfBoundsException.  Stack trace as
> > below:
> > > > > > > > > > > >
> > > > > > > > > > > > java.lang.StringIndexOutOfBoundsException
> > > > > > > > > > > > : String index out of range: -7
> > > > > > > > > > > >       java.lang.String.substring (String.java:1768)
> > > > > > > > > > > >
> > > > > > > > > > >
> >
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListingAgent.setContextRoot
> > > > > > > > > > > ( TuscanyListingAgent.java:286)
> > > > > > > > > > > >
> > > > > > > > > > >
> >
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListingAgent.processListService
> > > > > > > > > > > > (TuscanyListingAgent.java:102)
> > > > > > > > > > > >
> > > > > > > > > > >
> > org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.doGet
> > > > > > > > > > > (Axis2ServiceServlet.java:260)
> > > > > > > > > > > >       javax.servlet.http.HttpServlet.service(
> > > > > > > > > > > HttpServlet.java:693)
> > > > > > > > > > > >
> > > > > > > > > > >
> > org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.service
> > > > > > > > > > > > ( Axis2ServiceServlet.java:235)
> > > > > > > > > > > >       javax.servlet.http.HttpServlet.service(
> > > > > > > > > > > HttpServlet.java:806)
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > This sample worked properly last week.  I suspect
> the
> > > > > > > > > > > problem is
> > > > > > > > > > > > introduced in rev 569074.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > This attached jar is working ok for me when running
> > > > > > > > > > > standalone or in the
> > > > > > > > > > > tuscany.war webapp distribution so i guess its
> something
> > > > > > > > > > > specific to the
> > > > > > > > > > > Geronimo integration. What is the complete URL of the
> > > > > > > > > > > ?wsdl you expect to
> > > > > > > > > > > work when this is running in Geronimo?
> > > > > > > > > > >
> > > > > > > > > > >    ...ant
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Yes, I seem to remember you suggested this before.

In the bindings we may very well need to know the effective URL that results
from the various configuration information (SCDL, hosting, binding
defaults). I think your example was for inclusion in generated wsdl (?wsdl).
Also in the distributed case we need to know where services provided by one
node are located physically so that other nodes can establish communication.


Maybe we can extend the page that you started [1] to include some
description of where the various components of the effective URLs come from.
So for each of the examples we should add some description of the
environment in which the composite is being run. I haven't got round to
adding anything yet but it's on the list so I'll try and add some thoughts a
little later on.

Simon

[1]
http://cwiki.apache.org/confluence/display/TUSCANY/SCA+Java+binding+endpoints

Reply via email to