[Xml-compile] XML::Compile::WSDL11 troubles with MediaMind API

Mark Overmeer mark at overmeer.net
Wed Sep 9 20:14:19 GMT 2015


* Matthew Horsfall (alh) (wolfsage at gmail.com) [150909 16:39]:
> However, there's on piece of the API that I'm not able to get to work
> and I can't figure out why. (I apologize for the long email...)
> 
> In the Advertisers service
> (https://platform.mediamind.com/Eyeblaster.MediaMind.API/AdvertiserService.svc?wsdl),
> there is a GetAdvertisers call
> (http://platform.mediamind.com/Eyeblaster.MediaMind.API.Doc/Default.aspx?page=Operation.aspx%3Fv%3D1%26OperationID%3D-1964927588).
> 
> This call takes an AdvertisersFilter argument which is an array of
> AdvertiserServiceFilter. AdvertiserServiceFilter can be made up of a
> bunch of different derived types - AdvertiserHasConversionsFilter,
> AdvertiserIDFilter, AdvertiserNameFilter, etc...

When I look at the WSDL, they forgot an important relation:
   <xsd:element name="AdvertiserIDFilter" type="tns:AdvertiserIDFilter"
 +    substitutionGroup="tns:AdvertiserServiceFilter"
   />

If they had used that, as they intended to when I see the detail of the
rest of the spec, then your life would be very easy.  However, according
to the current wsdl you can only use AdvertiserServerFilter elements at
that spot...  not what you wish for.

Well, for the solutions for the writing case:
  1) patch the WSDL, adding substitutionGroup's
  2) process the filter structures beforehand

>       AdvertiserServiceFilter => [{},], },

  my @filters;
  push @filters, $wsdl->writer('tns:SomeFilter')->($doc, $filterdata);
    ... { AdvertiserServiceFilter => \@filters },
-- 
success,
               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