SOAP service logic should manipulate the message, but there is need to receive 
message from Tomcat by reading it's input stream. Problem is, there is only 
error stream cointaining tomcat error coming from Tomcat. I think it is caused 
by message from web service, which cointains " HTTP/1.1 500 Internal Server 
Error " in HTTP protocol and SOAP message is not forwarded. It seems to me like 
common logic, but i don't know, how to set Tomcat to forward these messages to 
input stream.

-----Original Message-----
From: Igor Cicimov [mailto:icici...@gmail.com] 
Sent: 3. ledna 2013 1:44
To: Tomcat Users List
Subject: Re: Tomcat doesn't process error messages

On Thu, Jan 3, 2013 at 1:33 AM, Husarik, Branko <branko.husa...@hp.com>wrote:

> Hello,
>
> I am a bit desperate thanks to my issue with Tomcat, which seems to be 
> like common matter. I am using Tomcat 6.0.35 as a proxy between Oracle 
> and Web service. Tomcat is running on AIX Version 6.1. There is send 
> request http message from Oracle to the Proxy and message is forwarded 
> to the Web service as https. Web services responses https message to 
> Proxy and it is send back to Oracle as http.
>
> When Web service responds HTTP/1.1 200 OK, everything works well and 
> the Soap Message is correctly forwarded back to Oracle.
> When Web service responds HTTP/1.1 500 Internal Server Error, proxy 
> fails during getInputStream() method.
> There is thrown IOException and Soap message is not forwarded back. 
> Error message is "Server returned HTTP response code: 500 for URL:
> https://hktibt.rdm.cz:39990/...."; and cause is null. I tried to add
> getErrorStream() executing in case getInputStream() is not working, 
> but the result is null. Please do you know some way, how to process 
> incoming "Error messages"? Is it caused by bad setup of configuration?
>
> Thank you very much.
>
> I am attaching both responses from web service:
>
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Content-Length: 878
> Date: Wed, 02 Jan 2013 13:15:24 GMT
>
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/";><SOAP-ENV:Body><ns0:Activat
> eServiceRes 
> xmlns:ns0="http://selfcare.ei.tmobile.cz/datatypes";><ns0:eiMessageCont
> ext><ns1:sender 
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>VCCNG</ns1:sende
> r><ns1:correlationId 
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>12000001138552</
> ns1:correlationId></ns0:eiMessageContext><ns0:data><ns0:ServiceHeader
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:env="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance
> "><ns0:userName>sa</ns0:userName></ns0:ServiceHeader><ns0:OmsStatus><n
> s0:orderStatus>IN-PROCESS</ns0:orderStatus></ns0:OmsStatus></ns0:data>
> </ns0:ActivateServiceRes></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Content-Length: 1407
> Date: Wed, 02 Jan 2013 13:28:33 GMT
> Connection: close
>
> <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/";><SOAP-ENV:Body><SOAP-ENV:Fa
> ult><faultcode xmlns="">SOAP-ENV:Server</faultcode><faultstring 
> xmlns="">This is an operation implementation generated 
> fault</faultstring><faultactor xmlns=""/><detail 
> xmlns=""><ns:BusinessServiceException xmlns:xs="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xmlns:ns="
> http://selfcare.ei.tmobile.cz/datatypes"; xmlns:ns0="
> http://schemas.xmlsoap.org/soap/envelope/";><ns0:eiMessageContext
> xmlns:ns0="http://messaging.ei.tmobile.net/datatypes";><ns0:sender>VCCN
> G</ns0:sender><ns0:correlationId>12000013075712</ns0:correlationId></n
> s0:eiMessageContext><ns1:timestamp
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>2013-01-02T14:28
> :33.392+01:00</ns1:timestamp><ns1:exceptionClass
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>1002000004</ns1:
> exceptionClass><ns1:furtherInfo 
> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>Validation
> error</ns1:furtherInfo><ns:breData xmlns:ns0="
> http://www.tibco.com/schemas/BS_SA/Internal";><ns1:reason xmlns:ns1="
> http://selfcare.ei.tmobile.cz/datatypes";>NOT_PROPER_TARIFF</ns1:reason
> ><ns1:textInfo xmlns:ns1="http://selfcare.ei.tmobile.cz/datatypes
> ">.</ns1:textInfo></ns:breData></ns:BusinessServiceException></detail>
> </SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
> Best Regards
>
> Braňko
>

Shouldn't this be handled by the SOAP service logic running on the tomcat 
server?

Reply via email to