cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r661530 - /cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
Date Thu, 29 May 2008 23:38:04 GMT
Author: bimargulies
Date: Thu May 29 16:38:04 2008
New Revision: 661530

URL: http://svn.apache.org/viewvc?rev=661530&view=rev
Log:
Add test case for mysterious missing element from Xml schema.

Modified:
    cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java

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=661530&r1=661529&r2=661530&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
Thu May 29 16:38:04 2008
@@ -31,14 +31,17 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.cxf.no_body_parts.NoBodyPartsImpl;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.junit.Test;
 
 public class ReflectionServiceFactoryTest extends AbstractSimpleFrontendTest {
@@ -175,4 +178,26 @@
         assertEquals("", sop.getAction());
         assertEquals("document", sop.getStyle());
     }
+    
+    @org.junit.Ignore
+    @Test
+    public void testDocLiteralPartWithType() throws Exception {
+        serviceFactory = new ReflectionServiceFactoryBean();
+        serviceFactory.setBus(getBus());
+        serviceFactory.setServiceClass(NoBodyPartsImpl.class);
+        Service service = serviceFactory.create();
+        ServiceInfo serviceInfo = 
+            service.getServiceInfos().get(0);
+        QName qname = new QName("urn:org:apache:cxf:no_body_parts/wsdl",
+                                "operation1");
+        MessageInfo mi = serviceInfo.getMessage(qname);
+        qname = new QName("urn:org:apache:cxf:no_body_parts/wsdl",
+            "mimeAttachment");
+        MessagePartInfo mpi = mi.getMessagePart(qname);
+        QName elementQName = mpi.getElementQName();
+        XmlSchemaElement element = 
+            serviceInfo.getXmlSchemaCollection().getElementByQName(elementQName);
+        assertNotNull(element);
+
+    }
 }



Mime
View raw message