cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r702870 - in /cxf/branches/2.1.x-fixes: ./ parent/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegi...
Date Wed, 08 Oct 2008 13:37:49 GMT
Author: dkulp
Date: Wed Oct  8 06:37:48 2008
New Revision: 702870

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

........
  r702616 | bimargulies | 2008-10-07 16:26:30 -0400 (Tue, 07 Oct 2008) | 2 lines
  
  Fixes from Peter Jones to CXF-1840 and 1845. Thank you!
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/parent/pom.xml
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
    cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
    cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
    cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
    cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct  8 06:37:48 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616

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

Modified: cxf/branches/2.1.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/parent/pom.xml?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/parent/pom.xml Wed Oct  8 06:37:48 2008
@@ -283,7 +283,7 @@
 				<value>${surefire.fork.vmargs}</value>
 		            </property>
                             <property>
-                                <!-- If we close the port after a client in the same JVM
has oppened a keep-alive
+                                <!-- If we close the port after a client in the same JVM
has opened a keep-alive
                                 connection, on some Linux's, the socket remains consumed
until
                                 some timeout occurs.   That may cause some tests to timeout/hang.
-->
                                 <name>org.apache.cxf.transports.http_jetty.DontClosePort</name>
@@ -1132,12 +1132,16 @@
                                     <value>${spring.validation.mode}</value>
                                 </property>
                                 <property>
-                                    <!-- If we close the port after a client in the same
JVM has oppened a keep-alive
+                                    <!-- If we close the port after a client in the same
JVM has opened a keep-alive
                                      connection, on some Linux's, the socket remains consumed
until
                                      some timeout occurs.   That may cause some tests to
timeout/hang. -->
                                     <name>org.apache.cxf.transports.http_jetty.DontClosePort</name>
                                     <value>false</value>
                                 </property>
+                                <property>
+                                    <name>java.security.properties</name>
+                                    <value>${basedir}/target/test-classes/ibm.security</value>
+                                </property>
                             </systemProperties>
                         </configuration>
                     </plugin>

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
Wed Oct  8 06:37:48 2008
@@ -76,13 +76,22 @@
 
     @SuppressWarnings("unchecked")
     public Class getType(AnnotatedElement element) {
-        return (Class) getAnnotationValue("type",
+        Class value = (Class) getAnnotationValue("type",
                 element,
                 Type.class,
                 XmlAttribute.class,
                 XmlElement.class,
                 org.codehaus.xfire.aegis.type.java5.XmlAttribute.class,
                 org.codehaus.xfire.aegis.type.java5.XmlElement.class);
+        // jaxb uses a different default value
+        if (value == null) {
+            value = (Class) getAnnotationValue("type",
+                    element,
+                    javax.xml.bind.annotation.XmlElement.DEFAULT.class,
+                    XML_ELEMENT);
+        }
+
+        return value;
     }
 
     @SuppressWarnings("unchecked")

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java
Wed Oct  8 06:37:48 2008
@@ -49,6 +49,9 @@
     }
 
     public static Attachment getAttachment(String id, Collection<Attachment> attachments)
{
+        if (id == null) {
+            throw new DatabindingException("Cannot get attachment: null id");
+        }
         int i = id.indexOf("cid:");
         if (i != -1) {
             id = id.substring(4).trim();

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
Wed Oct  8 06:37:48 2008
@@ -247,8 +247,14 @@
     }
 
     public MessageReader getAttributeReader(QName qName) {
-        return new AttributeReader(qName, root.getAttributeValue(qName.getNamespaceURI(),
qName
-            .getLocalPart()));
+        String attribute = root.getAttributeValue(qName.getNamespaceURI(), qName.getLocalPart());
+        if (attribute == null && "".equals(qName.getNamespaceURI())) {
+            // The qName namespaceURI of the attribute seems to be null
+            // rather than "" when using the ibmjdk.
+            // The MtomTest systest fails unless we do this.
+            attribute = root.getAttributeValue(null, qName.getLocalPart());
+        }
+        return new AttributeReader(qName, attribute);
     }
 
     public MessageReader getNextAttributeReader() {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/JaxbTypeTest.java
Wed Oct  8 06:37:48 2008
@@ -46,7 +46,7 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
-
+ 
         Server s = createService(JaxbService.class);
         service = s.getEndpoint().getService();
         databinding = (AegisDatabinding) service.getDataBinding();
@@ -86,7 +86,7 @@
         if ("bogusProperty".equals(element.getLocalPart())) {
             assertTrue(custom instanceof StringType);
         } else if ("elementProperty".equals(element.getLocalPart())) {
-            assertTrue(custom instanceof StringType);
+            assertTrue(custom instanceof CustomStringType);
         } else {
             fail("Unexpected element name: " + element.getLocalPart());
         }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
Wed Oct  8 06:37:48 2008
@@ -46,7 +46,12 @@
     
     @Test
     public void testSchemeHostPortQueryFragment() throws Exception {
-        URI uri = new URI("http://foo:1234/bar?n1=v1&n2=v2#fragment");
+        URI uri;
+        if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+            uri = new URI("http://foo:1234/bar?n2=v2&n1=v1#fragment");
+        } else {
+            uri = new URI("http://foo:1234/bar?n1=v1&n2=v2#fragment");
+        }
         URI newUri = new UriBuilderImpl().scheme("http").host("foo")
                      .port(1234).path("bar")
                      .queryParam("n1", "v1").queryParam("n2", "v2")

Modified: cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
Wed Oct  8 06:37:48 2008
@@ -143,7 +143,7 @@
     public void putDestination(String epName, JBIDestination destination) throws JBIException
{
         if (destinationMap.containsKey(epName)) {
             throw new JBIException("JBIDestination for Endpoint "
-                                   + epName + " already be created");
+                                   + epName + " has already been created");
         } else {
             destinationMap.put(epName, destination);
         }

Modified: cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTest.java
Wed Oct  8 06:37:48 2008
@@ -385,12 +385,21 @@
             assertEquals(bindingOperation.getBindingOutput().getName(), "review_dataResponse");
             
             Iterator f = bindingOperation.getBindingFaults().values().iterator();
+            boolean hasBadRecord = false;
+            boolean hasMyException = false;
             while (f.hasNext()) {
                 BindingFault bindingFault = (BindingFault)f.next();
-                assertEquals(bindingFault.getName(), "TestException.BadRecord");
-                bindingFault = (BindingFault)f.next();
-                assertEquals(bindingFault.getName(), "MyException");                
-            }                       
+                if ("TestException.BadRecord".equals(bindingFault.getName())) {
+                    hasBadRecord = true;
+                } else if ("MyException".equals(bindingFault.getName())) {
+                    hasMyException = true;
+                } else {
+                    fail("Unexpected BindingFault: " + bindingFault.getName());
+                }
+            }
+            assertTrue("Did not get expected TestException.BadRecord", hasBadRecord);
+            assertTrue("Did not get expected MyException", hasMyException);
+            
             Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
             while (bOp.hasNext()) {     
                 ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
@@ -398,10 +407,21 @@
                     OperationType corbaOpType = (OperationType)extElement;              
  
                     assertEquals(corbaOpType.getName(), "review_data");
                     assertEquals(1, corbaOpType.getParam().size());
-                    assertEquals(corbaOpType.getRaises().get(0).getException().getLocalPart(),

-                                 "TestException.BadRecord");
-                    assertEquals(corbaOpType.getRaises().get(1).getException().getLocalPart(),

-                                 "MyExceptionType");                          
+                    assertEquals(2, corbaOpType.getRaises().size());
+                    hasBadRecord = false;
+                    hasMyException = false;
+                    for (int k = 0; k < corbaOpType.getRaises().size(); k++) {
+                        String localPart = corbaOpType.getRaises().get(k).getException().getLocalPart();
+                        if ("TestException.BadRecord".equals(localPart)) {
+                            hasBadRecord = true;
+                        } else if ("MyExceptionType".equals(localPart)) {
+                            hasMyException = true;
+                        } else {
+                            fail("Unexpected Raises: " + localPart); 
+                        }
+                    }
+                    assertTrue("Did not find expected TestException.BadRecord", hasBadRecord);
+                    assertTrue("Did not find expected MyException", hasMyException);
                 }
             }
         }            

Modified: cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
Wed Oct  8 06:37:48 2008
@@ -430,32 +430,58 @@
             idlgen.setOutputFile("atype.idl");
             idlgen.generateIDL(model);
 
-            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(2);
-            assertEquals("Name is incorrect for Array Type", "X._1_S", 
+            List<CorbaTypeImpl> types = mapType.getStructOrExceptionOrUnion();
+            for (int i = 0; i < types.size(); i++) {
+                CorbaTypeImpl type = types.get(i);
+                if (type instanceof Anonstring) {
+                    Anonstring str = (Anonstring)type;
+                    assertEquals("Name is incorrect for Array Type", "X._1_S", 
                          str.getName());
-            assertEquals("Type is incorrect for AnonString Type", "string", 
+                    assertEquals("Type is incorrect for AnonString Type", "string", 
                          str.getType().getLocalPart());
             
-            Anonfixed fx = (Anonfixed)mapType.getStructOrExceptionOrUnion().get(3);
-            assertEquals("Name is incorrect for Anon Array Type", "X._2_S", 
+                } else if (type instanceof Anonfixed) {
+                    Anonfixed fx = (Anonfixed)type;
+                    assertEquals("Name is incorrect for Anon Array Type", "X._2_S", 
                          fx.getName());
-            assertEquals("Type is incorrect for AnonFixed Type", "decimal", 
+                    assertEquals("Type is incorrect for AnonFixed Type", "decimal", 
                          fx.getType().getLocalPart());
             
-            Struct struct = (Struct)mapType.getStructOrExceptionOrUnion().get(1);
-            assertEquals("Name is incorrect for Anon Array Type", "X.S", 
-                         struct.getName());            
-            assertEquals("Type is incorrect for Struct Type", "X.S", 
-                         struct.getType().getLocalPart());
-            assertEquals("Name for first Struct Member Type is incorrect", "str", 
-                         struct.getMember().get(0).getName());
-            assertEquals("Idltype for first Struct Member Type is incorrect", "X._1_S", 
-                         struct.getMember().get(0).getIdltype().getLocalPart());        
   
-            assertEquals("Name for second Struct Member Type is incorrect", "fx", 
-                         struct.getMember().get(1).getName());
-            assertEquals("Idltype for second Struct Member Type is incorrect", "X._2_S",

-                         struct.getMember().get(1).getIdltype().getLocalPart());
-            
+                } else if (type instanceof Struct) {
+                    Struct struct = (Struct)type;
+                    String[] testResult;
+                    if ("X.op_a".equals(struct.getName())) {
+                        testResult = new String[]{"X.op_a", "X.op_a", "p1",
+                            "X.S", "p2", "X.S"};
+                    } else if ("X.op_aResult".equals(struct.getName())) {
+                        testResult = new String[]{"X.op_aResult",
+                            "X.op_aResult", "return", "X.S", "p2", "X.S"};
+                    } else {
+                        testResult = new String[]{"X.S", "X.S", "str", 
+                            "X._1_S", "fx", "X._2_S"};
+                    }
+                    assertEquals("Name is incorrect for Anon Array Type",
+                        testResult[0],
+                        struct.getName());            
+                    assertEquals("Type is incorrect for Struct Type", 
+                        testResult[1],
+                        struct.getType().getLocalPart());
+                    assertEquals("Name for first Struct Member Type is incorrect", 
+                        testResult[2],
+                        struct.getMember().get(0).getName());
+                    assertEquals("Idltype for first Struct Member Type is incorrect", 
+                        testResult[3],
+                        struct.getMember().get(0).getIdltype().getLocalPart());         
  
+                    assertEquals("Name for second Struct Member Type is incorrect", 
+                        testResult[4],
+                        struct.getMember().get(1).getName());
+                    assertEquals("Idltype for second Struct Member Type is incorrect", 
+                        testResult[5],
+                        struct.getMember().get(1).getIdltype().getLocalPart());
+                } else {
+                    //System.err.println("Type: " + i + " " + type.getClass().getName());
+                }
+            }    
             File f = new File("atype.idl");
             assertTrue("atype.idl should be generated", f.exists());
         } finally {

Modified: cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java?rev=702870&r1=702869&r2=702870&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToIDLGenerationTest.java
Wed Oct  8 06:37:48 2008
@@ -672,8 +672,14 @@
             idlgen.setGenerateAllBindings(true);            
             idlgen.generateIDL(null);
 
-            InputStream origstream = 
-                getClass().getResourceAsStream("/idlgen/expected_multiplebinding.idl");
+            InputStream origstream;
+            if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+                // The ibm jdk outputs the idl modules in a different order
+                // (still valid idl).
+                origstream = getClass().getResourceAsStream("/idlgen/expected_multiplebinding_ibmjdk.idl");
+            } else {
+                origstream = getClass().getResourceAsStream("/idlgen/expected_multiplebinding.idl");
+            }
             byte orig[] = inputStreamToBytes(origstream);
             checkIDLStrings(orig, idloutput.toByteArray());           
         } finally {



Mime
View raw message