How to work around SOAP request protocol error with VMware-vSphere-Perl-SDK-5.5.0

During a move from vSphere 5.0 to 5.5 I ran into errors using the Perl scripts provided with the VMware vSphere Perl SDK for 5.5 on Fedora 20. The symptom was the following response to calling vminfo.pl:

SOAP request error - possibly a protocol issue: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>

I found the solution on the VMware communities at SOAP error with VMware-vSphere-Perl-SDK-5.5.0, but thought I would provide the additional steps I took in the hope it will help someone else.

The recommended solution was to use an older version of libwww-perl, in particular 5.837. But many of the packages on my system depend on libwww-perl and I didn’t want to mess with such a critical piece of my environment. The solution was to download the older version of libwww-perl, install it into a non-system location and to set the environment variable PERL5LIB to point to the new location before calling the vSphere Perl SDK scripts.

$ cd ~/Downloads/
$ mkdir libwww-perl
$ cd libwww-perl
# Download libwww-perl-libwww-perl-5.837.tar.gz from https://github.com/libwww-perl/libwww-perl/releases and save to ~/Downloads/libwww-perl
$ tar zxvf libwww-perl-libwww-perl-5.837.tar.gz
$ cd libwww-perl-libwww-perl-5.837
# Pick an installation location for libwww-perl which does not interfere with your system.
perl Makefile.PL INSTALL_BASE=install_location
make
make test
make install

Since I wrap calls to the VMware Perl SDK in bash scripts, all I needed to do to use libwww-perl 5.837 was to add the following at the beginning of the scripts:

export PERL5LIB=install_location/lib/perl5

Remember to change install_location to match your environment.

Hope that helps and thanks to the VMware community for the work around.