JBossWS SVN: r14894 - stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2011-08-22 07:17:11 -0400 (Mon, 22 Aug 2011)
New Revision: 14894
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
Log:
JBPAPP-6864 Added check for System Property ignore.parse.error to keep backward compatibility for ignoreParseError field
Modified: stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-17 19:22:09 UTC (rev 14893)
+++ stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-22 11:17:11 UTC (rev 14894)
@@ -60,6 +60,8 @@
{
// provide logging
private static Logger log = Logger.getLogger(EnvelopeBuilderDOM.class);
+
+ private static final String IGNORE_PARSE_ERROR_PROPERTY = System.getProperty("ignore.parse.error", "true");
private SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
private Style style;
@@ -86,12 +88,13 @@
}
catch (IOException ex)
{
- if (ignoreParseError)
- {
+ if(IGNORE_PARSE_ERROR_PROPERTY.equalsIgnoreCase("false")) {
+ QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
+ throw new CommonSOAPFaultException(faultCode, ex);
+ }else if (ignoreParseError) { //kept for backward compatibility
return null;
}
- QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
- throw new CommonSOAPFaultException(faultCode, ex);
+
}
return build(soapMessage, domEnv);
@@ -109,12 +112,12 @@
}
catch (IOException ex)
{
- if (ignoreParseError)
- {
+ if(IGNORE_PARSE_ERROR_PROPERTY.equalsIgnoreCase("false")) {
+ QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
+ throw new CommonSOAPFaultException(faultCode, ex);
+ }else if (ignoreParseError) { //kept for backward compatibility
return null;
}
- QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
- throw new CommonSOAPFaultException(faultCode, ex.getMessage());
}
return build(soapMessage, domEnv);
Modified: stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2011-08-17 19:22:09 UTC (rev 14893)
+++ stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2011-08-22 11:17:11 UTC (rev 14894)
@@ -47,7 +47,7 @@
try
{
- SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, false);
+ SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, true);
return soapMsg;
}
Modified: stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2011-08-17 19:22:09 UTC (rev 14893)
+++ stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2011-08-22 11:17:11 UTC (rev 14894)
@@ -79,8 +79,7 @@
if (resCode != HttpServletResponse.SC_NO_CONTENT)
{
MimeHeaders mimeHeaders = getMimeHeaders(metadata);
- //[JBWS-2651] modify the ignoreParseError to false
- soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, false);
+ soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, true);
}
return soapMsg;