3 Replies Latest reply on Sep 22, 2008 6:01 PM by Daniel Roth

    Web service with seam

    Mathias Nilsson Newbie
      I'm testing seam for the first time and I'm trying to set up Web services with seam.

      I have added the dependencies stated in the download section into to my maven pom file.
      I'm using the 2.0.3.CR1 version.

      I have copied ejb-jar.xml and standard-jaxws-endpoint-config.xml from seam-bay example into
      my webapp/META-INF folder.

      The web.xml looks like this
      <listener>
        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
      </listener>
      <filter>
        <filter-name>Seam Filter</filter-name>
        <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>Seam Filter</filter-name>
        <url-pattern>*.seam</url-pattern>
      </filter-mapping>    
      <servlet>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <url-pattern>/seam/resource/*</url-pattern>
      </servlet-mapping>


      I have also added a components.xml in the WEB-INF folder but it only contains the xml namspace
      declarations.

      I'm trying this simple interface and class
      @Remote
      public interface IProcess {
        @WebMethod
        public void process( String channelName  );
        @WebMethod
        public List<Channel> getChannels();

      }

      @Stateless
      @WebService(name = "ProcessService", serviceName = "ProcessService")
      public class ProcessService implements IProcess{
        public void process( String channelName  ){
                
        }
           
        public List<Channel> getChannels(){
          List<Channel> channels = new LinkedList<Channel>();
          Channel channel = new Channel();
          channel.setName( "test");
          channels.add( channel );
                
          return channels;
        }
      }     

      When running the jboss server in eclipse I don't get any error messages, everything seems fine.
      But when looking in http://localhost:8080/jbossws/services the is no endpoint. Can
      anyone give me any pointers on where to go from here?

      // Mathias