[jboss-user] [JBossWS] - WSException: Cannot obtain endpoint

froden do-not-reply at jboss.com
Tue Jan 8 10:03:14 EST 2008


Hi,

I'm having some problems integrating JBossWS 1.2.1 into our webapp using Seam 1.2.1 on Tomcat 5.5.23.

I downloaded jbossws-1.2.1.GA.zip and copied the jars as specified here http://jbws.dyndns.org/mediawiki/index.php?title=Install_Tomcat into tomcat's common/libs and common/endorsed. I also copied the jbossws.war into tomcat's webapp directory. So far so good, the jbossws webapp is working and I can deploy the samples from jbossws-samples-1.2.1.GA by dragging their wars into jbossws-deploy.

I then proceeded to try and add a webservice to our already existing web application.

This is the class I wish to expose as a web service:

package services;
  | 
  | import javax.jws.WebMethod;
  | import javax.jws.WebService;
  | import javax.jws.soap.SOAPBinding;
  | 
  | @WebService (name="TestService")
  | @SOAPBinding(style = SOAPBinding.Style.RPC)
  | public class TestService {
  |    
  |    @WebMethod
  |    public String feedback() {
  |       return "Hello from ws;
  |    }
  | }

I've added the following to my web.xml

<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <web-app version="2.5"
  |          xmlns="http://java.sun.com/xml/ns/javaee"
  |          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  |     
  |     <servlet>
  |         <servlet-name>TestService</servlet-name>
  |         <servlet-class>org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet</servlet-class>
  |     </servlet>
  |     <servlet-mapping>
  |         <servlet-name>TestService</servlet-name>
  |         <url-pattern>/TestService.ws</url-pattern>
  |     </servlet-mapping>
  | 
  | </web-app>

As you can see, I've removed pretty much anything else from web.xml, trying to isolate the problem.

Now, from what I've seen in the samples, dropping the war into the jbossws-deploy directory causes the jbossws system to modify web.xml and add an ServiceEndpointImpl init-param to each web service servlet. In my case, it should be something like this:


  |         <init-param>
  |          <param-name>ServiceEndpointImpl</param-name>
  |          <param-value>services.TestService</param-value>
  |         </init-param>

This doesn't happen.

When I try to view the service (localhost:8080/MyApp/TestService.ws) it gives me the following exception:

anonymous wrote : ERROR org.apache.commons.logging.impl.Log4JLogger (Log4JLogger.java:119) - Servlet.service() for servlet TestService threw exception
  | org.jboss.ws.WSException: Cannot obtain endpoint for: jboss.ws:context=MyApp,endpoint=TestService
  |         at org.jboss.ws.core.server.AbstractServiceEndpointServlet.initServiceEndpoint(AbstractServiceEndpointServlet.java:161)
  |         at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:73)
  |         at org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet.service(TomcatServiceEndpointServlet.java:99)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  |         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)
  | 

This happens also if I add the init-param manually.

Any ideas what I might be missing here?

- Frode

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117942#4117942

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117942



More information about the jboss-user mailing list