No "reponse status line" with SOAPLite when XML::Xerces parse xml data which throw exceptions
Hong Yan <[email protected]>
| Newsgroups | gmane.comp.windows.devel.soap.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am using Apache, mod_perl, SOAPLite base server solution, and have the
following difficuties now:
First, I am using XML::Xerces to validate the XML document, the code looks
like the following:
sub Validate {
my $oParser = new XML::Xerces::DOMParser ();
my $ERROR_HANDLER = XML::Xerces::PerlErrorHandler->new();
$oParser->setErrorHandler($ERROR_HANDLER);
eval{
$oParser->parse ( XML::Xerces::MemBufInputSource->new
( $sXML));
};
if ($@){
if (ref $@) {
....
}
}
Then my Init() subroutine need to call the Validate method
sub Init
{
Validate (..);
....;
}
The problem is that the Xerces call throw an error exception and eval()
call catches it, then the lines after the Validate in Init() method never
get executed.
The following is the Soap call trace:
debug: POST http://66.100.107.34:11111/SOAP
Accept: text/xml
Accept: multipart/*
Content-Length: 746
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:/Hydra/VoIP/User#Init"
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC
="http://schemas.xmlsoap.org/soap/encoding/" xmlns:namesp3
="http://namespaces.soaplite.com/perl" SOAP-ENV:encodingStyle
="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV
="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi
="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp2:Init
xmlns:namesp2="urn:/Hydra/VoIP/User"><Hydra__VoIP__User xsi:type
="namesp3:Hydra__VoIP__User"><_ERR xsi:null="1"/><_Name xsi:type
="xsd:int">3333</_Name><_Password xsi:type="xsd:string">toshiba</_Password>
<_IpAddr xsi:type
="xsd:string">localhost</_IpAddr></Hydra__VoIP__User></namesp2:Init></SOAP-ENV:Body></SOAP-ENV:Envelope>
debug: 500 (Internal Server Error) EOF instead of reponse status line
Client-Date: Wed, 21 Aug 2002 20:46:22 GMT
-----------------------------------------------------
How could I make Soap not responding with this 500 error?
Thanks
You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.