Author: dkulp
Date: Thu Sep  6 09:43:00 2007
New Revision: 573321

URL: http://svn.apache.org/viewvc?rev=573321&view=rev
Log:
[CXF-975] Patch from Sergey Beryozkin applied
Couple other random fixes

Modified:
    
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/client.xml
    
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/server.xml
    
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/headers/HeaderManagerImpl.java
    
incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
    
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java

Modified: 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/client.xml
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/client.xml?rev=573321&r1=573320&r2=573321&view=diff
==============================================================================
--- 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/client.xml 
(original)
+++ 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/client.xml 
Thu Sep  6 09:43:00 2007
@@ -20,12 +20,12 @@
 <beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:cxf="http://cxf.apache.org/core";
-       xmlns:p="http://cxf.apache.org/policy-config";
+       xmlns:p="http://cxf.apache.org/policy";
        xmlns:http="http://cxf.apache.org/transports/http/configuration";
        xsi:schemaLocation="
 http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
-http://cxf.apache.org/policy-config 
http://cxf.apache.org/schemas/policy-config.xsd
+http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
 http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
   
     <http:conduit 
name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit";>

Modified: 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/server.xml
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/server.xml?rev=573321&r1=573320&r2=573321&view=diff
==============================================================================
--- 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/server.xml 
(original)
+++ 
incubator/cxf/trunk/distribution/src/main/release/samples/ws_policy/server.xml 
Thu Sep  6 09:43:00 2007
@@ -20,10 +20,10 @@
 <beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:cxf="http://cxf.apache.org/core";
-       xmlns:p="http://cxf.apache.org/policy-config";
+       xmlns:p="http://cxf.apache.org/policy";
        xsi:schemaLocation="
 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
-http://cxf.apache.org/policy-config 
http://cxf.apache.org/schemas/policy-config.xsd
+http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
 http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
 
     <cxf:bus>

Modified: 
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/headers/HeaderManagerImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/headers/HeaderManagerImpl.java?rev=573321&r1=573320&r2=573321&view=diff
==============================================================================
--- 
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/headers/HeaderManagerImpl.java
 (original)
+++ 
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/headers/HeaderManagerImpl.java
 Thu Sep  6 09:43:00 2007
@@ -47,6 +47,9 @@
     }
     
     public HeaderProcessor getHeaderProcessor(String namespace) {
+        if (namespace == null) {
+            namespace = "";
+        }
         return processors.get(namespace);
     }
 

Modified: 
incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java?rev=573321&r1=573320&r2=573321&view=diff
==============================================================================
--- 
incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
 (original)
+++ 
incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/namespaces/NamespaceConfusionTest.java
 Thu Sep  6 09:43:00 2007
@@ -41,6 +41,13 @@
 import org.junit.Before;
 import org.junit.Test;
 
+
+/** 
+ * Regression test for CXF-959. This is a point test for consistent 
+ * use of namespace prefixes in generated WSDL/XMLSchema. This test could 
+ * be made into a more comprehensive functional test by exercising
+ * cases such as multiple schema.
+ */
 public class NamespaceConfusionTest extends AbstractAegisTest {
     
     private TypeMapping tm;

Modified: 
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java?rev=573321&r1=573320&r2=573321&view=diff
==============================================================================
--- 
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java
 (original)
+++ 
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java
 Thu Sep  6 09:43:00 2007
@@ -35,7 +35,7 @@
 
 public class JAXBAttachmentMarshaller extends AttachmentMarshaller {
 
-    private static final int THRESH_HOLD = 5 * 1024;
+    private static final int THRESHOLD = 5 * 1024;
     private Collection<Attachment> atts;
     private boolean isXop;
 
@@ -56,7 +56,7 @@
             mimeType = "application/octet-stream";
         }
         if ("application/octet-stream".equals(mimeType)
-            && length < THRESH_HOLD) {
+            && length < THRESHOLD) {
             return null;
         }
         ByteDataSource source = new ByteDataSource(data, offset, length);
@@ -86,10 +86,10 @@
             try {
                 Object o = handler.getContent();
                 if (o instanceof String 
-                    && ((String)o).length() < THRESH_HOLD) {
+                    && ((String)o).length() < THRESHOLD) {
                     return null;
                 } else if (o instanceof byte[]
-                            && ((byte[])o).length < THRESH_HOLD) {
+                            && ((byte[])o).length < THRESHOLD) {
                     return null;
                 }
             } catch (IOException e1) {


Reply via email to