Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are some methods to configure and enable transports in WSO2 Carbon or any Carbon based solution.

...

WSO2 Carbon and all Carbon based products ship with a configuration file named axis2.xml.This XML configuration file can be found at $CARBON<PRODUCT_HOMEHOME>/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 <transportReceiver> and <transportSender> are used to configure transport receivers 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.

The HTTP transport receiver configuration would be something similar to the following.

Code Block

<transportReceiver name="http" class="org.wso2.carbon.core.transports.http.HttpTransportListener">
      <parameter name="port">9763</parameter>
  </transportReceiver>

...

Similarly <transportSender> elements can be used to configure and enable transport senders in WSO2 Carbon. Given below is the HTTP transport sender configuration that comes with WSO2 Carbon by default. It contains three parameters.

Code Block

<transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
      <parameter name="PROTOCOL">HTTP/1.1</parameter>
      <parameter name="Transfer-Encoding">chunked</parameter>
      <parameter name="OmitSOAP12Action">true</parameter>
  </transportSender>

...

When Carbon is running in the standalone mode one could use the $CARBON_HOME/conf/transports.xml file to specify transport receiver configurations. By default, you will find the HTTP and HTTPS servlet transports configured in this file. The XML syntax to configure transports in the transports.xml file is similar to the syntax used in the axis2.xml file, with only difference being the <transport> element taking the place of the <transportReceiver> element. The default HTTP receiver configuration specified in the transports.xml file is given below.

Code Block

<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
      <parameter name="port">9763</parameter>
      <parameter name="maxHttpHeaderSize">8192</parameter>
      <parameter name="maxThreads">150</parameter>
      <parameter name="minSpareThreads">25</parameter>
      <parameter name="maxSpareThreads">75</parameter>
      <parameter name="enableLookups">false</parameter>
      <parameter name="disableUploadTimeout">false</parameter>
      <parameter name="clientAuth">false</parameter>
      <parameter name="maxKeepAliveRequests">100</parameter>
      <parameter name="acceptCount">100</parameter>
      <parameter name="compression">force</parameter>
      <parameter name="compressionMinSize">2048</parameter>
      <parameter name="noCompressionUserAgents">gozilla, traviata</parameter>
      <parameter name="compressableMimeType">
          text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg
      </parameter>
  </transport>

...

Service level transport configuration is performed by editing the service.xml file associated with each service. When dealing with Proxy Services (for example in WSO2 ESB) using the Carbon's proxyadmin component, service level transport parameters should be specified in the Proxy Service configuration by using the provided Proxy Service management tools in the Carbon management console. See more information about Proxy Services in Service Mediation.

Excerpt
hiddentrue

Instructions on how to configure and enable transports in WSO2 ESB.