cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r559856 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/staxutils/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/core/src/main/java/org/apache/cxf/attachment/ rt/core/src/test/java/org/apache/cxf/attac...
Date Thu, 26 Jul 2007 15:37:06 GMT
Author: dandiep
Date: Thu Jul 26 08:37:02 2007
New Revision: 559856

URL: http://svn.apache.org/viewvc?view=rev&rev=559856
Log:
CXF-846: Remove the charset=utf-8 from start-info in MTOM Content-Type because tomcat barfs
on it.

CXF-749: Wire in the HTTPSession for the servlet/jetty transports. Will add a unit test for
this shortly.

Improve fault code parsing since it was creating fault codes like null:Foo.

Change the impl generation in wsdl2java to not call class.getPackage() as that doesn't work
on all classloaders.



Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentSerializerTest.java
    incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Thu Jul 26 08:37:02 2007
@@ -767,10 +767,14 @@
         String localName = value.substring(index + 1);
         String ns = reader.getNamespaceURI(prefix);
 
-        if (ns == null || localName == null) {
+        if ((prefix != null && ns == null) || localName == null) {
             throw new RuntimeException("Invalid QName in mapping: " + value);
         }
 
+        if (ns == null) {
+            return new QName(localName);
+        }
+        
         return new QName(ns, localName, prefix);
     }
     

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
Thu Jul 26 08:37:02 2007
@@ -84,7 +84,7 @@
             codePrefix = prefix;
         }
         
-        return prefix + ":" + fCode.getLocalPart();        
+        return codePrefix + ":" + fCode.getLocalPart();        
     }
 
     public String getReason() {

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
Thu Jul 26 08:37:02 2007
@@ -71,8 +71,6 @@
             .append(">\"; ")
             .append("start-info=\"")
             .append(bodyCt)
-            .append("; charset=")
-            .append(enc)
             .append("\"");
         
         message.put(Message.CONTENT_TYPE, ct.toString());

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentSerializerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentSerializerTest.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentSerializerTest.java
(original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentSerializerTest.java
Thu Jul 26 08:37:02 2007
@@ -70,7 +70,7 @@
         String ct = (String) msg.get(Message.CONTENT_TYPE);
         assertTrue(ct.indexOf("multipart/related;") == 0);
         assertTrue(ct.indexOf("start=\"<root.message@cxf.apache.org>\"") > -1);
-        assertTrue(ct.indexOf("start-info=\"application/soap+xml; charset=UTF-8\"") >
-1);
+        assertTrue(ct.indexOf("start-info=\"application/soap+xml\"") > -1);
         out.write("<soap:Body/>".getBytes());
         
         serializer.writeAttachments();
@@ -132,7 +132,7 @@
         String ct = (String) msg.get(Message.CONTENT_TYPE);
         assertTrue(ct.indexOf("multipart/related;") == 0);
         assertTrue(ct.indexOf("start=\"<root.message@cxf.apache.org>\"") > -1);
-        assertTrue(ct.indexOf("start-info=\"application/soap+xml; charset=UTF-8\"") >
-1);
+        assertTrue(ct.indexOf("start-info=\"application/soap+xml\"") > -1);
         
         out.write("<soap:Body/>".getBytes());
         

Modified: incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Thu Jul 26 08:37:02 2007
@@ -33,12 +33,14 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
+import org.apache.cxf.transport.http.HTTPSession;
 import org.apache.cxf.transport.https.SSLUtils;
 import org.apache.cxf.transports.http.QueryHandler;
 import org.apache.cxf.transports.http.QueryHandlerRegistry;
@@ -250,6 +252,10 @@
             
             SSLUtils.propogateSecureSession(req, inMessage);
 
+            ExchangeImpl exchange = new ExchangeImpl();
+            exchange.setInMessage(inMessage);
+            exchange.setSession(new HTTPSession(req));
+            
             incomingObserver.onMessage(inMessage);
 
             resp.flushBuffer();

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Thu Jul 26 08:37:02 2007
@@ -33,11 +33,13 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
+import org.apache.cxf.transport.http.HTTPSession;
 import org.apache.cxf.transport.https.SSLUtils;
 import org.apache.cxf.transports.http.QueryHandler;
 import org.apache.cxf.transports.http.QueryHandlerRegistry;
@@ -221,6 +223,11 @@
             
             inMessage.put(Message.ENCODING, enc);
             SSLUtils.propogateSecureSession(request, inMessage);
+            
+            ExchangeImpl exchange = new ExchangeImpl();
+            exchange.setInMessage(inMessage);
+            exchange.setSession(new HTTPSession(request));
+            
             d.doMessage(inMessage);
         } catch (IOException e) {
             throw new ServletException(e);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
Thu Jul 26 08:37:02 2007
@@ -63,7 +63,7 @@
         props.put(Message.MTOM_ENABLED, "true");
         sf.setProperties(props);
         sf.create();
-
+        
         EndpointInfo ei = new EndpointInfo(null, HTTP_ID);
         ei.setAddress(address);
 
@@ -77,7 +77,7 @@
         Message m = new MessageImpl();
         String ct = "multipart/related; type=\"application/xop+xml\"; "
                     + "start=\"<soap.xml@xfire.codehaus.org>\"; "
-                    + "start-info=\"text/xml; charset=utf-8\"; "
+                    + "start-info=\"text/xml\"; "
                     + "boundary=\"----=_Part_4_701508.1145579811786\"";
 
         m.put(Message.CONTENT_TYPE, ct);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?view=diff&rev=559856&r1=559855&r2=559856
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
Thu Jul 26 08:37:02 2007
@@ -42,7 +42,7 @@
                       
 public class ${intf.Name}Impl implements $intf.Name {
 
-    private static final Logger LOG = Logger.getLogger(${intf.Name}Impl.class.getPackage().getName());
+    private static final Logger LOG = Logger.getLogger(${intf.Name}Impl.class.getName());
 
 #foreach ($method in $intf.Methods)
     /* (non-Javadoc)



Mime
View raw message