I did write a simple java web service (using javax jws). I am trying to deploy this service into Jboss server at openshift. When I am trying to access the service I am receiving the exception above.
Java Service Interface:
@PermitAll
@WebService
@SOAPBinding(style = Style.RPC)
public interface CalWebService {
@WebMethod int add(int x, int y);
}
Java Service Implementation:
@PermitAll
@WebService(
endpointInterface="cmps.CalWebService",
portName="CalWebServicePort",
serviceName="CalWebService")
public class CalWebServiceImp implements CalWebService {
@Override
public int add(int a, int b) {
return a + b;
}
}
Exception: http://cmps-mohamadjaber.rhcloud.com/CalWebService
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet cmps.CalWebServiceImp threw exception org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) java.lang.Thread.run(Thread.java:744) root cause
javax.xml.ws.WebServiceException: Cannot obtain endpoint for: jboss.ws:context=,endpoint=cmps.CalWebServiceImp org.jboss.wsf.stack.cxf.transport.ServletHelper.initServiceEndpoint(ServletHelper.java:108) org.jboss.wsf.stack.cxf.transport.ServletHelper.initEndpoint(ServletHelper.java:82) org.jboss.wsf.stack.cxf.CXFServletExt.loadBus(CXFServletExt.java:64) org.jboss.wsf.stack.cxf.CXFServletExt.init(CXFServletExt.java:58) org.jboss.wsf.spi.deployment.WSFServlet.init(WSFServlet.java:57) org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) java.lang.Thread.run(Thread.java:744) note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
JBoss Web/7.0.13.Final