[Xml-compile] Any reason not to do this?

Kit Peters Kit.Peters at broadbean.com
Wed Sep 16 16:49:22 GMT 2015


I'm developing a SOAP client Moose Role for my job that uses XML::Compile::WSDL11 under the hood.  If I use multiple WSDL's, which will happen in at least one module consuming this Role, I get the error "explicit selection required".  At first, I was going to require the consuming class to specify the SOAP method -> service map, but I discovered that $wsdl->operations already knows what service goes to what method.  Is there any reason, save two services with the same method name, not to do the following?

  my %method_services = map { $_->name => $_->serviceName } $wsdl->operations

  sub call {
      my ($self, $method, %options) = @_;
      $options{'service'} = $method_services{$method};
      $self->wsdl->compileCall($method, %options);
  }

KP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20150916/46f20b19/attachment.htm>


More information about the Xml-compile mailing list