8 Replies Latest reply on Aug 1, 2007 8:39 PM by Shane Bryzak

    SOS-Creating WebService with Seam

    Johan Douilly Newbie

      Could someone please explain to me the steps that I have to follow to create a WebService and a WS Client with Seam, because I was following the Seam documentation, I put the file called standard-jaxws-endpoint-config.xml into the META-INF directory of the jar file that contains the web service classes, but still it doesn't work...

        • 1. Re: SOS-Creating WebService with Seam
          Chris Lowe Apprentice

          What do you mean by "does not work" - do you get exceptions or error messages of any sort? There was a fix put in yesterday resolving an NPE if no conversationId was specified on a WS call. I've been having trouble with sessions, but have been able to deploy and invoke the web service just fine:


          If you're using a stateless session bean (SLSB), then make sure you're using the @Remote (rather than @Local) annotation for your interface.

          What version of Seam and JBoss are you using? I'm using the following:

          JBossAS 4.2.0.GA
          Seam 2.0.0.CVS31-07-2007
          JBossWS 2.0.0.GA
          JDK 6.0

          Also be aware that there is extra config required to run WS under JDK 6.0.



          • 2. Re: SOS-Creating WebService with Seam
            Johan Douilly Newbie

            Thanks Chris for your response. Well first of all, I must tell you that I've been using Seam for a few months but I've never done Web Services with it, so I'm kinda new to this stuff.

            I'm using :
            JBossAS 4.0.5.GA
            JBoss Seam 1.1.6.GA
            JDK 5.0

            In order for you to help me, I'll explain what I've done. I have my project that I've been working on, now I have to add a web Service layer. So I added a new namespace in the project and I create a class and it's interface. Here is the content of my class (it's just a test):

            import javax.jws.WebMethod;
            import javax.jws.WebService;
             public class WS_Test implements WS_TestLocal
             private String message = new String("Hello, ");
             public String sayHello(String name) {
             return message + name + ".";

            I'm using Ant with eclipse to explode the project on JBoss. It generates the WSDL file, when I type "http://localhost:8080/jbossws" in the adress bar of my browser, I can see my web Service as a Registered Service Endpoint but when I click on it to view the wsdl, I get an error that tells me that the resource is not available. I don't understand...Any Idea?


            • 3. Re: SOS-Creating WebService with Seam
              Chris Lowe Apprentice


              The name of your interface is WS_TestLocal which implies you are using the @Local annotation. For web services you need to use @Remote. For example, I think you should use something like this:

              public interface WS_TestRemote {
               String sayHello(String name);



              • 4. Re: SOS-Creating WebService with Seam
                Johan Douilly Newbie

                I had already replaced it when I saw your first response. Even though it's WS_TestLocal, I had the @Remote annotation inside.

                • 5. Re: SOS-Creating WebService with Seam
                  Chris Lowe Apprentice

                  In your logs do you see an entry something like this:

                  INFO [LifecycleHandlerImpl] WebService started: http://DFVGM71J:8080/dcs-dcs/DevelopmentAuthenticator

                  Where "http://DFVGM71J:8080/dcs-dcs/DevelopmentAuthenticator" is the published end point of my web service. To see the WSDL, add "?wsdl" to the URL:


                  I have JBossWS 2.0.0, so your log entries may be different.


                  • 6. Re: SOS-Creating WebService with Seam
                    Johan Douilly Newbie

                    This is what I saw in my log:

                    17:41:55,187 INFO [EJBContainer] STARTED EJB: webServices.WS_Test ejbName: WS_Test
                    17:41:55,562 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.5.GA/server/default/deploy/malongo.ear/malongo.jar/
                    17:41:55,671 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/malongo.ear/malongo.jar/WS_TestService2213.wsdl
                    17:41:55,921 INFO [ServiceEndpointManager] WebService started: http://Johan:8080/malongo/WS_Test

                    When I add "?wsdl" at the end of "http://Johan:8080/malongo/WS_Test" in my browser, it gives me an error of type HTTP STATUS 404, telling me that the requested resource is not available.


                    • 7. Re: SOS-Creating WebService with Seam
                      Chris Lowe Apprentice

                      I'm sorry Johan, but I'm all out of ideas :( Hopefully one of the Seam guys can help.

                      • 8. Re: SOS-Creating WebService with Seam
                        Shane Bryzak Master

                        I suggest you head over to the JBossWS forum, as this isn't a Seam issue.