[jbossws-commits] JBossWS SVN: r14913 - in stack/native/branches/jbossws-native-3.1.2: modules/core and 4 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Aug 31 11:37:16 EDT 2011


Author: mmusaji
Date: 2011-08-31 11:37:16 -0400 (Wed, 31 Aug 2011)
New Revision: 14913

Modified:
   stack/native/branches/jbossws-native-3.1.2/
   stack/native/branches/jbossws-native-3.1.2/modules/core/
   stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
   stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
   stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
   stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/
Log:
JBPAPP-6860 - Added System Property org.jboss.ws.IgnoreParseError to allow parsing errors to be sent back to the client if set to true


Property changes on: stack/native/branches/jbossws-native-3.1.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365:14192
/stack/native/branches/jbossws-native-3.4.0.SP1:13928,13933,13936,13946
/stack/native/trunk:12502,13992,14157,14160,14181,14183,14842
   + /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365:14192
/stack/native/branches/jbossws-native-3.4.0.SP1:13928,13933,13936,13946
/stack/native/trunk:12502,13992,14157,14160,14181,14183,14842


Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/core
___________________________________________________________________
Modified: svn:mergeinfo
   - /stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/core:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/core:13928,13933,13936,13946
/stack/native/trunk/modules/core:12502,13992,14011,14157,14160,14181,14183,14842
   + /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/core:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/core:13928,13933,13936,13946
/stack/native/trunk/modules/core:12502,13992,14011,14157,14160,14181,14183,14842

Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java	2011-08-31 15:04:42 UTC (rev 14912)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java	2011-08-31 15:37:16 UTC (rev 14913)
@@ -32,6 +32,7 @@
 {
    private QName faultCode;
    private String faultString;
+   private Throwable throwable;
 
    public CommonSOAPFaultException(QName faultCode, String faultString)
    {
@@ -40,6 +41,15 @@
       this.faultCode = faultCode;
       this.faultString = faultString;
    }
+   
+   public CommonSOAPFaultException(QName faultCode, Throwable throwable) {
+      
+      super(throwable.getMessage(), throwable);
+      
+      this.faultCode = faultCode;
+      this.throwable = throwable;
+      
+   }
 
    public QName getFaultCode()
    {
@@ -50,4 +60,9 @@
    {
       return faultString;
    }
+   
+   public Throwable getThrowable()
+   {
+      return throwable;
+   }
 }

Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java	2011-08-31 15:04:42 UTC (rev 14912)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java	2011-08-31 15:37:16 UTC (rev 14913)
@@ -263,8 +263,15 @@
          {
             throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));
          }
+         
+         IOException io = null;
 
-         IOException io = new IOException("Could not transmit message");
+         if(th.getCause().getMessage() != null) {
+            io = new IOException(th.getCause().getMessage());
+         }else {
+            io = new IOException("Could not transmit message");
+         }
+         
          io.initCause(th);
          throw io;
       }

Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java	2011-08-31 15:04:42 UTC (rev 14912)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java	2011-08-31 15:37:16 UTC (rev 14913)
@@ -60,6 +60,8 @@
 {
    // provide logging
    private static Logger log = Logger.getLogger(EnvelopeBuilderDOM.class);
+   
+   private static final String IGNORE_PARSE_ERROR_PROPERTY = System.getProperty("org.jboss.ws.IgnoreParseError", "true");
 
    private SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
    private Style style;
@@ -86,12 +88,16 @@
       }
       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);
@@ -109,10 +115,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.getMessage());
       }


Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests
___________________________________________________________________
Modified: svn:mergeinfo
   - /stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/testsuite/native-tests:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/testsuite/native-tests:13928,13933,13936,13946
/stack/native/trunk/modules/testsuite/native-tests:12502,13992,14013,14157,14160,14181,14183,14842
   + /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/testsuite/native-tests:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/testsuite/native-tests:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/testsuite/native-tests:13928,13933,13936,13946
/stack/native/trunk/modules/testsuite/native-tests:12502,13992,14013,14157,14160,14181,14183,14842



More information about the jbossws-commits mailing list