You can deploy JAX-WS and JAX-RS services in a running Carbon instance by bundling them in a CXF application. Generally, the folder structure of a CXF application is as follows.
However, this can change depending on your service. Please see the Webapp ClassLoading page for adding webapp-classloading.xml. It's a custom file implemented by WSO2 to give flexibility in classloading. You must have this file to deploy JAX-WS and JAX-RS applications because CXF runtime is not visible to the webapps by default.
See the following topics:
Deploying an application
Follow the instructions below to deploy your CXF application.
- Log on to the product's Management Console and select "JAX-WS/JAX-RS” under “Applications” -> “Add” in the left pane.
- The "Upload JAX-WS/JAX-RS Applications" page appears. Select your .war file and click "Upload". For example,
You can click the plus ‘+’ sign button to upload multiple Webapps at the same time.
- If the file is uploaded successfully, a message appears prompting you to refresh the page. Click OK.
If the deployment is not successful, the application will be listed in a Faulty JAX-WS/JAX-RS Application link. You can click the link to view the errors
- Refresh the "Running Applications" page in the product's Management Console to view the newly-added application listed.
The file name of the archive is always used as the application name.
Instead of using the management console, you can manually place your
JAX-WS/JAX-RS.war files in the
Testing the JAX-WS/JAX-RS Application
Follow the instructions below to test your CXF application.
- Log on to the product's Management Console and select "List" under menu "Applications".
- The "Running Applications" page appears. Click on the "Find Services" link associated with a given JAX-WS/JAX-RS application.
- A list of SOAP and RESTful services deployed through your application will be opened in a separate browser window.
You can use the WSDL URLs of the services and try those services using the tool which can be found under Tools/Try-It menu.
Connecting to an application
WSO2 AS supports a variety of transports . Among these, the HTTP and HTTPS servlet transports are used by the applications hosted on AS to connect with other clients and applications. The receiver implementation for the HTTP and HTTPS transports are built into Carbon products, and the sender implementation comes from the Tomcat http connector, which is configured in the
catalina-server.xml file (stored in the