#!/usr/bin/perl use strict; use warnings; use XML::Compile::WSDL11; use XML::Compile::SOAP11; use XML::Compile::Transport::SOAPHTTP; use XML::Compile::Schema; use Log::Report mode => 'DEBUG'; use Data::Dumper; # # Tested with XML::Compile 1.16, XML::Compile::SOAP 2.16, XML::Compile::Cache 0.96, Log::Report 0.28 # my $server = 'uc:pw@nnm_server'; my $subscribewsdl = "subscribe.wsdl"; my $notify_ns = 'http://notification.sdk.nms.ov.hp.com/nms-sdk-notify/'; my %xsi_type = ( 'f:filter' => [ 'f:condition', 'f:constraint', 'f:expression' ] ); my $subscribeAPI = XML::Compile::WSDL11->new( $subscribewsdl, prefixes => [f => $notify_ns], opts_rw => {xsi_type => \%xsi_type} ); # patch below suggested by Mark Overmeer $subscribeAPI->importDefinitions(<<_PATCH); _PATCH print "IMPORTED PATCH\n"; $subscribeAPI->importDefinitions('ws_eventing.wsdl'); print "IMPORTED : ws_eventing.wsdl\n"; $subscribeAPI->importDefinitions('ws-eventing.xsd'); print "IMPORTED : ws-eventing.xsd\n"; $subscribeAPI->importDefinitions('ws-addr.xsd'); print "IMPORTED : ws-addr.xsd\n"; my $receive_incidents = $subscribeAPI->compileClient( operation=>'IncidentNotification', server=>$server ); print "CompileClient succeeded\n"; my ($info, $trace) = $receive_incidents->();