cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r993053 - /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Mon, 06 Sep 2010 14:57:06 GMT
Author: ema
Date: Mon Sep  6 14:57:06 2010
New Revision: 993053

URL: http://svn.apache.org/viewvc?rev=993053&view=rev
Log:
[CXF-2974]:Log warning message instead of ServiceConstructionException in initializeClassInfo()

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=993053&r1=993052&r2=993053&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Mon Sep  6 14:57:06 2010
@@ -702,29 +702,28 @@ public class ReflectionServiceFactoryBea
                 //make it.
                 WSDLServiceBuilder.checkForWrapped(o, true);
             }
-
-            if (o.hasInput()) {
-                MessageInfo input = o.getInput();
-                MessagePartInfo part = input.getMessageParts().get(0);
-                part.setTypeClass(getRequestWrapper(method));
-                part.setProperty("REQUEST.WRAPPER.CLASSNAME", getRequestWrapperClassName(method));
-                part.setIndex(0);
-            }
-
-            if (o.hasOutput()) {
-                MessageInfo input = o.getOutput();
-                MessagePartInfo part = input.getMessageParts().get(0);
-                part.setTypeClass(getResponseWrapper(method));
-                part.setProperty("RESPONSE.WRAPPER.CLASSNAME", getResponseWrapperClassName(method));
-                part.setIndex(0);
-            }
-
-            setFaultClassInfo(o, method);
-            if (o.getUnwrappedOperation() == null) {
-                throw new ServiceConstructionException(new Message("COULD_NOT_UNWRAP", LOG,
-                                                                   o.getName(), method));
+            if (o.getUnwrappedOperation() != null) {
+                if (o.hasInput()) {
+                    MessageInfo input = o.getInput();
+                    MessagePartInfo part = input.getMessageParts().get(0);
+                    part.setTypeClass(getRequestWrapper(method));
+                    part.setProperty("REQUEST.WRAPPER.CLASSNAME", getRequestWrapperClassName(method));
+                    part.setIndex(0);
+                }
+
+                if (o.hasOutput()) {
+                    MessageInfo input = o.getOutput();
+                    MessagePartInfo part = input.getMessageParts().get(0);
+                    part.setTypeClass(getResponseWrapper(method));
+                    part.setProperty("RESPONSE.WRAPPER.CLASSNAME", getResponseWrapperClassName(method));
+                    part.setIndex(0);
+                }
+                setFaultClassInfo(o, method);
+                o = o.getUnwrappedOperation();
+            } else {
+                LOG.warning(new Message("COULD_NOT_UNWRAP", LOG, o.getName(), method).toString());
+                setFaultClassInfo(o, method);
             }
-            o = o.getUnwrappedOperation();
         } else if (o.isUnwrappedCapable()) {
             // remove the unwrapped operation because it will break the
             // the WrapperClassOutInterceptor, and in general makes
@@ -755,14 +754,14 @@ public class ReflectionServiceFactoryBea
         if (o.hasOutput()
             && !initializeParameter(o, method, -1, paramType, genericType)) {
             return false;
-        }
+        }        
         if (origOp.hasOutput()) {
             sendEvent(Event.OPERATIONINFO_OUT_MESSAGE_SET, origOp, method, origOp.getOutput());
         }
 
         setFaultClassInfo(o, method);
         return true;
-    }    
+    }   
     private boolean initializeParameter(OperationInfo o, Method method, int i,
                                      Class paramType, Type genericType) {
         boolean isIn = isInParam(method, i);



Mime
View raw message