Software AG Infrasructure 10.7 | Working with Web Services | Configuring Web Services Stack | Configuring the Web Services Stack Runtime | Configuring the axis2.xml File
 
Configuring the axis2.xml File
Web Services Stack uses the parameters listed below in the axis2.xml file. The default values for the parameters are set on the server side of the Axis2 configuration. If you want to change the default value for a parameter, add the parameter to the axis2.xml file and provide the new value.
Important:
The axis2.xml file contains important information such as the user name and password to use to log in to the Web Services Stack administration console. Change the default credentials to protect access to the axis2.xml file.
The following table shows the parameters that Web Services Stack uses in the axis2.xml file.
Parameter
Description
include WrappedTypes Declaration
Whether to include message-wrapper elements in the WSDL XSD schema. Axis2 processes an RPC-style WSDL definition and automatically creates a wrapper element and type definition for each message. Axis2 then processes internally any request or response as if it is in a document style with an element declaration for each message. Valid values are:
*false - Axis2 creates a copy of the WSDL definition when processing the message types and modifies the copy instead of the original WSDL document.
*true (default) - Axis2 creates the web service instance and automatically adds the auto-generated types to the XSD of the original WSDL definition.
enableWSDL Validation
Whether to validate WSDL documents against external resources. Valid values are false (default) and true.
enableSoap Validation
Whether to validate SOAP messages. Valid values are:
*false (default) - when Axis2 client side and server side exchange SOAP messages, the messages are not automatically validated if they comply with the SOAP specification.
*true - the SOAP validation can be enabled both on the server side and on the client side. On the server side you can enable the SOAP validation at these levels:
*Globally - set the parameter in the axis2.xml file.
*For a specific service group - set the parameter inside a ServiceGroup tag in the services.xml file.
*For a specific service - set the parameter inside a Service tag in the services.xml file.
*For a specific operation - set the parameter inside an Operation tag in the services.xml file.
*For a specific request - set the parameter programatically to MessageContext.
*On the client side you can enable SOAP validation at these levels:
*Globally - set the parameter in the axis2.xml file.
*For operations that expect large SOAP messages - call programmatically using Options.setProperty("disableSoapValidation",Boolean.TRUE).
wsdl4jRegister Default Extension AttributeTypes
Whether to register default extension attribute types in the WSDL4J extension registry. Configuration is done on Input, Output and Fault WSDL elements using String type. Valid values are false (default) and true.
filterLogin Credentials
Whether to turn on login credentials filtering based on the applied security policy. Valid values are:
false (default) - all credentials that are extracted by the WSS4J Security Engine are used for JAAS login.
true - Web Services Stack filters all credentials that are extracted by the WSS4J Security Engine, so that only credentials required by the applied security policy are used for JAAS login.
restDispatchers
A wrapper tag for pluggable REST dispatchers. You can specify a custom dispatcher class for REST requests by using a dispatcher tag. For example:
<parameter name="restDispatchers">
<dispatcher class="org.apache.axis2.rest.FirstDispatcher"/>
<dispatcher class="org.apache.axis2.rest.SecondDispatcher"/>
<dispatcher class="org.apache.axis2.rest.ThirdDispatcher"/>
</parameter>
enableRaw XmlLogging
Whether to enable the writing of incoming web service requests to a file. The wss-raw-msg-*.xml.bin files are saved in the Software AG_directory \profiles\CTP\workspace\temp directory. Valid values are false (default) and true.
enforceSha2 Signatures
Whether to enforce the Rampart policy to use the SHA-2 algorithm for signing. Valid values are false (default) and true.
Note:
If you set the enableRawXmlLogging parameter in the axis2.xml file to true, SOAP requests and responses that might contain personal data are preserved in the Software AG_directory \profiles\profile_name\workspace\temp directory. By default, Web Services Stack does not use the enableRawXmlLogging parameter.
Because messages that Web Services Stack processes are not always in SOAP format, the message builders and message formatters provided by Axis2 are extended to ensure all messages are correctly converted. Below is Web Services Stack-specific information about the proprietary message builders and message formatters available in the axis2.xml configuration file.
The Web Services Stack axis2.xml file contains defined proprietary message builders for the text/xml, application/xml, and application/soap+xml content types to extend the default functionality provided by Axis2. The definitions are as follows:
<messageBuilders>
<messageBuilder contentType="text/xml"
class="com.softwareag.builders.RawXMLMessageBuilder" />
<messageBuilder contentType="application/soap+xml"
class="com.softwareag.builders.RawXMLMessageBuilder" / >
<messageBuilder contentType="application/xml "
class="com.softwareag.builders.RawXMLMessageBuilder" / >
<messageBuilder contentType="application/x-www-form-urlencoded "
class="org.apache.axis2.builder.XFormURLEncodedBuilder" / >
<messageBuilder contentType="multipart/form-data "
class="org.apache.axis2.builder.MultipartFormDataBuilder" / >
</messageBuilders>
The Web Services Stack axis2.xml file has defined proprietary message formatters for the text/xml, application/xml, and application/soap+xml content types to extend the default functionality provided by Axis2. The definitions are as follows:
<messageFormatters>
<messageFormatter contentType="text/xml"
class="com.softwareag.formatters.RawXMLFormatter" />
<messageFormatter contentType="application/xml"
class="com.softwareag.formatters.RawXMLApplicationXMLFormatter" />
<messageFormatter contentType="application/soap+xml"
class="com.softwareag.formatters.RawXMLFormatter" />
<messageFormatter contentType="application/x-www-form-urlencoded"
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter" />
<messageFormatter contentType="multipart/form-data"
class="org.apache.axis2.transport.http.MultipartFormDataFormatter" />
</messageFormatters>