Thanks Scott, I code it already today the following way: When throwing an exception, I only got a body part back of the envelope to the client. That was not enough. I edited 'MessageRouterServlet.java' such that when throwing the exception from my class, I catch it in MessageRouterServlet. When the exception was thrown, I did not empty the resCtx, and change the status to '500'. This works good!!! The response has to come back which i generate. Not the default soap exception.
The next part is, when the body is gone... the server throws an exception via tomcat with unmarchelling. I know the ns is in the body part. It misses this, so its logical that this goes wrong. I am thinkig about editing the 'TransportMessage.java'. I hope that helps. than I can check for certan strings and add the body part myself. It;s just in case of I get a part of the envelope. My client requires that. If you have a better idea, I am all ears. Thanks!! Henk. -----Original Message----- From: Scott Nichol [mailto:[EMAIL PROTECTED] Sent: vrijdag 27 juni 2003 22:32 To: [EMAIL PROTECTED] Subject: Re: Sending header response 500 with custom xml response >From the SOAP 1.1 spec: >>> 6.2 SOAP HTTP Response SOAP HTTP follows the semantics of the HTTP Status codes for communicating status information in HTTP. For example, a 2xx status code indicates that the client's request including the SOAP component was successfully received, understood, and accepted etc. 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. <<< Apache SOAP supports this part of the spec from within the XXXRouterServlet code. When there is a "normal" response, Apache SOAP sends the 200 status. When an exception has been thrown, it sends a 500 status, packaging the exception information in a SOAP Fault in the SOAP Body per the spec. Therefore, if you want to send a 500 status, your code should throw an exception. On 26 Jun 2003 at 19:24, Henk Schipper wrote: > Hi All, > > I have to send a HTTP Status 500 - Internal Server error with a customised > xml-message. The request will be made from a messagerouter request. In the > source I see in the 'MessageRouterServlet.java' in the 'public void doPost' > section ,something about 'status = res.SC_OK;' and 'status = > res.SC_INTERNAL_SERVER_ERROR;'. Where in that part in MessageRouterServlet > is my class loaded? I need to give an extra parameter I think to giveback > the status I want. > > Please HELP! > > Regards, > > Henk > Scott Nichol Do not reply directly to this e-mail address, as it is filtered to only receive e-mail from specific mailing lists.