0 Replies Latest reply on Nov 26, 2019 5:59 AM by wablehar

    JPOS EAP 7 Webservice giving Error HTTP GET Method not supported by the URI

    wablehar

      I have created a sample jax-ws soap webservice exported into a WAR and deployed it in a JBOSS EAP7 server .

      When I am trying to access the WSDL using the context path , It is giving me error - HTTP method GET not supported by the URI.

       

      Only class I have  --

      package org.jboss.samples.webservices;

       

      import javax.jws.WebMethod;

      import javax.jws.WebService;

      import javax.servlet.http.HttpServlet;

       

      @WebService()

      public class HelloWorld extends HttpServlet  {

       

             @WebMethod()

             public String sayHello(String name) {

                 System.out.println("Hello: " + name);

                 return "Hello " + name + "!";

             }

      }

       

       

      My web.xml

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

      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

        <display-name>HelloWorld</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>HelloWorldService</display-name>

          <servlet-name>HelloWorldService</servlet-name>

          <servlet-class>org.jboss.samples.webservices.HelloWorld</servlet-class>

        </servlet>

        <servlet-mapping>

          <servlet-name>HelloWorldService</servlet-name>

          <url-pattern>/HelloWorldService</url-pattern>

        </servlet-mapping>

      </web-app>