cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r561640 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
Date Wed, 01 Aug 2007 04:20:36 GMT
Author: jliu
Date: Tue Jul 31 21:20:33 2007
New Revision: 561640

URL: http://svn.apache.org/viewvc?view=rev&rev=561640
Log:
Fixed the broken dispatch_provider sample. This is a problem caused by SAAJ. SOAPMessage.getSOAPPart()
wont return a fully initialized Node object without calling SOAPMessage.getSOAPPart().getEnvelope()


Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java?view=diff&rev=561640&r1=561639&r2=561640
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
Tue Jul 31 21:20:33 2007
@@ -181,7 +181,14 @@
                 DataReader<Node> dataReader = new NodeDataReader();
                 Node n = null;
                 if (mode == Service.Mode.MESSAGE) {
-                    n = soapMessage.getSOAPPart();
+                    try {
+                        n = soapMessage.getSOAPPart();
+                        //This seems to be a problem in SAAJ. Envelope might not be initialized
properly 
+                        //without calling getEnvelope()
+                        soapMessage.getSOAPPart().getEnvelope();
+                    } catch (SOAPException e) {
+                        throw new Fault(e);
+                    } 
                 } else if (mode == Service.Mode.PAYLOAD) {
                     try {
                         n = DOMUtils.getChild(soapMessage.getSOAPBody(), Node.ELEMENT_NODE);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java?view=diff&rev=561640&r1=561639&r2=561640
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
Tue Jul 31 21:20:33 2007
@@ -31,8 +31,6 @@
 import javax.xml.ws.WebServiceProvider;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.helpers.XMLUtils;
-
 
 //The following wsdl file is used.
 //wsdlLocation = "/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl"
@@ -64,7 +62,7 @@
     }
 
     public DOMSource invoke(DOMSource request) {
-        XMLUtils.writeTo(request, System.out);
+        //XMLUtils.writeTo(request, System.out);
         DOMSource response = new DOMSource();
         try {
             SOAPMessage msg = factory.createMessage();



Mime
View raw message