[jboss-user] [JBossWS] - org.jboss.ws.WSException: Cannot obtain endpoint for (using

DjHitItUp do-not-reply at jboss.com
Thu Jul 27 13:15:59 EDT 2006


I am using JBoss 4.0.4 and JBossWS 1.0.2 on an HP-UX system.  I am getting an exception on a simple web service.  The web service works when JBoss is started but if I redeploy the application or restart JBoss the web service no longer works.  Below is the web service code:

package com.company.department.ws;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class TestWebService {

    @WebMethod
    public String hello(String name) {
        return "Hello "+name+"!";
    }
}


Below is the web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">

    <!-- The Welcome File List -->
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

		<!-- Servlets -->
    
        <servlet-name>TestWebService</servlet-name>
        <servlet-class>com.company.department.ws.TestWebService</servlet-class>
    
       
		<!-- Servlet Mappings -->
    <servlet-mapping>
        <servlet-name>TestWebService</servlet-name>
        <url-pattern>/webservice/TestWebService</url-pattern>
    </servlet-mapping>
   
</web-app>

When JBoss starts it rewrites the web.xml to the below:

<web-app version='2.4' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd'>
 <!-- The Welcome File List -->
 <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>
 <!-- Servlets -->
 
  <servlet-name>TestWebService</servlet-name>
  <servlet-class>org.jboss.ws.integration.jboss.JBossServiceEndpointServlet</servlet-class>
  <init-param>
   <param-name>ServiceEndpointImpl</param-name>
   <param-value>com.company.department.ws.TestWebService</param-value>
  </init-param>
 
 
  <servlet-name>DataEnhancement</servlet-name>
 <!-- Servlet Mappings -->
 <servlet-mapping>
  <servlet-name>TestWebService</servlet-name>
  <url-pattern>/webservice/TestWebService</url-pattern>
 </servlet-mapping>
</web-app>

The exception that I am getting after I restart JBoss or redeploy the web app is:

12:11:42,155 ERROR [[TestWebService]] Servlet.service() for servlet TestWebService threw exception
org.jboss.ws.WSException: Cannot obtain endpoint for: jboss.ws:context=miande,endpoint=TestWebService
        at org.jboss.ws.server.StandardEndpointServlet.initServiceEndpoint(StandardEndpointServlet.java:162)
        at org.jboss.ws.integration.jboss.JBossServiceEndpointServlet.initServiceEndpoint(JBossServiceEndpointServlet.java:49)
        at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:74)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

The libraries that I have in my ../WEB-INF/lib directory is:

../WEB-INF/lib/jbossws-client.jar


Some questions I have is:
1.)  Does my application need to reference more JBoss .jar files?  Is this why I get the error?
2.)  Is this a bug in JBossWS 1.0.2?
3.)  Is there a work around?  For example, when I resart JBoss or redeploy the application do I need to ALWAYS copy the web.xml.org file over web.xml?
4.)  What are my options?

Thank you guys for the help.

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

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



More information about the jboss-user mailing list