You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Srinath Perera (JIRA)" <ji...@apache.org> on 2007/06/13 19:24:26 UTC
[jira] Resolved: (AXIS2-2339) InOnly Receivers: wrong HTTP status
with SOAP Fault
[ https://issues.apache.org/jira/browse/AXIS2-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Srinath Perera resolved AXIS2-2339.
-----------------------------------
Resolution: Fixed
This is fixed on current code base, if you continue to see this problem please let us know
> InOnly Receivers: wrong HTTP status with SOAP Fault
> ---------------------------------------------------
>
> Key: AXIS2-2339
> URL: https://issues.apache.org/jira/browse/AXIS2-2339
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.1
> Environment: Windows XP, Java 1.5.0_11, Tomcat 5.0.28
> Reporter: Colin Markwell
> Assignee: Deepal Jayasinghe
> Priority: Blocker
>
> When an AxisFault is thrown from methods that use the InOnly receiver (i.e. ones that don't return any data), a "HTTP/1.1 202 Accepted" response is returned instead of "HTTP/1.1 500 Internal Server Error".
> I believe that a 500 response is correct, according to:
> http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383529
> To demonstrate I've created some WSDL that has two methods - one that doesn't return any data ("in"), and one that does ("inout"):
> --- Begin test.wsdl -----------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.example.org/test/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="test"
> targetNamespace="http://www.example.org/test/">
> <wsdl:types>
> <xsd:schema targetNamespace="http://www.example.org/test/">
> <xsd:element name="in" type="xsd:string" />
> <xsd:element name="inout" type="xsd:string" />
> <xsd:element name="inoutResponse" type="xsd:string" />
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="inRequest">
> <wsdl:part name="parameters" element="tns:in" />
> </wsdl:message>
> <wsdl:message name="inoutRequest">
> <wsdl:part name="inoutRequest" element="tns:inout" />
> </wsdl:message>
> <wsdl:message name="inoutResponse">
> <wsdl:part name="parameters" element="tns:inoutResponse" />
> </wsdl:message>
> <wsdl:portType name="test">
> <wsdl:operation name="in">
> <wsdl:input message="tns:inRequest"></wsdl:input>
> </wsdl:operation>
> <wsdl:operation name="inout">
> <wsdl:input message="tns:inoutRequest"></wsdl:input>
> <wsdl:output message="tns:inoutResponse"></wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="testSOAP" type="tns:test">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="in">
> <soap:operation soapAction="http://www.example.org/test/in" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> </wsdl:operation>
> <wsdl:operation name="inout">
> <soap:operation soapAction="http://www.example.org/test/inout" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="test">
> <wsdl:port binding="tns:testSOAP" name="testSOAP">
> <soap:address location="http://www.example.org/" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> --- End test.wsdl -------------------------------------------------------
> I then create the Java classes from the WSDL:
> wsdl2java -uri test.wsdl -ss -sd
> I then populate the skeleton class with code that throws AxisFaults:
> --- Begin src/org/example/www/test/TestSkeleton.java --------------------
> package org.example.www.test;
> import org.apache.axis2.AxisFault;
> public class TestSkeleton{
> public InoutResponse inout(Inout param0) throws AxisFault {
> throw new AxisFault("Inout AxisFault");
> }
> public void in(In param2) throws AxisFault {
> throw new AxisFault("In AxisFault");
> }
> }
> --- End src/org/example/www/test/TestSkeleton.java ----------------------
> I then build the aar file using ant and the wsdl2java-created build.xml and deploy it to my application server.
> I then use Eclipse's Web Services Explorer to invoke the web service, proxying the requests through Apache TCPMon so that I can view the headers.
> These are the responses I see (xml-reformatted by TCPMon):
> --- Begin response to "inout" SOAP message ------------------------------
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/xml;charset=utf-8
> Date: Fri, 09 Mar 2007 14:23:47 GMT
> Server: Apache-Coyote/1.1
> Connection: close
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Client</faultcode>
> <faultstring>Inout AxisFault</faultstring>
> <detail />
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> --- End response to "inout" SOAP message --------------------------------
> --- Begin response to "in" SOAP message ---------------------------------
> HTTP/1.1 202 Accepted
> Content-Type: text/xml;charset=utf-8
> Date: Fri, 09 Mar 2007 14:20:11 GMT
> Server: Apache-Coyote/1.1
> Connection: close
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Client</faultcode>
> <faultstring>In AxisFault</faultstring>
> <detail />
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> --- End response to "in" SOAP message -----------------------------------
--
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