cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r661909 - in /cxf/trunk/rt/frontend/simple/src: main/java/org/apache/cxf/service/factory/ test/java/org/apache/cxf/service/factory/
Date Fri, 30 May 2008 23:06:54 GMT
Author: bimargulies
Date: Fri May 30 16:06:53 2008
New Revision: 661909

URL: http://svn.apache.org/viewvc?rev=661909&view=rev
Log:
Throw an informative-ish exception when someone tries to use a Holder 
type in an interface with the plain RFSB.

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
    cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.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=661909&r1=661908&r2=661909&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
Fri May 30 16:06:53 2008
@@ -990,6 +990,12 @@
                 mpi.setConcreteName(qname);
                 continue;
             } else {
+                if (null == mpi.getTypeQName()) {
+                    throw new ServiceConstructionException(new Message("UNMAPPABLE_PORT_TYPE",
LOG,
+                                                                       method.getDeclaringClass().getName(),
+                                                                       method.getName(),
+                                                                       mpi.getName()));
+                }
                 el.setSchemaTypeName(mpi.getTypeQName());
                 mpi.setXmlSchema(el);
                 mpi.setConcreteName(qname);

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=661909&r1=661908&r2=661909&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
Fri May 30 16:06:53 2008
@@ -26,3 +26,5 @@
   other configuration. (serviceClass/implementorClass attributes on the endpoint/server spring
config entry)
 REFERENCE_TO_UNDEFINED_TYPE = Schema element {0} references undefined type {1} for service
{2}.
 COULD_NOT_FIND_PART = Could not find a message part matching name {0}.  Possible values are
{1}.
+UNMAPPABLE_PORT_TYPE= Service class {0} method {1} part {2} cannot be mapped to schema. Check
for use of a JAX-WS-specific type \
+  without the JAX-WS service factory bean.
\ No newline at end of file

Modified: cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java?rev=661909&r1=661908&r2=661909&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
Fri May 30 16:06:53 2008
@@ -180,8 +180,7 @@
         assertEquals("document", sop.getStyle());
     }
     
-    @org.junit.Ignore
-    @Test
+    @Test(expected = ServiceConstructionException.class)
     public void testDocLiteralPartWithType() throws Exception {
         serviceFactory = new ReflectionServiceFactoryBean();
         serviceFactory.setBus(getBus());



Mime
View raw message