You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/10/28 00:14:22 UTC
svn commit: r328964 - in /webservices/axis2/trunk/java/modules:
common/src/org/apache/axis2/i18n/resource.properties
core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Author: dims
Date: Thu Oct 27 15:14:16 2005
New Revision: 328964
URL: http://svn.apache.org/viewcvs?rev=328964&view=rev
Log:
- Prevent NPE when content-type is absent
- Fix a typo
Modified:
webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Modified: webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties?rev=328964&r1=328963&r2=328964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties Thu Oct 27 15:14:16 2005
@@ -26,7 +26,7 @@
errorwhileProcessingFault=Error occured while processing fault, previous error is given in the stack trace
unSupportedMEP=Unsupported MEP {0}
mepClientSupportOnly=This MEP client supports only {0} , and Axis operations supplied supports {1}
-inputstreamNull=Input stream is null while reading for incomming message
+inputstreamNull=Input stream is null while reading for incoming message
unknownTransport=Unknown transport {0}
paramIsNotSpecified={0} parameter is not specified
groovyNoanswer=No answer received from groovy side!!!!
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=328964&r1=328963&r2=328964&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Thu Oct 27 15:14:16 2005
@@ -525,34 +525,23 @@
} else if (postMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) {
return;
} else if (postMethod.getStatusCode() == HttpStatus.SC_INTERNAL_SERVER_ERROR) {
-
Header contenttypeHheader = postMethod.getResponseHeader(
HTTPConstants.HEADER_CONTENT_TYPE);
- String value = contenttypeHheader.getValue();
- if (value != null) {
+ if (contenttypeHheader != null) {
+ String value = contenttypeHheader.getValue();
if (value.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) >= 0 ||
value.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) >= 0) {
processResponse(postMethod, msgContext);
- } else {
- /**
- * if the content type is text/html;charset=utf-8
- */
- throw new AxisFault(
- Messages.getMessage(
- "transportError",
- String.valueOf(postMethod.getStatusCode()),
- postMethod.getResponseBodyAsString()));
+ return;
}
}
- } else {
- throw new AxisFault(
- Messages.getMessage(
- "transportError",
- String.valueOf(postMethod.getStatusCode()),
- postMethod.getResponseBodyAsString()));
}
-
+ throw new AxisFault(
+ Messages.getMessage(
+ "transportError",
+ String.valueOf(postMethod.getStatusCode()),
+ postMethod.getResponseBodyAsString()));
}
/**