2.15 Axis Properties

When the JSM Manager starts the name value entries in the system/AxisDefault.properties file are read and added to the org.apache.axis.AxisProperties class using the static method setProperty.

The following is an example AxisDefault.properties file.

#!<studio-project id="20000000-000000" name="lansa">


# Axis default properties





# axis.http.client.maximum.total.connections

# axis.http.client.maximum.connections.per.host

# axis.http.client.connection.pool.timeout

# axis.http.client.connection.default.so.timeout

# axis.http.client.connection.default.connection.timeout

# axis.socketFactory

# axis.socketSecureFactory

# axis.ServerFactory

# http.proxyHost

# http.proxyPort

# http.proxyUser

# http.proxyPassword

# http.nonProxyHosts

# https.proxyHost

# https.proxyPort

# https.proxyUser

# https.proxyPassword

# https.nonProxyHosts




Axis Global Configuration

Axis Reference Guide

Axis Client and Server Configuration

By default, Axis uses the 'org/apache/axis/client/client-config.wsdd' and 'org/apache/axis/server/server-config.wsdd' files from the jsmaxis.jar file for client and server configuration.

The AxisDefault.properties entries axis.ClientConfigFile and axis.ServerConfigFile direct Axis to use different configuration files.




Axis Client Configuration

<?xml version="1.0" encoding="utf-8"?>


<deployment name="defaultClientConfiguration" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">



  <parameter name="disablePrettyXML" value="true"/>

  <parameter name="addressing.sendReplyTo" value="true"/>

  <parameter name="enableNamespacePrefixOptimization" value="false"/>



<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>




Axis Server Configuration

<?xml version="1.0" encoding="utf-8"?>


<deployment name="defaultServerConfiguration" xmlns="http://xml.apache.org/axis/wsdd/">



  <parameter name="sendMultiRefs" value="false"/>

  <parameter name="dotNetSoapEncFix" value="true"/>

  <parameter name="disablePrettyXML" value="true"/>

  <parameter name="enableNamespacePrefixOptimization" value="false"/>





Turning off MultiRef encoding in SOAP server responses

The axis server configuration can disable sending multiRefs in RPC/encoded responses by using the global sendMulitRefs parameter.

<parameter name="sendMultiRefs" value="false"/>


Using Commons HTTP client with Axis

By default Apache Axis 1.4 uses 'org.apache.axis.transport.http.HTTPSender' for http sending.

It is possible to change this to use 'org.apache.commons.httpclient'.

Change the transport pivot attribute in the configuration to point to the CommonsHTTPSender class.

<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>


You also need to add the common.codec.1.3.jar and common-httpclient-3.0-rc4.jar to the jar directory.






Problems with using Commons HTTP client with JSMDirect server

By default, commons http client uses HTTP protocol 1.1 and by default it uses chunked transfer encoding.

When a HTTP client program sends Transfer-Encoding chunked, it cannot send Content-Length.

JSMDirect is expecting Content-Length, so it can read STDIN to send to the JSM.

So the JSM SOAP server service receives no SOAP message content.

The SOAP Agent Wizard can force the http client program to use the HTTP 1.0 protocol by including the following code into the generated service code.

stub._setProperty ( org.apache.axis.MessageContext.HTTP_TRANSPORT_VERSION ,

                    org.apache.axis.transport.http.HTTPConstants.HEADER_PROTOCOL_V10 ) ;


Including SOAP headers in SOAP request

It is possible to include a SOAP header in the SOAP request by including code in the generated SOAP agent service code. When the SOAP Agent Wizard generates the service code the contents of file AGENT_INCLUDE.TXT are included into the generated code.

It is also possible to add a SOAP header to a message by using a message handler. Refer to 2.17 SOAP Agent Message Handler.


    Add SOAP header


org.apache.axis.message.SOAPHeaderElement elementHead = new org.apache.axis.message.SOAPHeaderElement ( "namespace", "AuthHeader" ) ;


javax.xml.soap.SOAPElement elementUserToken = elementHead.addChildElement ( "UserToken" ) ;


javax.xml.soap.SOAPElement elementUserName = elementUserToken.addChildElement ( "UserName" ) ;

elementUserName.addTextNode ( "username" ) ;


javax.xml.soap.SOAPElement elementPassword = elementUserToken.addChildElement ( "Password" ) ;

elementPassword.addTextNode ( "password" ) ;


stub.setHeader ( elementHead ) ;