3 Replies Latest reply on Nov 21, 2013 12:36 PM by brian.welter

    First service bundle(s) deployed...how do I access them?

    brian.welter

      New to Fuse and playing with the base projects cxf-jaxrs-service and cxf-jaxws-javafirst.

       

      The projects both build without error.  I have deployed them to a local fuse instance without error and they appear as active osgi bundles.

       

       

      Screen shot 2013-11-20 at 2.39.45 PM.png

         <jaxrs:server id="services" address="/">

          <jaxrs:serviceBeans>

            <bean class="com.mycompany.cxf.jaxrs.service.HelloWorld" />

          </jaxrs:serviceBeans>

          <jaxrs:providers>

              <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>

          </jaxrs:providers>

          </jaxrs:server>

       

      Screen shot 2013-11-20 at 2.40.03 PM.png

      Screen shot 2013-11-20 at 2.40.26 PM.png

       

      <jaxws:endpoint

          id="helloWorld"

          implementor="com.mycompany.cxf.jaxws.javafirst.HelloWorldImpl"

          address="http://localhost:9090/HelloWorld" />

       

      So where are my endpoints?

        • 1. Re: First service bundle(s) deployed...how do I access them?
          davsclaus

          What do you mean?

           

          In the Fuse Shell (eg the command line shell) you can type

          cxf:list-endpoints to list all the CXF related endpoints.

           

          Are you looking for a similar list in the FMC web console?

          1 of 1 people found this helpful
          • 2. Re: First service bundle(s) deployed...how do I access them?
            brian.welter

            The problem appears to be that neither bundle I deployed could be started (even though they are deployed and Active).  I walked through a tutorial in the Fuse documentation and was able to start up a jax-ws project. 

             

            When deploying the bundle to the deploy folder on my fuse instance, it automatically built and started.  I was also able to test it using the supplied maven profile.

             

            Next step for me is to get  jax-rs  proof of concept working but I think I'm on the right track now.

            • 3. Re: First service bundle(s) deployed...how do I access them?
              brian.welter

              ...and the root cause seems to be a spring bean error -- which is actually a class-loader issue.

              org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface

                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)

                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)

               

              My research has pointed me to the requirement of a manifest file in the WAR.  The documentation here states this is required for OSGi War deployments:

              https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War+-+OSGi-fy

               

              However, the maven-bundle-plugin only works for bundle and jar type projects, not for wars. I guess I'll try to create the manifest manually and see where it gets me.