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

Matthew Horsfall (alh) wolfsage at gmail.com
Thu Sep 10 11:44:56 GMT 2015


On Wed, Sep 9, 2015 at 4:14 PM, Mark Overmeer <mark at overmeer.net> wrote:
> 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.

Ugh, wonderful.

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

So I've tried what I think you meant, and I'm getting another error
I'm not sure how to resolve:

  my $doc = XML::LibXML::Document->new('1.0', 'UTF-8');
  my @filters = $advertiser_wsdl->writer('tns:AdvertiserNameFilter')->(
    $doc, { AdvertiserName => 'what' }
  );

  error: cannot find element or attribute
`{http://api.eyeblaster.com/}AdvertiserNameFilter' at
tns:AdvertiserNameFilter

Also, is the error I was getting in my first email when using
->explain() a bug in XML::Compile or something wrong with the WSDL?

 (error: no prefix known for namespace
`http://api.eyeblaster.com/message', use addPrefixes())

Thanks!

-- Matthew Horsfall (alh)



More information about the Xml-compile mailing list