[Xml-compile] error: element `SLAObject' not processed at
{http://brixworks02.example.com:8080/API/SOAP/Utils/}getSLASResponse/sla_list
Mark Overmeer
mark at overmeer.net
Fri Jan 27 08:49:51 GMT 2012
* Joshua Keroes (joshua at keroes.com) [120127 06:08]:
> Thank you for the educated review - I'll pass your statements back
> to EXFO ASAP.
The quality of the interfaces is usually not of interest at management
levels. It's a pitty, because interface specs often survive many
generations of the application... Once written, they never change it.
I have a few bad experiences with that.
> I am, in fact, using XML::Compile - and it's working - but I'm doing
> horrible things to make that succeed. We had a lot of money on the line,
> dozens of eyeballs, and needed to make things work with three whole days.
> XML::Compile (and Dancer and Moose) made that possible. Today, I was able
> to get a fully functioning WSDL-REST middleware online.
Impressive.
> Working around the broken XML required pulling it from the
> XML::Compile::SOAP::Trace object (so glad that was made available), fixing
> it, manually handling the errors, then serializing it with
> Dancer::Plugin::REST, and sending it along.
On way would be to cleanly hook into the code. There are a few ways to
do it, for instance in LWP.
> As long as I've already bought my handbasket and punched my ticket, I'm
> wondering is there's a place to insert an XSLT in XML::Compile's processing
> chain? If I could get my hands on the XML response fresh from the SOAP
> server, correct it, then XML::Compile would be able to proceed correctly.
There is no clean hook (yet). I think the you could do the followin.
The real code is this:
package XML::Compile::SOAP;
sub _reader(@) { my $self = shift; $self->{schemas}->reader(@_) }
Add this to your own progam: (untested)
XML::Compile::SOAP::_reader(@)
{ my $process_clean_xml = $self->{schemas}->reader(@_); # code ref
sub { my $dirty_xml = shift; # isa XML::LibXML::Document
# Use XML::LibXML xslt processor to clean-up
# I have no experience with that.
my $valid_xml = XML::LibXSLT->???(...$dirty_xml...);
$process_valid_xml->($valid_xml); # returns Perl
};
}
> On the scale of evil, that seems more like level three of Hell than level
> seven.
It seems you thrive on evil.
> What do you think?
well done.
--
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