6146Re: [soaplite] XML Document to SOM object trouble
- May 1, 2008On Thu, 1 May 2008, killgore9999 wrote:
> Hello, I was wondering if anyone might be able to offer some insight[trimmed]
> on my problem.
> I am writing tests for a perl script which relies on SOAP to send and
> receive data from a server. In an effort to simplify the tests and
> isolate the server from consideration, I am trying to simulate the
> server's xml responses using locally stored xml files rather than
> actually calling the server's methods. In effect, this will allow me
> to feed custom server messages into the script so that I can more
> easily control and analyze the output.
> My case seems to clearly be one of these rare needs. I have triedI'd inspect what's actually being sent over the wire -- I'm guessing that
> passing just about everything I can think of into this method through
> the $message_as_xml parameter, but I am constantly getting error
> messages such as "Not an ARRAY reference at
> /opt/perl5.6.1/lib/site_perl/5.6.1/SOAP/Lite.pm line 385" and "Can't
> use string ("<?xml version='1.0' encoding='ut") as an ARRAY ref while
> "strict refs" in use at
> /opt/perl5.6.1/lib/site_perl/5.6.1/SOAP/Lite.pm line 385".
you have an XML declaration inside the SOAP body (ie, your solution
resulted in the message having an extra SOAP header applied to it)
In your case, if you're sending exact messages -- I'd probably skip
SOAP::Lite entirely for the testing, and just use a plain old CGI script
and return the test responses.
- << Previous post in topic Next post in topic >>