[Xml-compile] XML::Compile::WSDL1, timeout and userAgent options

Bernd Web bernd.web at gmail.com
Tue Oct 26 16:12:26 GMT 2010


Hi

I am using XML::Compile::WSDL11 version 2.17.
The client is working, but I'd like to change the default timeout of
180 seconds in the client.
I noticed http://lists.scsys.co.uk/pipermail/xml-compile/2010-February/000335.html
partly about this

Is there a direct way to do this? With the standard client there is no
 XML::Compile::Transport::SOAPHTTP object created (in the client) to
change the options.
I managed to do the following, which is working, but how to just set
the timeout (and other userAgent options) in e.g. compileClient?
I had to hardcode the soap address. However, this addres is passed to
init() in XML::Compile::Transport::SOAPHTTP, but is there a direct way
to get it? Like $soapSrv->{address} ?


use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;

my $soapSrv = XML::Compile::WSDL11->new($wsdlXml);

foreach my $soapOp ($soapSrv->operations)  {
        $soapOps{ $soapOp->name } = $soapSrv->compileClient($soapOp->name,
                        transport => $trans
             );
 }

The transport was changed:
my $trans = XML::Compile::Transport::SOAPHTTP->new(
	timeout => 500,
	address => 'http://soap_server_address'	
);

Is there either a nice way to get this address from the XML::Compile
interfaces and / or another way to set timeouts (and possibly other
userAgent options).


Regards,
Bernd



More information about the Xml-compile mailing list