The Axis framework compliments lots of lacking functionalities in the current SOAP adapter of SAP PI. The added value of the axis frameworks is mostly in features relating to the manipulation of the soap header. Unfortunately, the axis framework formats the response messages of the webservice by default. It pretty prints them by adding white spaces and return characters.
Switching off the default pretty print functionality and consequently improving your performance and the size of the response message; will be the focus of this blog.
I will demonstrate the need to switch off the default pretty print functionality using an example.
Consider the following 2 response messages returned by your webservice :
Case 1: Pretty printed/formatted response
The response message has white spaces and return characters to make it more readable.
Size: 1,41 KB
Case 2: Unformatted response
The all response is in one long line; without white spaces and return characters
Size: 1,06 KB
As you can see from the 2 examples above; it most case it is preferable to return responses looking like case 2. In the above example, there is a gain of roughly 25 %.The obvious advantage of case 2 is the fact that the response message is smaller in size and therefore can travel faster through the network while returning web service response to the service consumer. As a result, your service performance will increase and your consumer does not have to wait too long.
- You need to be using the Axis framework on your sender soap communication channel
In order to remove the formatting; please as follow:
- Go to the sender communication channel of your interface on the Module tab.
- Add the module processing Sequence and Module Configuration entries as depicted by the picture below. See 1 and 2.
The trick lies in the entry with parameter name “Key.01” with value “Set disablePrettyXML” .
From my specific test case, I have noticed a big improvement in the response size and response time. This performance gain increase the bigger your response files gets.
For further references, please check the FAQ note 1039369