[jboss-user] [JBoss Web Services] - Trouble with sample web service (Cannot obtain endpoint for: xxx)
Magnus Andersson
do-not-reply at jboss.com
Sat Apr 17 18:56:23 EDT 2010
Magnus Andersson [http://community.jboss.org/people/DrNoID] created the discussion
"Trouble with sample web service (Cannot obtain endpoint for: xxx)"
To view the discussion, visit: http://community.jboss.org/message/538151#538151
--------------------------------------------------------------
I am trying to set up a web service in my application but I can't get it to run.
I use JBoss 5.1.0 and Eclipse.
I have set up a dynamic web project, added to a ear, and added a sample web service to the web project.
When I deploy the ear from Eclipse it starts allright:
00:40:34,796 INFO [TomcatDeployment] deploy, ctxPath=/MyProjectWebservice
00:40:35,578 INFO [WSDLFilePublisher] WSDL published to: file:/C:/JBoss/jboss-5.1.0.GA/server/default/data/wsdl/MyProjectEAR.ear/MyProjectWebservice.war/HelloWorldService5815640636885811535.wsdl
The endpoint is there (but has wrong "path")
http://localhost:8080/jbossws/services http://localhost:8080/jbossws/services
*Registered Service Endpoints* | Endpoint Name | jboss.ws:context=MyProjectEAR-MyProjectWebservice,endpoint=HelloWorld |
| Endpoint Address | http://localhost:8080/MyProjectEAR-MyProjectWebservice/HelloWorld?wsdl (http://localhost:8080/MediaLibraryEAR-MediaLibraryWebservice/HelloWorld2Servlet?wsdl) |
| %1,2% | StartTime | StopTime |
|
| null |
|
|
| RequestCount | ResponseCount | FaultCount |
| 0 | 0 | 0 |
| MinProcessingTime | MaxProcessingTime | AvgProcessingTime |
| 0 | 0 | 0 |
|
| %1,3% |
If I click the link it can't find anything and if I change the path to http://localhost:8080/MediaLibraryEAR-MediaLibraryWebservice/HelloWorld2Servlet?wsdl http://localhost:8080/MyProjectWebservice/HelloWorld?wsdl it throws 'Cannot obtain endpoint for: xxx':
*exception*
javax.servlet.ServletException: Servlet.init() for servlet HelloWorld threw exception
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)
*root cause*
javax.xml.ws.WebServiceException: Cannot obtain endpoint for: jboss.ws:context=/MyProjectWebservice,endpoint=HelloWorld
org.jboss.wsf.common.servlet.AbstractEndpointServlet.initEndpoint(AbstractEndpointServlet.java:153)
org.jboss.wsf.common.servlet.AbstractEndpointServlet.initServiceEndpoint(AbstractEndpointServlet.java:124)
org.jboss.wsf.common.servlet.AbstractEndpointServlet.init(AbstractEndpointServlet.java:72)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)
What is wrong with my settings? Why can't it find the endpoint (or why is it pointing wrong)?
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee" xmlns:web=" http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>MyProjectWebservice</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<display-name>HelloWorld</display-name>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>org.jboss.samples.webservices.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538151#538151]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100417/d537ab27/attachment.html
More information about the jboss-user
mailing list