cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r791952 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/ systests/src/test/java/org/apache/cxf/systest/xmlbeans/
Date Tue, 07 Jul 2009 19:39:15 GMT
Author: dkulp
Date: Tue Jul  7 19:39:14 2009
New Revision: 791952

URL: http://svn.apache.org/viewvc?rev=791952&view=rev
Log:
Merged revisions 791753 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r791753 | ffang | 2009-07-07 04:49:02 -0400 (Tue, 07 Jul 2009) | 1 line
  
  [CXF-2322] can't publish endpoint with XmlBeans databinding when build servicemodel from
class
........

Added:
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
      - copied unchanged from r791753, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
      - copied unchanged from r791753, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul  7 19:39:14 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java?rev=791952&r1=791951&r2=791952&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
Tue Jul  7 19:39:14 2009
@@ -196,8 +196,11 @@
             
             SchemaTypeSystem sts = st.getTypeSystem();
             schemas.getXmlSchemaCollection().setSchemaResolver(new XMLSchemaResolver(sts));
-
-            XmlSchema schema = getSchema(sts, st.getSourceName());
+            String sourceName = st.getSourceName();
+            if (sourceName.endsWith("wsdl")) {
+                return;
+            }
+            XmlSchema schema = getSchema(sts, sourceName);
 
             if (st.isDocumentType()) {
                 XmlSchemaElement sct = schema.getElementByName(st.getDocumentElementName());

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java?rev=791952&r1=791951&r2=791952&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java
Tue Jul  7 19:39:14 2009
@@ -23,11 +23,15 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.SOAPBinding;
 
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument;
 import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument.FaultDetail;
@@ -48,6 +52,7 @@
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(Server.class, true));
+        assertTrue("server did not launch correctly", launchServer(ServerNoWsdl.class, true));
     }
     
     @Test
@@ -61,7 +66,51 @@
         SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
         Greeter port = ss.getSoapPort();
         String resp; 
+        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
+        resp = port.sayHi();
+        assertEquals("We should get the right response", resp, "Bonjour");        
+        
+        resp = port.greetMe("Willem");
+        assertEquals("We should get the right response", resp, "Hello Willem");
+        
+        try {
+            resp = port.greetMe("Invoking greetMe with invalid length string, expecting exception...");
+            fail("We expect exception here");
+        } catch (WebServiceException ex) {           
+            assertTrue("Get a wrong exception", 
+                       ex.getMessage().
+                       indexOf("string length (67) is greater than maxLength facet (30)")
>= 0);
+        }
         
+        port.greetMeOneWay(System.getProperty("user.name"));
+        
+        try {
+            port.pingMe();
+            fail("We expect exception here");
+        } catch (PingMeFault ex) {            
+            FaultDetailDocument detailDocument = ex.getFaultInfo();
+            FaultDetail detail = detailDocument.getFaultDetail();
+            assertEquals("Wrong faultDetail major", detail.getMajor(), 2);
+            assertEquals("Wrong faultDetail minor:", detail.getMinor(), 1);             
+        }          
+    }
+    
+    @Test
+    public void testCallFromClientNoWsdlServer() throws Exception {
+        SpringBusFactory factory = new SpringBusFactory();
+        Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml");
+        BusFactory.setDefaultBus(bus);
+        URL wsdl = this.getClass().getResource("/wsdl_systest/xmlbeans/hello_world.wsdl");
+        assertNotNull("We should found the WSDL her. " , wsdl);      
+        
+        SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
+        QName soapPort = new QName("http://apache.org/hello_world_soap_http/xmlbeans", "SoapPort");
+        ss.addPort(soapPort, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:9010/SoapContext/SoapPort");
+        Greeter port = ss.getPort(soapPort, Greeter.class);
+        String resp; 
+        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
         resp = port.sayHi();
         assertEquals("We should get the right response", resp, "Bonjour");        
         



Mime
View raw message