servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r490476 - /incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java
Date Wed, 27 Dec 2006 10:28:17 GMT
Author: gnodet
Date: Wed Dec 27 02:28:16 2006
New Revision: 490476

URL: http://svn.apache.org/viewvc?view=rev&rev=490476
Log:
Fix possible NPE when faults are generated from the annotated POJO

Modified:
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java?view=diff&rev=490476&r1=490475&r2=490476
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181ExchangeProcessor.java
Wed Dec 27 02:28:16 2006
@@ -115,8 +115,8 @@
         
         // Set response or DONE status
         if (isInAndOut(exchange)) {
-            String charSet = ctx.getOutMessage().getEncoding();
             if (ctx.getExchange().hasFaultMessage() && ctx.getExchange().getFaultMessage().getBody()
!= null) {
+                String charSet = ctx.getExchange().getFaultMessage().getEncoding();
                 Fault fault = exchange.createFault();
                 fault.setContent(new StringSource(out.toString(charSet)));
                 XFireFault xFault = (XFireFault) ctx.getExchange().getFaultMessage().getBody();
@@ -126,6 +126,7 @@
                 fault.setProperty(SOAP_FAULT_SUBCODE, xFault.getSubCode());
                 exchange.setFault(fault);
             } else {
+                String charSet = ctx.getOutMessage().getEncoding();
                 NormalizedMessage outMsg = exchange.createMessage();
                 Attachments attachments = ctx.getCurrentMessage().getAttachments();
                 if (attachments != null) {



Mime
View raw message