简体   繁体   中英

Does the application server JBoss include CXF installation?

I'm trying to set the CXF Runtime on Eclipse web services preferences window. I'm trying to point to JBoss installation in my pc at : C:\\jboss-eap-6.3\\modules\\system\\layers\\base\\org\\apache\\cxf

But I'm getting error : Missing CXF jar: Please select the CXF home directory. Shouldn't JBoss include a working CXF installation ?

Jboss AS 7.x have the dependency for apache CXF, you can use that by loading the module in your web application. There are a lot of way to achieve this on of common is setting apache cfx module as global module which will loaded into memory as the application server will started. Add the following lines in standalone.xml of jboss server-

  <subsystem xmlns="urn:jboss:domain:ee:1.0" >
  <global-modules>
  <module name="org.apache.cxf" slot="main" />
  </global-modules> 
  </subsystem>

If you want to add the module as web application dependent then you can use jboss-deployment-structure.xml-

<jboss-deployment-structure>
   <deployment>
      <dependencies>
         <module name="org.apache.cxf" services="import">
            <imports>
               <include path="**" />
            </imports>
         </module>
      </dependencies>
   </deployment>
</jboss-deployment-structure>

and if you are using the maven build the you can load the module by manifest entry for the dependency-

<build>
   ...
   <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-war-plugin</artifactId>
       <configuration>
          <archive>
             <manifestEntries>
                <Dependencies>org.apache.cxf</Dependencies>
             </manifestEntries>
          </archive>
       </configuration>
     </plugin>
   </plugins>
</build>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM