RE: Tomcat doesn't process error messages
) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:156) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) java.lang.Thread.run(Thread.java:810) 22.01.2013 15:50:43 - INFO - remote server returned error code: 500 22.01.2013 15:50:43 - INFO - remote server returned error mesagge: Internal Server Error 22.01.2013 15:50:43 - INFO - remote server returned error stream mesagge: Internal Server Error 22.01.2013 15:50:43 - DEBUG - - returned headers - 22.01.2013 15:50:43 - DEBUG - Server=Apache-Coyote/1.1 22.01.2013 15:50:43 - DEBUG - Content-Type=text/xml;charset=utf-8 22.01.2013 15:50:43 - DEBUG - Connection=close 22.01.2013 15:50:43 - DEBUG - Content-Length=1407 22.01.2013 15:50:43 - DEBUG - Date=Tue, 22 Jan 2013 14:50:43 GMT 22.01.2013 15:50:43 - DEBUG - null=HTTP/1.1 500 Internal Server Error 22.01.2013 15:50:43 - DEBUG - - END of returned headers - 22.01.2013 15:50:43 - DEBUG - forwarding response to remote user... 22.01.2013 15:50:43 - DEBUG - forward OK Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 23:58 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service I think that this is wrong. Tomcat should not be in this part : webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Tomcat plays no role at all in the dialog between the webapp and the Web Service. Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle Similarly, this part is wrong : Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp Tomcat plays no role there. Instead, it is the webapp which sets up its own independent HTTPS connection to the Web service, writes to that connection and reads from it. Tomcat does not even know that this HTTPS connection exists. I think that you misunderstand the nature of the problem. You seem to think that Tomcat is involved in the dialog between the webapp and the web service, so you think that when it goes wrong, it must be due to something in Tomcat. But Tomcat is /not/ involved in that part. So I believe that you are looking in the wrong place. The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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
Re: Tomcat doesn't process error messages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tim, On 1/3/13 10:09 AM, Tim Watts wrote: I just re-read your original email and I may have missed something. Are you saying that you get an IOException when you call request.getInputStream() during a 500 response? If so can you please post the stack trace. +1 I think this will clear everything up. Also, please tell us who wrote the code that calls getInputStream (on what? Probably an HttpURLConnection...). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEAREIAAYFAlDnWBoACgkQ9CaO5/Lv0PCfRACguRxq3+zCIE2HpqXziT4Kt/cq Ja4AnjB6uwkU54AtGDLM6nM+lqUmTxYm =86+7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat doesn't process error messages
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.comwrote: 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:Bodyns0:Activat eServiceRes xmlns:ns0=http://selfcare.ei.tmobile.cz/datatypes;ns0:eiMessageCont extns1:sender xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;VCCNG/ns1:sende rns1:correlationId xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;1201138552/ ns1:correlationId/ns0:eiMessageContextns0:datans0: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:userNamesa/ns0:userName/ns0:ServiceHeaderns0:OmsStatusn s0:orderStatusIN-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:BodySOAP-ENV:Fa ultfaultcode xmlns=SOAP-ENV:Server/faultcodefaultstring xmlns=This is an operation implementation generated fault/faultstringfaultactor 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:senderVCCN G/ns0:senderns0:correlationId1213075712/ns0:correlationId/n s0:eiMessageContextns1:timestamp xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;2013-01-02T14:28 :33.392+01:00/ns1:timestampns1:exceptionClass xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;100204/ns1: exceptionClassns1:furtherInfo xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;Validation error/ns1:furtherInfons: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?
Re: Tomcat doesn't process error messages
Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat doesn't process error messages
Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat doesn't process error messages
On Thu, 2013-01-03 at 12:42 +, Husarik, Branko wrote: Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Sounds like 'webapp' is what you referred to as the 'Proxy' in your original message? And it sounds like it's the 'webapp' that's discarding the SOAP response. Perhaps when it sees the 500 HTTP response code it simply discards the body of the response and sends that generic error message instead -- e.g. by calling sendError() and letting Tomcat generate it's default error response or the webapp's error page (if one is defined)? Depending on which component you have control over you can either: 1. Modify the 'webapp' to unconditionally send back the response body (perhaps by modifying it's error page if one is defined) -- OR -- 2. Modify the Web Service to reply with a 200 HTTP response code even if the service request fails. #2 seems the more reasonable approach to me since the failure is on the service level not the HTTP level. But in either case there's no tweaking in Tomcat itself that will fix this. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
RE: Tomcat doesn't process error messages
On Thu, 2013-01-03 at 12:42 +, Husarik, Branko wrote: Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error I just re-read your original email and I may have missed something. Are you saying that you get an IOException when you call request.getInputStream() during a 500 response? If so can you please post the stack trace. Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
RE: Tomcat doesn't process error messages
On Thu, 2013-01-03 at 12:42 +, Husarik, Branko wrote: Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle It's also important to note that in the WebService--webapp path the webapp is acting as an HTTP client. If I'm understanding you correctly then, if the webapp calls request.getInputStream() that stream would be connected to the Oracle client NOT the WebService. Since the request has already been completely read (and presumably closed?) it's understandable that you would get an IOException trying to read from it. The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: This is a digitally signed message part
Re: Tomcat doesn't process error messages
Husarik, Branko wrote: Hello, I will try to clarify the process as I see it: Request message sending process from Oracle to Web Service Oracle -- HTTP -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service I think that this is wrong. Tomcat should not be in this part : webapp -- Input/Output stream -- Tomcat -- HTTPS -- Web Service Tomcat plays no role at all in the dialog between the webapp and the Web Service. Response message receiving process from Web Service to Oracle Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp -- Input/Output stream -- Tomcat -- HTTP -- Oracle Similarly, this part is wrong : Web Service-- HTTPS -- Tomcat -- Input/Output stream -- webapp Tomcat plays no role there. Instead, it is the webapp which sets up its own independent HTTPS connection to the Web service, writes to that connection and reads from it. Tomcat does not even know that this HTTPS connection exists. I think that you misunderstand the nature of the problem. You seem to think that Tomcat is involved in the dialog between the webapp and the web service, so you think that when it goes wrong, it must be due to something in Tomcat. But Tomcat is /not/ involved in that part. So I believe that you are looking in the wrong place. The problem occures during the receiving stage (Tomcat -- Input/Output stream -- webapp) when the response from Web service cointains HTTP/1.1 500 Internal Server Error Webapp modifies the message (for example it adds basic authentication). I hope I don't miss something Big. Braňko -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: 3. ledna 2013 11:23 To: Tomcat Users List Subject: Re: Tomcat doesn't process error messages Husarik, Branko wrote: 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. Hi. Personally, I do not understand what you are trying to say. I believe that there is some incorrect understanding on your part of how this is supposed to work. In the scenario as you describe it, - Oracle is the HTTP client for Tomcat (just like any browser could be a client) - inside Tomcat, runs some webapp which happens to be a SOAP proxy. What this webapp does, is unknown to Tomcat. As far as Tomcat is concerned, this webapp is supposed to process some HTTP requests (depending on the URL of the request), and generate a HTTP response. Schematically, we have this : request : Oracle client -- HTTP -- Tomcat -- webapp (-- (unknown to Tomcat)) response : ( (unknown to Tomcat) -- ) webapp -- Tomcat -- HTTP -- Oracle client Repeat : what the webapp does inside is unknown and of (almost) no interest to Tomcat. (For example, if the webapp uses HTTPS to communicate with something else, Tomcat never knows this, and never plays any role in that part) So in this case, if the webapp generates a response which happens to be a 500 error, Tomcat will forward this to the (Oracle client). Tomcat will never read any input stream coming back from the webapp or anything like this. It is the webapp which is responsible for that kind of thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat doesn't process error messages
Hi. Husarik, Branko 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? I am not quite sure what your problem is, but I am quite sure that there is no part of the standard Tomcat software which acts as a proxy server. Can you explain which code is actually performing this proxying function ? (It must be some webapp running under Tomcat, but it does not belong to the standard Tomcat release). 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:Bodyns0:ActivateServiceRes xmlns:ns0=http://selfcare.ei.tmobile.cz/datatypes;ns0:eiMessageContextns1:sender xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;VCCNG/ns1:senderns1:correlationId xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;1201138552/ns1:correlationId/ns0:eiMessageContextns0:datans0: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:userNamesa/ns0:userName/ns0:ServiceHeaderns0:OmsStatusns0:orderStatusIN-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:BodySOAP-ENV:Faultfaultcode xmlns=SOAP-ENV:Server/faultcodefaultstring xmlns=This is an operation implementation generated fault/faultstringfaultactor 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:senderVCCNG/ns0:senderns0:correlationId1213075712/ns0:correlationId/ns0:eiMessageContextns1:timestamp xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;2013-01-02T14:28:33.392+01:00/ns1:timestampns1:exceptionClass xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;100204/ns1:exceptionClassns1:furtherInfo xmlns:ns1=http:/ /messaging.ei.tmobile.net/datatypesValidation error/ns1:furtherInfons: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:reasonns1: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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat doesn't process error messages
On Thu, Jan 3, 2013 at 1:33 AM, Husarik, Branko branko.husa...@hp.comwrote: 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:Bodyns0:ActivateServiceRes xmlns:ns0=http://selfcare.ei.tmobile.cz/datatypes;ns0:eiMessageContextns1:sender xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;VCCNG/ns1:senderns1:correlationId xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;1201138552/ns1:correlationId/ns0:eiMessageContextns0:datans0: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:userNamesa/ns0:userName/ns0:ServiceHeaderns0:OmsStatusns0:orderStatusIN-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:BodySOAP-ENV:Faultfaultcode xmlns=SOAP-ENV:Server/faultcodefaultstring xmlns=This is an operation implementation generated fault/faultstringfaultactor 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:senderVCCNG/ns0:senderns0:correlationId1213075712/ns0:correlationId/ns0:eiMessageContextns1:timestamp xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;2013-01-02T14:28:33.392+01:00/ns1:timestampns1:exceptionClass xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;100204/ns1:exceptionClassns1:furtherInfo xmlns:ns1=http://messaging.ei.tmobile.net/datatypes;Validation error/ns1:furtherInfons: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:reasonns1: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?