[Xml-compile] element `{foo}bar' not processed
Mark Overmeer
mark at overmeer.net
Wed Sep 2 17:31:21 GMT 2009
* Stig Brautaset (stig at brautaset.org) [090902 16:53]:
> I keep on getting this error:
>
> error: element `{http://foo}industries' not processed at {http://bar}
> getBasketResponse/return/component
>
> my $wsdl = XML::Compile::WSDL11->new( 'my.wsdl' );
> my $get = $wsdl->compileClient( 'getBasket', qw/ port myport
> sloppy_floats 1 /);
> $get->({ basketIndex => 1 });
[ You do no need the {} here: my $answer = $get->(basketIndex => 1);
> trying all day to simply ignore the 'industries' element, with hooks or
> whatnot, but I haven't been able to do so.
> I'd really love it if anybody could let me know if it is possible.
With hooks you can skip parsing nodes based on a type. Should work
something like this:
my $wsdl = XML::Compile::WSDL11->new('my.wsdl'
, prefixes => [ tns => .... ] );
$wsdl->addHook(type => "tns:CXIndustry", replace => 'SKIP');
my $get = $wsdl->compileClient('getBasket');
> I wonder if it could be because xsi:type is used to specify whether it
> is CXComponent or Component, and the industries element just happens to
> be encountered first?
xsi:type is not (yet) supported: has too many performance consequences.
It's an old-fashioned construction: you should use substitutionGroups.
But with a replace hook, you could make it to work.
--
Regards,
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