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

Bernd Web bernd.web at gmail.com
Thu Oct 28 11:39:33 GMT 2010


Hi Mark,

Thanks for your reply.
Supplying the timeout option in compileClient does not work, but with
using $trans now and with the address taken from endPoint it is
working fine(below).

> 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(...)

Thanks for this alternative. For the endpoint, I now use
	address => $soapSrv->operation('myMethod')->endPoints
in $trans.

Supplying the timeout option in compileClient does not work, but with
$trans now as above and with the address taken from endPoint this is
working fine.

> 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()?
Not sure about this. I think it's fine and it works fine too.
After compileClient I just supply the input parameters to the
compiledClient stored in the hash.

> --
> Regards,
>               MarkOv



More information about the Xml-compile mailing list