# Deploying JAX-WS/JAX-RS Applications

WSO2 AppServer fully supports JAX-WS and JAX-RS specifications. Internally it uses Apache CXF as the JAX-WS/JAX-RS runtime. If you are familiar with CXF and if you already have your CXF webapps, you can directly deploy those as normal Webapps in WSO2 AppServer (just like deploying on Tomcat). But in that case, you should pack all CXF libraries inside your WEB-INF/lib directory.

But if you use this feature, your CXF webapp should only contain your business logic. You don't have to worry about any CXF libraries and those are provided by the WSO2 Carbon OSGi environment. And also, you can use WSO2 Carbon Studio to easily develop your JAX-WS/JAX-RS Application. It will generate the needed webapp structure and you only have to concentrate about your annotations and business logic.

## Uploading JAX-WS/JAX-RS Applications

The normal folder structure of a CXF application will be as follows. This can change depending on your service.

            HellowService.war
                WEB-INF/
                    web.xml
                    cxf-servlet.xml
                    wsdl
                    lib/
                    classes/
                META-INF/

Figure 1: Uploading a JAX-WS/JAX-RS archive file

1. In the navigator, under Manage/JAX-WS/JAX-RS, click Add .
2. Click Browse to locate the file you want to upload. If you want to add multiple JAX-WS/JAX-RS apps at the same time, click on the '+' sign at the right side, and new additional entry to upload a JAX-WS/JAX-RS archive will appear each time you click. So you can select all the archives you want and deploy them at the same time.
3. Click Upload. The Running JAX-WS/JAX-RS Applications page appears. Subsequently, if the deployment is successful, it will appear in the list. If the application is faulty, a Faulty JAX-WS/JAX-RS Application link will appear. You can click the link to view the errors.

Note: Instead of using this user interface, you can also manually place your JAX-WS/JAX-RS war file into CARBON_HOME/repository/deployment/jaxwebapps directory.