1 2 Previous Next 20 Replies Latest reply on Jul 21, 2011 3:37 AM by asoldano Go to original post
      • 15. Re: Problem migrating RESTful service from AS6 to AS7
        abhi0123

        Stuart Douglas wrote:

         

        Thats not a JAX-RS webservice, the resteasy configuration should not affect it.

         

        JAX-WS is only partly implemented in 7.0, it may be that you have to wait for 7.1

        It is true that it is not a JAX-RS service, it is a RESTful service.

        Are you suggesting that I stick to JBoss AS 6.0.0.Final until AS 7.1 (it  worked with 6.0)? Is there an expected date for 7.1 release?

        • 16. Re: Problem migrating RESTful service from AS6 to AS7
          asoldano

          JAX-WS (JSR-224) is completely implemented in AS 7.0 (preview). What's still missing is the JSR-109 implementation as well as some proprietary features that were shipped in previous AS versions.

          This said, the @WebServiceProvider annotated bean shown previously should work afaics. There a bit of clutter in this thread (at least it's not all clear to me), as the JAX-RS and JAX-WS stuff is being mixed and discussed together. Please try by first having a JAXWS deployment only (so remove any Resteasy / jaxrs stuff from manifest dependencies, web.xml, etc.) and see if that works. Then, depending on the outcome we go on analysing the issue.

          • 17. Re: Problem migrating RESTful service from AS6 to AS7
            abhi0123

            When I started the migration, I had the service configured as a Servlet in the web.xml, no RESTEasy nothing. Is that what you are suggesting or are you asking to get rid of the web.xml altogether?

            • 18. Re: Problem migrating RESTful service from AS6 to AS7
              asoldano

              Yes, that's what I'm suggesting, remove any RestEasy stuff you added that you actually don't need; so, I understand that you've added the resteasy conf stuff because you asked here and people was misled by you referring to "RESTful service" (while you can realize a REST service using a JAXWS WebServiceProvider, people usually identify REST with JAX-RS and hence RestEasy...).

              Please post the initial configuration you've been using (no jaxrs stuff), web.xml, jaxws endpoint, how do you package it, etc. and let's see what's wrong in it.

              1 of 1 people found this helpful
              • 19. Re: Problem migrating RESTful service from AS6 to AS7
                abhi0123

                The service seems to be working with a warning during deployment (shown below in deployment log snippet) with the following web.xml. The fact that it did not work with the same web.xml when I started was probably because I was not running the server in standalone preview mode.

                It did not work without a web.xml and returned 404.

                 

                The warning does not seem to be an issue. However, if you want to investigate, I will gladly provide any information required.

                 

                web.xml:

                {code:xml}

                <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

                    version="3.0">

                    <display-name>movie-service-restful</display-name>

                    <servlet>

                        <servlet-name>MovieServiceRestful</servlet-name>

                        <servlet-class>name.app.abhi.movieservice.restful.service.impl.MovieServiceRestful</servlet-class>

                    </servlet>

                    <servlet-mapping>

                        <servlet-name>MovieServiceRestful</servlet-name>

                        <url-pattern>/*</url-pattern>

                    </servlet-mapping>

                </web-app>

                {code}

                 

                Server log while deployment:

                {code}

                19:55:51,698 WARN  [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-4) Cannot resolve resource: org.apache.cxf.ws.rm.RMManager/bus

                19:55:51,707 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-4) remove: jboss.ws:context=movieservicerestful,endpoint=MovieServiceRestful

                19:55:51,726 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment movie-service-restful-1.0-SNAPSHOT.war in 121ms

                19:55:51,727 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "movie-service-restful-1.0-SNAPSHOT.war"

                19:55:52,439 INFO  [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] (MSC service thread 1-2) Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.

                19:55:52,441 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-2) Add Service

                id=MovieServiceRestful

                address=http://localhost:8080/movieservicerestful

                implementor=name.app.abhi.movieservice.restful.service.impl.MovieServiceRestful

                invoker=org.jboss.wsf.stack.cxf.InvokerJSE

                serviceName={http://impl.service.restful.movieservice.abhi.app.name/}MovieServiceRestfulService

                portName={http://impl.service.restful.movieservice.abhi.app.name/}MovieServiceRestfulPort

                wsdlLocation=null

                mtomEnabled=false

                {code}

                 

                Server log after a client request:

                I believe this is because java.beans.XMLEncoder works only with Java Beans and TreeSet is not a Java Bean. This is nothing to do with JBoss AS.

                {code}

                19:56:37,273 ERROR [stderr] (http-localhost.localdomain-127.0.0.1-9090-1) java.lang.Exception: Encoder: discarding statement TreeSet.add(Movie);

                19:56:37,274 ERROR [stderr] (http-localhost.localdomain-127.0.0.1-9090-1) Continuing ...

                {code}

                • 20. Re: Problem migrating RESTful service from AS6 to AS7
                  asoldano

                  abhi0123 wrote:

                   

                  The service seems to be working with a warning during deployment (shown below in deployment log snippet) with the following web.xml.

                  Good

                   

                   

                  The fact that it did not work with the same web.xml when I started was probably because I was not running the server in standalone preview mode.

                  OK, that makes sense; unfortunately you were misled to the JAXRS way before trying this (and btw afaik RestEasy is available in the default standalone profile...)

                   

                   

                  It did not work without a web.xml and returned 404.

                  Yes, that's because you're using a POJO endpoint and https://issues.jboss.org/browse/JBWS-3276 is still to be worked.

                   

                   

                  The warning does not seem to be an issue. However, if you want to investigate, I will gladly provide any information required.

                  Right, it's not an issue. The JBossWS resolver can't resolve that RM stuff, which I really believe is instead resolved by the internal CXF resolver, that's called failing the JBossWS one. I'll see if we can change the log level in situations like this.

                  1 2 Previous Next