<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I&#8217;m developing a SOAP client Moose Role for my job that uses XML::Compile::WSDL11 under the hood. &nbsp;If I use multiple WSDL&#8217;s, which will happen in at least one module consuming this Role, I get the error &#8220;explicit selection required&#8221;. &nbsp;At first, I was going
 to require the consuming class to specify the SOAP method -&gt; service map, but I discovered that $wsdl-&gt;operations already knows what service goes to what method. &nbsp;Is there any reason, save two services with the same method name, not to do the following?</div>
<div><br>
</div>
<div>&nbsp; my %method_services = map { $_-&gt;name =&gt; $_-&gt;serviceName } $wsdl-&gt;operations</div>
<div>&nbsp;&nbsp;</div>
<div>&nbsp; sub call {&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; my ($self, $method, %options) = @_;</div>
<div>&nbsp; &nbsp; &nbsp; $options{&#8216;service&#8217;} = $method_services{$method};</div>
<div>&nbsp; &nbsp; &nbsp; $self-&gt;wsdl-&gt;compileCall($method, %options);</div>
<div>&nbsp; }</div>
<div><br>
</div>
<div>KP</div>
</body>
</html>