axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa_abeysin...@yahoo.com>
Subject Re: Problem with SOAP Fault Hadling
Date Thu, 01 Jul 2004 07:26:50 GMT
I had a look at the problem; Looks as if the problem is on  getElementAsString method.

When you try to get faultcode, faultstring, faultactor, faultdetail in the generated Stub,
if (XSD_STRING == getXSDType(m_pNode)) [in SoapDeSerializer::getElementAsString]
condition fails and null values are returned

This is because falut details does not contain XSD_STRING type.

I think there has to be a seperate method to handle faults. You cannot reuse the
getElementAsString method for parsing SOAP faults.

Thanks,
Samisa...


> From: Samisa Abeysinghe <samisa_abeysinghe@yahoo.com>
> To: Apache AXIS C Developers List <axis-c-dev@ws.apache.org>
> Subject: Problem with SOAP Fault Hadling
> Date: 30 Jun 2004 20:06:28 -0700
> 
> Hi Damitha,
>     I have a problem with SOAP fault.
> 
>     When my client receives the fault, it segfaults.
>     I am working on Linux with Xerces parser.
> 
>     Here is the SOAP response that I get:
> HTTP/1.1 500 Internal Server Error
> 
> Content-Type: text/xml;charset=utf-8
> 
> Transfer-Encoding: chunked
> 
> Date: Thu, 01 Jul 2004 02:47:42 GMT
> 
> Server: Apache-Coyote/1.1
> 
> Connection: close
> 
> 
> 
> 263
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <soapenv:Fault>
>    <faultcode>soapenv:Server.userException</faultcode>
>    <faultstring>org.xml.sax.SAXParseException: The value of the attribute
> &quot;prefix=&quot;xmlns&quot;,localpart=&quot;ns2&quot;,rawname=&quot;xmlns:ns2&quot;&quot;
is
> invalid. Prefixed namespace bindings may not be empty.</faultstring>
>    <detail/>
>   </soapenv:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> 0
> 
> 
> 
> 
> Here is the request that I sent:
> POST /axis/services/echo HTTP/1.1
> 
> Host: 127.0.0.1
> 
> Content-Type: text/xml; charset=UTF-8
> 
> SOAPAction: "base#echoString"
> 
> Accept-Language: " da, en-gb;q=0.8, en;q=0.7"
> 
> Accept-Language: "lang2"
> 
> Accept-Language: "lang3"
> 
> Content-Length: 742
> 
> 
> 
> <?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns2:TestHeader
> xmlns:ns2=""><Credentials><username>Test User</username><password>Test
> Password</password></Credentials></ns2:TestHeader><ns3:TestHeader2
> xmlns:ns3="http://ws.apache.org/axisCppTest/"><Credentials2><username>Test
> User</username><password>Test
>
Password</password></Credentials2></ns3:TestHeader2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoString
> xmlns:ns1="http://soapinterop.org/"><inputString xsi:type="xsd:string">hello
> world</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope>
> 
> Please note that I sent an invalid header to the server purposely to get a SOAP fault
for test
> purposes. 
> 
> Any help would be much appreciated.
> 
> Thanks,
> Samisa...
> 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
> 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Mime
View raw message