[Xml-compile] XML::Compile::WSDL1, timeout and userAgent options
Mark Overmeer
mark at overmeer.net
Tue Oct 26 18:35:19 GMT 2010
* Bernd Web (bernd.web at gmail.com) [101026 18:12]:
> 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
I was under the impression that things had changed a little, since
then. Can't you simply pass the 'timeout' parameter to compileClient
on the moment?
> 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'
> );
The basic problem is that we have to combine various independent
packages which need to be configured. I could have forced everyone
to always instantiate the transporter, but that looks like work.
The default usually works ok.
It is a little simpler when you use XML::Compile::Cache features
on which ::WSDL11 is based.
my $trans = XML::Compile::Transport::SOAPHTTP->new(
timeout => 500,
address => 'http://soap_server_address'
);
my $soapSrv = XML::Compile::WSDL11->new($wsdlXml,
opts_rw => [transport => $trans]
);
my $call = $soapSrv->compileClient(...)
When I see your code, I think the module needs to cache the calls
for you, just like reader() and writer() do... Should I name it call()?
> 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).
The problem is that there are too many options to expand it to every
corner of the library. Let's pick sane defaults to DWIM a little,
but not try to avoid all pain in all situations.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list