You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2008/11/05 10:21:06 UTC

svn commit: r711538 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java

Author: amilas
Date: Wed Nov  5 01:21:05 2008
New Revision: 711538

URL: http://svn.apache.org/viewvc?rev=711538&view=rev
Log:
put a log message instead of system errors

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java?rev=711538&r1=711537&r2=711538&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java Wed Nov  5 01:21:05 2008
@@ -30,6 +30,8 @@
 import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.Policy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -44,6 +46,8 @@
 import java.util.Map;
 
 public class PolicyEvaluator implements CodeGenExtension {
+
+    private static final Log log = LogFactory.getLog(PolicyEvaluator.class);
     
     private CodeGenConfiguration configuration;
 
@@ -100,8 +104,7 @@
             }
 
         } catch (Exception e) {
-            System.err
-                    .println("cannot create repository : policy will not be supported");
+            log.error("cannot create repository : policy will not be supported");
         }
     }
 
@@ -181,8 +184,7 @@
             PolicyExtension policyExtension = (PolicyExtension)ns2Exts.get(targetNamespace);
 
             if (policyExtension == null) {
-                System.err.println("cannot find a PolicyExtension to process "
-                        + targetNamespace + "type assertions");
+                log.warn("cannot find a PolicyExtension to process " + targetNamespace + "type assertions");
                 continue;
             }