1 Reply Latest reply on Apr 17, 2015 7:51 AM by Marcin Erbel

    java.lang.IllegalStateException: Cannot obtain endpoint meta

    R B Newbie

      Hi All,

      I am very new to JBoss web services and am trying to create a sample web service application using JBoss WS. Here is what i have done so far:

      1) Created a POJO for the web service. Its source code is as follows:

      package test.webservices;
      
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      
      
      @WebService(name = "CalculatorService")
      public class CalculatorService
      {
       @WebMethod
       public Integer add(@WebParam(name = "arg1")Integer arg1,@WebParam(name = "arg2") Integer arg2){
       return arg1+arg2;
       }
      }
      


      2) Created entry in web.xml. My web.xml looks like the following:
      <?xml version="1.0" encoding="UTF-8"?>
      <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
       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
       <servlet>
       <servlet-name>CalculatorService</servlet-name>
       <servlet-class>test.webservices.CalculatorService</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>CalculatorService</servlet-name>
       <url-pattern>/CalculatorService</url-pattern>
       </servlet-mapping>
      
      </web-app>
      


      3) Deployed the project as a war file. However when i start the server, i see the following exception trace:
      java.lang.IllegalStateException: Cannot obtain endpoint meta data
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(RequestHandlerImpl.java:520)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.java:144)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:126)
       at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      


      When i open the link http://localhost:8080/jbossws/services, I can see an end point name and end point address. However when i click on the WSDL link, i do not see the WSDL.

      Can someone help me in figuring out what might be the issue?

        • 1. Re: java.lang.IllegalStateException: Cannot obtain endpoint meta
          Marcin Erbel Newbie

          In my case I had to add jboss-web.xml inside WEB-INF. Example is here:

           

          <?xml version='1.0' encoding='UTF-8' ?>

          <jboss-web>

              <class-loading java2ClassLoadingCompliance="false">

                  <loader-repository>

                      package:system.war=unique-system.war

                      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

                  </loader-repository>

              </class-loading>

          </jboss-web>