On 6/28/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Jean-Marc Taillant wrote:
> Hi,
>
> I downloaded the last versioon apache-tuscany-sca-0.90. I played with
> several composite sample and all looks ok. But what I need to do now
> is to use tuscany into tomcat ( deployed in a war file). This
> application will expose the ws binding. What I can't see is how to
> invoke the Web Service, I mean what is the service endpoint to test it?
>
> I tryed the following URL:
> http://localhost:8080/myapp/services/MyService
> http://localhost:8080/myapp/services/MyService?wsdl
>
> But with no success.
>
> I also having the following exception:
>
> GRAVE: "Servlet.service()" pour la servlet TuscanyServlet a généré une
> exception
> java.lang.IllegalStateException: No servlet registered for path: null
>    at
> org.apache.tuscany.sca.webapp.TuscanyServlet.service(TuscanyServlet.java
:57)
>
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:269)
>
>    at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
>
>    at
> org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:210)
>
>    at
> org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:174)
>
>    at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
>
>    at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
>
>    at
> org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:108)
>
>    at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:151)
>
>    at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:870)
>
>    at
>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:665)
>
>    at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:528)
>
>    at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:81)
>
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:685)
>
>    at java.lang.Thread.run(Thread.java:595)
>
> When I try ot invoke the above URLs.
>
> Your help will be appreciate.
>
> Thanks in advance,
>
> Jean-Marc
>
>
>

Hi

The URL should be http://localhost:8080/<web app name>/<path used to
register the Tuscany servlet in web.xml>/<uri specified in your
binding.ws element>.


Just to be clear as we don't have any doc or samples showing it in 0.90, the
webapp web.xml needs to define a Tuscany servlet and listener for this to
work, eg:

   <listener>
      <listener-class>org.apache.tuscany.sca.webapp.TuscanyContextListener
</listener-class>
   </listener>

   <servlet>
      <servlet-name>TuscanyServlet</servlet-name>
      <servlet-class>org.apache.tuscany.sca.webapp.TuscanyServlet
</servlet-class>
   </servlet>

   <servlet-mapping>
      <servlet-name>TuscanyServlet</servlet-name>
      <url-pattern>/*</url-pattern>
   </servlet-mapping>

The endpoint the service will be exposed at depends on several things like
the binding uri or wsdl or component and service name. There's the start of
some doc about this at
http://cwiki.apache.org/TUSCANY/sca-java-bindingws.html. If you don't
specify a uri or a wsdl port it will end with componentName/serviceName.

I've a sample for this not in SVN yet which you can get at
http://people.apache.org/~antelder/temp/ws-webapp-sample.zip.  The endpoint
that service will be available at would be
http://localhost:8080/sample-helloworld-ws-service-webapp/HelloWorldComponent/HelloWorldService

  ...ant

Reply via email to