Slow performance using Axis 1 with VIP Authentication Services v6.1

book

Article ID: 177625

calendar_today

Updated On:

Products

Symantec Products

Issue/Introduction

Performance is slow when using Axis 1 with the VIP Authentication Services v6.1 client.

Cause

This issue occurs due to Axis 1 creates a new TCP connection for every request it sends.

Resolution

To resolve this issue, Axis 1 must maintain a persistent TCP connection across multiple requests.  This can be complete by replacing the default HTTPSender transport class used by Axis 1 with the CommonsHTTPSender class:

1.  Go to http://hc.apache.org/downloads.cgi
2.  Download Commons HttpClient 3.1

3. 
Extract the zip file and add commons-httpclient-3.1.jar from the extracted folder to your classpath.
4.  Go to
http://commons.apache.org/downloads/download_codec.cgi
5.  Download 1.3.zip
6. 
Extract the zip file and add commons-codec-1.3.jar from the extracted folder to your classpath.
Note:  {SYMC.EN_US} has tested with the download versions listed above, newer versions should also work.
7
.  Create a new configuration file and name it client-config.wsdd.
8. 
Enter the following content to this file:

    <?xml version="1.0" encoding="UTF-8"?>
    <deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <transport name="http"
    pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
    </deployment>

9. 
Include client-config.wsdd in the java class path. This resolution requires client-config.wsdd in the java classpath so the Java Virtual Machine (JVM) can locate it.10
10. 
Since VIP Authentication Services does not support chunked encoding you need to disable the request sent with chunked encoding to prevent VIP Authentication Service response errors. Do this by adding the following lines of code for every port instance.
11. 
Get the port instance from the service object that the client uses to send requests:
(existing code)

    port = service.getvipServiceAPI(new java.net.URL(url)

 
12. 
Set the chunked encoding property to false in every port instance:

    // (To go with your imports)
    import org.apache.axis.client.Stub;
    import org.apache.axis.transport.http.HTTPConstants;
    . . . .

    // Add the following lines of code to insert a property to
    // the port instance via the header hashtable
    Hashtable headers = new Hashtable();
    headers.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED, "false");
    ((Stub)port)._setProperty(HTTPConstants.REQUEST_HEADERS, headers);