Transports can be configured and enabled in a global-level or a service-level. Globally enabled and configured transports effect all services deployed in a running Carbon instance. The following methods can be used to configure and enable transports globally:
Using axis2.xml file
WSO2 Carbon and all Carbon-based products are shipped with a configuration file named
axis2.xml. This XML configuration file can be found at
repository/conf/axis2 directory. This is similar to the
axis2.xml file that ships with Apache Axis2 and Apache Synapse. It contains the global configuration for WSO2 Carbon and the Carbon-based products. The
axis2.xml configuration generally includes configuration details for modules, phases, handlers, global configuration parameters and transports. The elements
<transportSender> are used to configure transport listeners and senders respectively. In the
axis2.xml file that comes with WSO2 Carbon or any Carbon-based product, some transports are already configured and enabled by default, including the HTTP and HTTPS transports.
WSO2 products do not use the HTTP/S servlet transport configurations that are in the axis2.xml file. Instead, they use Tomcat-level servlet transports, which are used by the management console in <PRODUCT_HOME>/repository/conf/tomcat/catalina-server.xml file.
Given below is an example JMS transport receiver configuration in the
<transportReceiver> element has the following attributes and sub-elements:
- name - A mandatory attribute that indicates a unique name for the transport receiver.
- class - A mandatory attribute that indicates the transport receiver implementation class.
- parameters - Configuration parameters for the transport receiver. It should be included as child elements of the
<transportSender>element to configure and enable transport senders in WSO2 products.
axis2.xmlfile will be loaded to memory only during server startup. Therefore, any changes made to the file while the server is up and running will not be applied until the server is restarted.
- Simply having
<transportSender>elements in the
axis2.xmlfile causes those transports to be loaded and activated during server startup. Therefore, any dependency JARs required by those transport implementations must be included in the server classpath to prevent the server from running into exceptions at startup. In addition, an inaccurate transport configuration (for example, a wrong parameter value) might result in the transport not being enabled properly.
Using catalina-server.xml file
In addition to the above, transport receivers can be configured globally using the
<CARBON_HOME>/repository/conf/tomcat/catalina-server.xml file. The default HTTP/S configuration specified in the
catalina-server.xml file is given below:
Currently only the default servlet transports of Carbon can be configured using the
For more details on config parameters, go to http://tomcat.apache.org/tomcat-7.0-doc/config/http.html