axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3887) The servlet transport does not set the HTTP response code to 500 when a SOAP fault is returned (unless an exception was thrown)
Date Thu, 03 Jul 2008 08:52:44 GMT
The servlet transport does not set the HTTP response code to 500 when a SOAP fault is returned
(unless an exception was thrown)
-------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-3887
                 URL: https://issues.apache.org/jira/browse/AXIS2-3887
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.4
            Reporter: Asankha C. Perera
            Assignee: Asankha C. Perera


Steps:
Edit axis2-1.4/samples/userguide/src/userguide/example1/MyService.java and make it look like
shown below:

package userguide.example1;
import org.apache.axiom.om.OMElement;

import org.apache.axis2.AxisFault;


import javax.xml.stream.XMLStreamException;




public class MyService {

    public OMElement echo(OMElement element) throws XMLStreamException {
        return org.apache.axiom.om.OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope().getBody().getFirstElement();

    }



    public void ping(OMElement element) throws XMLStreamException {

        //Do some processing

    }

    public void pingF(OMElement element) throws AxisFault{

        throw new AxisFault("Fault being thrown");

    }

}

Invoking the echo service now returns:
HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Thu, 03 Jul 2008 08:42:40 GMT



fd

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
         <soapenv:Fault>
            <faultcode></faultcode>
            <faultstring></faultstring>
            <detail />
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>
0




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message