You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Vamsavardhana Reddy <c1...@gmail.com> on 2007/09/03 11:11:31 UTC

Re: Problem with getting wsdl for HelloWorldService webservice

I have modified the helloworld-ws-service sample in tags\0.99-incubating to
use http://localhost:8080/hello/HelloWorldService as the binding URI.  I am
able to get the WSDL using "
http://localhost:8080/hello/HelloWorldService?wsdl" alright.  But, when I
step through the code in the debugger, I notice that even in this case, "/"
is being used as context-root and so the code in the "else" part (around
line 283 in TuscanyListingAgent) is not getting executed.  In our case, we
are using a context-root "/hello" (different from "/") and we are hitting
the exceptions while accessing
http://localhost:8080/hello/HelloWorldService?wsdl.  I suspect the code that
computes the context-root and mapping from the binding URI has problems.

Vamsi

On 8/27/07, Vamsavardhana Reddy <c1...@gmail.com> 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 <c1...@gmail.com> wrote:
> >
> >
> >
> > On 8/26/07, ant elder < ant.elder@gmail.com> 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 < c1vamsi1c@gmail.com> wrote:
> > > >
> > > >
> > > >
> > > > On 8/26/07, ant elder < ant.elder@gmail.com> 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 <c1vamsi1c@gmail.com > wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 8/26/07, ant elder < ant.elder@gmail.com> 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 < c1vamsi1c@gmail.com> 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 <an...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > On 8/25/07, Vamsavardhana Reddy <c1...@gmail.com>
> > > > > > > > > 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
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Problem with getting wsdl for HelloWorldService webservice

Posted by ant elder <an...@apache.org>.
I've updated the JIRA for this after debugging through the Geronimo-Tuscany
integration: https://issues.apache.org/jira/browse/TUSCANY-1654.

Its an issue with the way the context path is calculated currently in the
Geronimo-Tuscany code.  I think there will need to be a  fixed context path
used for each SCA domain instead of trying to work out the context path from
the service URL.

   ...ant

On 9/3/07, Vamsavardhana Reddy <c1...@gmail.com> wrote:
>
> I have modified the helloworld-ws-service sample in tags\0.99-incubating
> to use http://localhost:8080/hello/HelloWorldService as the binding URI.
> I am able to get the WSDL using "
> http://localhost:8080/hello/HelloWorldService?wsdl" alright.  But, when I
> step through the code in the debugger, I notice that even in this case, "/"
> is being used as context-root and so the code in the "else" part (around
> line 283 in TuscanyListingAgent) is not getting executed.  In our case, we
> are using a context-root "/hello" (different from "/") and we are hitting
> the exceptions while accessing
> http://localhost:8080/hello/HelloWorldService?wsdl.  I suspect the code
> that computes the context-root and mapping from the binding URI has
> problems.
>
> Vamsi
>
> On 8/27/07, Vamsavardhana Reddy <c1...@gmail.com> 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 < c1vamsi1c@gmail.com> wrote:
> > >
> > >
> > >
> > > On 8/26/07, ant elder < ant.elder@gmail.com> 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 < c1vamsi1c@gmail.com> wrote:
> > > > >
> > > > >
> > > > >
> > > > > On 8/26/07, ant elder < ant.elder@gmail.com> 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.ws uri="/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 <c1vamsi1c@gmail.com > wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 8/26/07, ant elder < ant.elder@gmail.com> 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 < c1vamsi1c@gmail.com>
> > > > > > > > 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 <an...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > On 8/25/07, Vamsavardhana Reddy <c1...@gmail.com>
> > > > > > > > > > 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
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>