servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r770954 - in /servicemix/components/engines/servicemix-exec/trunk: ./ src/main/java/org/apache/servicemix/exec/ src/main/java/org/apache/servicemix/exec/marshaler/
Date Sat, 02 May 2009 13:55:34 GMT
Author: jbonofre
Date: Sat May  2 13:55:33 2009
New Revision: 770954

URL: http://svn.apache.org/viewvc?rev=770954&view=rev
Log:
Update the servicemix-exec component version.
Now use the marshaler to format the output message content.

Modified:
    servicemix/components/engines/servicemix-exec/trunk/pom.xml
    servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
    servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
    servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/ExecMarshalerSupport.java

Modified: servicemix/components/engines/servicemix-exec/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/pom.xml?rev=770954&r1=770953&r2=770954&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/pom.xml (original)
+++ servicemix/components/engines/servicemix-exec/trunk/pom.xml Sat May  2 13:55:33 2009
@@ -26,12 +26,12 @@
     <parent>
         <groupId>org.apache.servicemix</groupId>
         <artifactId>components-pom</artifactId>
-        <version>3-SNAPSHOT</version>
+        <version>4-SNAPSHOT</version>
     </parent>
     
     <groupId>org.apache.servicemix</groupId>
     <artifactId>servicemix-exec</artifactId>
-    <version>2009.01-SNAPSHOT</version>
+    <version>2009.02-SNAPSHOT</version>
     <packaging>jbi-component</packaging>
     
     <name>ServiceMix :: Exec</name>
@@ -41,7 +41,7 @@
     
     <properties>
         <servicemix-version>3.3</servicemix-version>
-        <servicemix-shared-version>2008.02-SNAPSHOT</servicemix-shared-version>
+        <servicemix-shared-version>2009.02-SNAPSHOT</servicemix-shared-version>
         
         <servicemix.osgi.import>
             org.apache.servicemix;resolution:=optional,

Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java?rev=770954&r1=770953&r2=770954&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
(original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
Sat May  2 13:55:33 2009
@@ -143,7 +143,7 @@
                 String output = ExecUtils.execute(command);
                 if (exchange instanceof InOut) {
                     NormalizedMessage out = exchange.createMessage();
-                    out.setContent(new StringSource("<output>" + output + "</output>"));
+                    out.setContent(new StringSource(marshaler.formatExecutionOutput(output)));
                     exchange.setMessage(out, "out");
                     send(exchange);
                 } else {

Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java?rev=770954&r1=770953&r2=770954&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
(original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
Sat May  2 13:55:33 2009
@@ -67,4 +67,12 @@
         return execString;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.servicemix.exec.marshaler.ExecMarshalerSupport#formatExecutionOutput(java.lang.String)
+     */
+    public String formatExecutionOutput(String output) {
+        return "<output><![CDATA[" + output + "]></output>";
+    }
+
 }

Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/ExecMarshalerSupport.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/ExecMarshalerSupport.java?rev=770954&r1=770953&r2=770954&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/ExecMarshalerSupport.java
(original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/ExecMarshalerSupport.java
Sat May  2 13:55:33 2009
@@ -37,5 +37,15 @@
      * @throws TransformerException in case of error during command construction.
      */
     public String constructExecCommand(NormalizedMessage message) throws TransformerException;
+    
+    /**
+     * <p>
+     * Formats the execution command output to be embedded in the exchange out message.
+     * </p>
+     * 
+     * @param output the command execution output.
+     * @return the command execution output formatted to be embedded in the exchagen out
message.
+     */
+    public String formatExecutionOutput(String output);
 
 }



Mime
View raw message