You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by santosh kumar <24...@gmail.com> on 2013/04/10 11:47:23 UTC

Need Assisatance : Http-500(Internal Server Error)

Hi,

I am facing an issue with Axis2 framework.
I am using Apache Tomcat version 7.0.25 on which i have deployed my web
service.
The issue faced is :

1. whenever my service throws any exception Axis throws the same exception
in XML format correctly  but in RAW data we see

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 10 Apr 2013 08:48:13 GMT
Connection: close

I want to know is it correct behaviour of Axis2 that in case of any
exception it should throw Error 500 (Internal Server Error).
Ideally it should throw Http code 200 along with the XML information
containing the exception raised by web service, because communication is
proper.

If its the correct behavior then do we have any option to change this
behavior of Axis 2.

Please suggest some valuable tips as i am stuck with it .

*With Regards*
*Santosh Kumar*

 <http://www.aricent.com/>
<http://www.aricent.com/>

Re: Need Assisatance : Http-500(Internal Server Error)

Posted by satyapriya sahoo <sa...@gmail.com>.
Please PUT a TCP Monitor in between your component and client, and see what
is going to client.


On Wed, Apr 10, 2013 at 3:17 PM, santosh kumar <24...@gmail.com>wrote:

> Hi,
>
> I am facing an issue with Axis2 framework.
> I am using Apache Tomcat version 7.0.25 on which i have deployed my web
> service.
> The issue faced is :
>
> 1. whenever my service throws any exception Axis throws the same exception
> in XML format correctly  but in RAW data we see
>
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Wed, 10 Apr 2013 08:48:13 GMT
> Connection: close
>
> I want to know is it correct behaviour of Axis2 that in case of any
> exception it should throw Error 500 (Internal Server Error).
> Ideally it should throw Http code 200 along with the XML information
> containing the exception raised by web service, because communication is
> proper.
>
> If its the correct behavior then do we have any option to change this
> behavior of Axis 2.
>
> Please suggest some valuable tips as i am stuck with it .
>
> *With Regards*
> *Santosh Kumar*
>
>  <http://www.aricent.com/>
> <http://www.aricent.com/>
>

RE: Need Assisatance : Http-500(Internal Server Error)

Posted by Martin Gainty <mg...@hotmail.com>.
if the exception is thrown in Axis the exception is 'wrapped' in AxisFault whose attributes are one-to-one mapping to SOAP attributes notably

Faultstring
Faultcode
actor
 
http://ws.apache.org/axis/java/apiDocs/org/apache/axis/AxisFault.html
http://www.w3schools.com/soap/soap_header.asp

An HTTP-500 is impossible to debug without stacktrace, logging statements, axis2.xml,web.xml, and source code for Service (aar)and Client

HTH
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

  




Date: Wed, 10 Apr 2013 15:17:23 +0530
Subject: Need Assisatance : Http-500(Internal Server Error)
From: 2408.santosh@gmail.com
To: java-user@axis.apache.org



Hi,


I am facing an issue with Axis2 framework.
I am using Apache Tomcat version 7.0.25 on which i have deployed my web service.
The issue faced is :


1. whenever my service throws any exception Axis throws the same exception in XML format correctly  but in RAW data we see 


HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 10 Apr 2013 08:48:13 GMT
Connection: close


I want to know is it correct behaviour of Axis2 that in case of any exception it should throw Error 500 (Internal Server Error).
Ideally it should throw Http code 200 along with the XML information containing the exception raised by web service, because communication is proper.


If its the correct behavior then do we have any option to change this behavior of Axis 2.


Please suggest some valuable tips as i am stuck with it .



With Regards
Santosh Kumar


 		 	   		  

Re: Need Assisatance : Http-500(Internal Server Error)

Posted by santosh kumar <24...@gmail.com>.
Thanks for replying guys.
I am not able to understand the situtaion like:

1. My web service is throwing an exception(user defined exception related
to my business logic:something not found etc) then in this case a soap
fault is getting generated with fault string as the exception string.
2.Is this the case of soap fault?
3.Do this soap fault resulting into http 500 Internal server error.
4.can you please let me know any authentic document where i can find that
soap fault gets created when web service throws customized exceptions.
5.How can i prove this to my management,they are not able to understand
this.They are saying that in case of exception also the http code should be
200 ,because this is the OK case for the application as application has
behaved properly and sent No data found exception.

Please anybody help me out in this.
Thanks.

*With Regards*
*Santosh Kumar*

 <http://www.aricent.com/>
<http://www.aricent.com/>


On Wed, Apr 10, 2013 at 4:04 PM, Andreas Veithen
<an...@gmail.com>wrote:

> That behavior is required by the SOAP specs [1]:
>
> "In case of a SOAP error while processing the request, the SOAP HTTP
> server MUST issue an HTTP 500 "Internal Server Error" response and
> include a SOAP message in the response containing a SOAP Fault element
> (see section 4.4) indicating the SOAP processing error."
>
> Andreas
>
> [1] http://www.w3.org/TR/2000/NOTE-SOAP-20000508
>
> On Wed, Apr 10, 2013 at 11:47 AM, santosh kumar <24...@gmail.com>
> wrote:
> > Hi,
> >
> > I am facing an issue with Axis2 framework.
> > I am using Apache Tomcat version 7.0.25 on which i have deployed my web
> > service.
> > The issue faced is :
> >
> > 1. whenever my service throws any exception Axis throws the same
> exception
> > in XML format correctly  but in RAW data we see
> >
> > HTTP/1.1 500 Internal Server Error
> > Server: Apache-Coyote/1.1
> > Content-Type: text/xml;charset=UTF-8
> > Transfer-Encoding: chunked
> > Date: Wed, 10 Apr 2013 08:48:13 GMT
> > Connection: close
> >
> > I want to know is it correct behaviour of Axis2 that in case of any
> > exception it should throw Error 500 (Internal Server Error).
> > Ideally it should throw Http code 200 along with the XML information
> > containing the exception raised by web service, because communication is
> > proper.
> >
> > If its the correct behavior then do we have any option to change this
> > behavior of Axis 2.
> >
> > Please suggest some valuable tips as i am stuck with it .
> >
> > With Regards
> > Santosh Kumar
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>

Re: Need Assisatance : Http-500(Internal Server Error)

Posted by Andreas Veithen <an...@gmail.com>.
That behavior is required by the SOAP specs [1]:

"In case of a SOAP error while processing the request, the SOAP HTTP
server MUST issue an HTTP 500 "Internal Server Error" response and
include a SOAP message in the response containing a SOAP Fault element
(see section 4.4) indicating the SOAP processing error."

Andreas

[1] http://www.w3.org/TR/2000/NOTE-SOAP-20000508

On Wed, Apr 10, 2013 at 11:47 AM, santosh kumar <24...@gmail.com> wrote:
> Hi,
>
> I am facing an issue with Axis2 framework.
> I am using Apache Tomcat version 7.0.25 on which i have deployed my web
> service.
> The issue faced is :
>
> 1. whenever my service throws any exception Axis throws the same exception
> in XML format correctly  but in RAW data we see
>
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Wed, 10 Apr 2013 08:48:13 GMT
> Connection: close
>
> I want to know is it correct behaviour of Axis2 that in case of any
> exception it should throw Error 500 (Internal Server Error).
> Ideally it should throw Http code 200 along with the XML information
> containing the exception raised by web service, because communication is
> proper.
>
> If its the correct behavior then do we have any option to change this
> behavior of Axis 2.
>
> Please suggest some valuable tips as i am stuck with it .
>
> With Regards
> Santosh Kumar
>

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