6 Replies Latest reply on Nov 16, 2011 8:15 PM by ffang

    Trying to get CXF Example to work

    timgstewart

      Hello,

       

      I am hoping to get some assitance here.

       

      I am trying to get a Camel route exposed as a CXF web service within Service Mix.  I've tried many different things but nothing seems to work.

       

      I decided to start with a clean system.  I downloaded JDK 1.6.0_29, Maven 3.0.3, Fuse ESB 4.4.1, and Fuse Mediation Router 2.8.0.  In installed the JDK, unzipped maven, unzipped the Fuse packages.

       

      I set my java_home and maven_home in two command prompt windows, and adjusted my path to reference those.

       

      I chose the camel-example-cxf-osgi, since it seems closest to what I want to do, so I did the following:

       

       

      In first command prompt window:

      1. cd \dev\apache-camel-2.8.0-fuse-00-08\examples\camel-example-cxf-osgi

      2. mvn install

       

      Everything seemed to work fine, tests passed, got a jar.

       

      In second command prompt window:

      1. cd \dev\apache-servicemix-4.4.1-fuse-00-08

      2. bin\servicemix.bat

       

      This gave me the Karaf prompt, where I followed the camel example readme:

      3. features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.8.0/xml/features

      4. features:install war

      5. features:install camel-spring

      6. features:install camel-jaxb

      7. features:install camel-cxf

       

      Everything went well so far.

       

      8. osgi:install -s mvn:org.apache.camel/camel-example-cxf-osgi/2.8.0

       

      It reported Bundle ID: 219.

       

      That seems good.

       

      I then tried to hit the WSDL, with http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl, and could see the WSDL.

      That was rather exciting.  Nothing else I tried got me this far except running camel standalone.

       

      Then I loaded SOAP UI, created a request, and pasted the fields only from the readme  I ended up with this:

       

      (Servlet3ContinuationProvider.java:77)[125:org.apache.cxf.bundle:2.4.2.fuse-00-08]

           at org.apache.cxf.transport.http.Servlet3ContinuationProvider.getContinuation(Servlet3ContinuationProvider.java:58)[125:org.apache.cxf.bundle:2.4.2.fuse-00-08]

           at org.apache.camel.component.cxf.CxfConsumer$1.getContinuation(CxfConsumer.java:113)

           at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:66)

           at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_29]

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_29]

           at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_29]

           at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[125:org.apache.cxf.bundle:2.4.2.fuse-00-08]

           at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[125:org.apache.cxf.bundle:2.4.2.fuse-00-08]

           ... 34 more

       

       

      I can't figure out where to go from here, and I've had similar success (or lack thereof) with the other CXF samples.  Is it just me?  We are evaluating this for use in our upcoming project, and so far it is consuming more time than anything else on the project, with zero results.

       

      Any help is very much appreciated.

       

      - Tim Stewart.

        • 1. Re: Trying to get CXF Example to work
          njiang

          Fuse ESB ships the Fuse MR (Which is based on Apache Camel), you don't need to install another version of Apache Feature.

           

          From the stack trace that you showed, it's a known issue which Fuse ESB should use the servlet API 2.5 instead of servlet API 3.0. You can work around it by uninstalling the servlet API 3.0 bundle or using the Fuse ESB 4.4.1-fuse-01-06.

           

           

          Willem

          • 2. Re: Trying to get CXF Example to work
            timgstewart

            Thanks, I appreciate the reply.

             

            While the core of Mediation Router is included in the ESB, I understand that the examples are not, so I had to download the Mediation Router to get the camel cxf examples.

             

            I cannot seem to download the 4.4.1 01-06 version.  I receive:

             

            Welcome Timothy, Log out |Register |Buy Now |Download

            Oops! We couldn't find the download you requested. This may be due to a change in the request url or a change in our download repository.

             

            If you continue to have difficulty accessing Fuse ESB / Apache ServiceMix v4.4.1-fuse-01-06 (Windows), please contact us.

             

            I'll wait for this to be fixed, and in the meantime I'll try to figure out how to disable the Servlet 3.0 and see if that works.

            • 3. Re: Trying to get CXF Example to work
              timgstewart

              Uninstalling the Servlet 3.0 bundle fixed the issue.  It is good to have something successful!  Thanks very much.

               

              I will try the 01-06 release as soon as it becomes available.

               

              Thanks again for your response and assistance.

               

              - Timothy Stewart.

              • 4. Re: Trying to get CXF Example to work
                mjabali

                By the way, the repo server was rebooted and the downloads seem to be available again. Let us know if you have any problems downloading them.

                 

                Thanks

                 

                -Marcelo

                • 5. Re: Trying to get CXF Example to work
                  timgstewart

                  No trouble downloading now, but the exact same stack trace occurs with the 01-06 version.

                   

                  Again, removing the Servlet 3.0 bundle fixes the issue, but will this cause me other problems?

                  • 6. Re: Trying to get CXF Example to work
                    ffang

                    Hi,

                     

                    No, removing the Servlet 3.0 bundle won't cause other problem.

                    And next FUSE ESB release will align servlet api version to fix this issue.

                     

                    Freeman