[Xml-compile] xsi:type in WSDL

Mark Overmeer mark at overmeer.net
Wed Jun 9 09:15:45 GMT 2010


* Knut Arne Bjørndal (knut.arne.bjorndal at easyconnect.no) [100608 12:49]:
> my $call = $wsdl->compileClient('get',
> 	transport_hook => \&fake_server,
> 	xsi_type => {
> 		'{https://adwords.google.com/api/adwords/cm/v201003}ApiError' => [
> 		
> '{https://adwords.google.com/api/adwords/cm/v201003}OperationAccessDenied',
> 			'{https://adwords.google.com/api/adwords/cm/v201003}AuthenticationError',
> 			'{https://adwords.google.com/api/adwords/cm/v201003}AuthorizationError',
> 		],
> 	},
> );

Somewhere, the xsi_infomation is not passed to the reader component
in the call. That's a bug which I will fix.  The following is both
a good work-around as easier to maintain:

 my $adsns = 'https://adwords.google.com/api/adwords/cm/v201003';

 my @err_types = qw/ads:OperationAccessDenied ads:AuthenticationError
     ads:AuthorizationError/;

 my $wsdl  = XML::Compile::WSDL11->new('ads.wsdl'
   , prefixes => [ ads => $adsns ]
   , opts_rw  => [ xsi_type => { 'ads:ApiError' => \@err_types } ]
   );

 my $call = $wsdl->compileClient('get', transport_hook => \&fake_server);

-- 
               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