Author: ruwan
Date: Sun Jan 13 21:33:35 2008
New Revision: 611713

URL: http://svn.apache.org/viewvc?rev=611713&view=rev
Log:
Fixing a typo and adding a null check to the cachedTemplate of the xslt

Modified:
    
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java

Modified: 
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java?rev=611713&r1=611712&r2=611713&view=diff
==============================================================================
--- 
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java
 (original)
+++ 
webservices/synapse/branches/1.1.1/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java
 Sun Jan 13 21:33:35 2008
@@ -33,7 +33,6 @@
 import org.apache.axiom.om.xpath.AXIOMXPath;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 import org.apache.synapse.MessageContext;
@@ -184,7 +183,7 @@
         }
 
         try {
-            performXLST(synCtx, traceOrDebugOn, traceOn);
+            performXSLT(synCtx, traceOrDebugOn, traceOn);
 
         } catch (Exception e) {
             handleException("Unable to perform XSLT transformation using : " + 
xsltKey +
@@ -207,7 +206,7 @@
      * @param traceOrDebugOn is trace or debug on?
      * @param traceOn is trace on?
      */
-    private void performXLST(MessageContext synCtx, boolean traceOrDebugOn, 
boolean traceOn) {
+    private void performXSLT(MessageContext synCtx, boolean traceOrDebugOn, 
boolean traceOn) {
 
         boolean reCreate = false;
         OMNode sourceNode = getTransformSource(synCtx);
@@ -323,9 +322,12 @@
                 try {
                     cachedTemplates = transFact.newTemplates(
                         
SynapseConfigUtils.getStreamSource(synCtx.getEntry(xsltKey)));
-
-                } catch (TransformerConfigurationException e) {
-                    handleException("Error creating XSLT transformer using : " 
+ xsltKey, e, synCtx);
+                    if (cachedTemplates == null) {
+                        handleException("Error compiling the XSLT with key : " 
+ xsltKey, synCtx);
+                    }
+                } catch (Exception e) {
+                    handleException("Error creating XSLT transformer using : "
+                        + xsltKey, e, synCtx);
                 }
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to