cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r439963 - in /incubator/cxf/trunk: common/src/main/java/org/apache/cxf/staxutils/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ rt/core/src/main/java/org/...
Date Mon, 04 Sep 2006 07:25:26 GMT
Author: ffang
Date: Mon Sep  4 00:25:22 2006
New Revision: 439963

URL: http://svn.apache.org/viewvc?view=rev&rev=439963
Log:
get operation parameter in soap header working
1. write message part info into soap header
2. read message part info from soap header
3. find operation from message part infos

Modified:
    incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Sep
 4 00:25:22 2006
@@ -21,6 +21,7 @@
 
 import java.io.*;
 import java.util.*;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
@@ -35,12 +36,15 @@
 import org.w3c.dom.*;
 
 import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.helpers.XMLUtils;
 
 public final class StaxUtils {
 
+    private static final Logger LOG = Logger.getLogger(StaxUtils.class.getName());
+    
     private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance();
     private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance();
-
+    
     private static final String XML_NS = "http://www.w3.org/2000/xmlns/";
     
     private StaxUtils() {
@@ -670,6 +674,16 @@
             }
 
             n++;
+        }
+    }
+    
+
+    public static void printXmlFragment(XMLStreamReader reader) {
+        XMLUtils.setIndention(4);
+        try {
+            LOG.info(XMLUtils.toString(StaxUtils.read(reader)));
+        } catch (XMLStreamException e) {
+            LOG.severe(e.getMessage());
         }
     }
 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
Mon Sep  4 00:25:22 2006
@@ -49,6 +49,8 @@
 
     public void handleMessage(SoapMessage message) {
         XMLStreamReader xmlReader = message.getContent(XMLStreamReader.class);
+        
+                
         if (xmlReader == null) {
             InputStream in = (InputStream)message.getContent(InputStream.class);
             if (in == null) {
@@ -75,6 +77,7 @@
                         Element element = (Element)envelop.getChildNodes().item(i);
                         if (element.getLocalName().equals(header)) {
                             message.setHeaders(Element.class, element);
+                            message.put(Element.class, element);
                         }
                     }
                 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Mon Sep  4 00:25:22 2006
@@ -20,26 +20,40 @@
 package org.apache.cxf.binding.soap.interceptor;
 
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.ResourceBundle;
 
 
 
+import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-
 import org.w3c.dom.Element;
 
+
+
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.databinding.DataWriter;
+import org.apache.cxf.databinding.DataWriterFactory;
 
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.ServiceModelUtil;
 import org.apache.cxf.staxutils.StaxUtils;
 
+
 public class SoapOutInterceptor extends AbstractSoapInterceptor {
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(SoapOutInterceptor.class);
 
@@ -69,15 +83,14 @@
                                   soapVersion.getNamespace());
             xtw.writeNamespace(soapVersion.getPrefix(), soapVersion.getNamespace());
             
-            //handleHeaderPart(message);
-
             Element eleHeaders = message.getHeaders(Element.class);
-            
-
             if (eleHeaders != null) {
                 StaxUtils.writeElement(eleHeaders, xtw, true);
-            }
+            } else {
             
+                handleHeaderPart(message);
+            }
+       
             xtw.writeStartElement(soapVersion.getPrefix(), 
                                   soapVersion.getBody().getLocalPart(),
                                   soapVersion.getNamespace());
@@ -98,21 +111,32 @@
         }
     }
     
-    /*private void handleHeaderPart(SoapMessage message) {
+    private void handleHeaderPart(SoapMessage message) {
         //add MessagePart to soapHeader if necessary
         Exchange exchange = message.getExchange();
         BindingOperationInfo operation = (BindingOperationInfo)exchange.get(BindingOperationInfo.class
                                                                             .getName());
-        Element soapHeaders = message.getHeaders(Element.class);
-         
-         
-         
+        if (operation == null) {
+            return;
+        }
+        XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
+        
+        boolean hasHeader = false;
+                 
         int countParts = 0;
         List<MessagePartInfo> parts = null;
         if (!isRequestor(message)) {
-            parts = operation.getOutput().getMessageInfo().getMessageParts();
+            if (operation.getOperationInfo().hasOutput()) {
+                parts = operation.getOutput().getMessageInfo().getMessageParts();
+            } else {
+                parts = new ArrayList<MessagePartInfo>();
+            }
         } else {
-            parts = operation.getInput().getMessageInfo().getMessageParts();
+            if (operation.getOperationInfo().hasInput()) {
+                parts = operation.getInput().getMessageInfo().getMessageParts();
+            } else {
+                parts = new ArrayList<MessagePartInfo>();
+            }
         }
         countParts = parts.size();
  
@@ -126,40 +150,67 @@
                                    new RuntimeException("The number of arguments is not equal!"));
             }
  
+            SoapVersion soapVersion = message.getVersion();
             for (int idx = 0; idx < countParts; idx++) {
-                //Object arg = args[idx];
+                Object arg = args[idx];
                 MessagePartInfo part = (MessagePartInfo)els[idx];
                 if (!part.isInSoapHeader()) {
-                    //this part should be in header, so write to header
                     continue;
-                }
-                 
-                // todo write to header
-                if (soapHeaders == null) {
-                    DocumentBuilder builder = null;
-                    try {
-                        builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-                    } catch (ParserConfigurationException e) {
-                        e.printStackTrace();
+                } else {
+                    if (!hasHeader) {
+                        try {
+                            xtw.writeStartElement(soapVersion.getPrefix(), 
+                                                  soapVersion.getHeader().getLocalPart(),
+                                                  soapVersion.getNamespace());
+                        } catch (XMLStreamException e) {
+                            throw new SoapFault(
+                                new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE),

+                                e, SoapFault.SENDER);
+                        }
                     }
-                    Document doc = builder.newDocument();
-                    SoapVersion version = message.getVersion();
-                    soapHeaders =
-                        doc.createElementNS(version.getNamespace(), version.getHeader().getLocalPart());
-                    QName headerPartQName = ServiceModelUtil.getPartName(part);
-                    soapHeaders.appendChild(
-                        doc.createElementNS(
-                            headerPartQName.getNamespaceURI(), headerPartQName.getLocalPart()));
+                    QName elName = ServiceModelUtil.getPartName(part);
+                    DataWriter<XMLStreamWriter> dataWriter = getDataWriter(message);
+                    dataWriter.write(arg, elName, xtw);
+                        
+                    hasHeader = true;
                 }
                  
             }
+            if (hasHeader) {
+                try {
+                    xtw.writeEndElement();
+                } catch (XMLStreamException e) {
+                    throw new SoapFault(
+                        new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE),

+                        e, SoapFault.SENDER);
+                }
+            }
         }
-        message.setHeaders(Element.class, soapHeaders);
+
 
     }       
     
     protected boolean isRequestor(Message message) {
         return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
-    }*/
+    }
 
+    protected DataWriter<XMLStreamWriter> getDataWriter(Message message) {
+        Service service = ServiceModelUtil.getService(message.getExchange());
+        DataWriterFactory factory = service.getDataWriterFactory();
+
+        DataWriter<XMLStreamWriter> dataWriter = null;
+        for (Class<?> cls : factory.getSupportedFormats()) {
+            if (cls == XMLStreamWriter.class) {
+                dataWriter = factory.createWriter(XMLStreamWriter.class);
+                break;
+            }
+        }
+
+        if (dataWriter == null) {
+            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAWRITER", BUNDLE,
service
+                .getName()));
+        }
+
+        return dataWriter;
+    }
 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
Mon Sep  4 00:25:22 2006
@@ -56,6 +56,9 @@
     protected PhaseInterceptorChain chain;
     protected SoapMessage soapMessage;
 
+    
+    
+    
     public void setUp() throws Exception {
         List<Phase> phases = new ArrayList<Phase>();
         Phase phase1 = new Phase("phase1", 1);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
Mon Sep  4 00:25:22 2006
@@ -19,14 +19,19 @@
 
 package org.apache.cxf.interceptor;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
 
 import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.stream.XMLStreamReader;
 
+import org.w3c.dom.Node;
+
+
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataReaderFactory;
@@ -81,16 +86,48 @@
         }
         return dataReader;
     }
+    
+    protected DataReader<Node> getNodeDataReader(Message message) {
+        Service service = ServiceModelUtil.getService(message.getExchange());
+        DataReaderFactory factory = service.getDataReaderFactory();
+
+        DataReader<Node> dataReader = null;
+        for (Class<?> cls : factory.getSupportedFormats()) {
+            if (cls == Node.class) {
+                dataReader = factory.createReader(Node.class);
+                break;
+            }
+        }
+        if (dataReader == null) {
+            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER", BUNDLE,

+                service.getName()));
+        }
+        return dataReader;
+    }
 
     protected DepthXMLStreamReader getXMLStreamReader(Message message) {
         XMLStreamReader xr = message.getContent(XMLStreamReader.class);
         return new DepthXMLStreamReader(xr);
     }
 
-    protected OperationInfo findOperation(Collection<OperationInfo> operations, List<Object>
parameters) {
+    protected OperationInfo findOperation(Collection<OperationInfo> operations, 
+                                          List<Object> parameters, boolean isRequestor)
{
         // first check for exact matches
         for (OperationInfo o : operations) {
-            List messageParts = o.getInput().getMessageParts();
+            List messageParts = null;
+            if (isRequestor) {
+                if (o.hasOutput()) {
+                    messageParts = o.getOutput().getMessageParts();
+                } else {
+                    messageParts = new ArrayList();
+                }
+            } else {
+                if (o.hasInput()) {
+                    messageParts = o.getInput().getMessageParts();
+                } else {
+                    messageParts = new ArrayList();
+                }
+            }
             if (messageParts.size() == parameters.size() 
                     && checkExactParameters(messageParts, parameters)) {
                 return o;
@@ -122,10 +159,18 @@
         Iterator messagePartIterator = messageParts.iterator();
         for (Iterator parameterIterator = parameters.iterator(); parameterIterator.hasNext();)
{
             Object param = parameterIterator.next();
+            JAXBElement paramEl = null;
+            MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
             if (param instanceof JAXBElement) {
-                JAXBElement paramEl = (JAXBElement)param;
-                MessagePartInfo mpi = (MessagePartInfo)messagePartIterator.next();
+                paramEl = (JAXBElement)param;
                 if (!mpi.getElementQName().equals(paramEl.getName())) {
+                    return false;
+                }
+            } else {
+                
+                if (!mpi.getElementQName().getLocalPart().equals(
+                    param.getClass().getAnnotation(XmlRootElement.class).name())) {
+               
                     return false;
                 }
             }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/BareInInterceptor.java
Mon Sep  4 00:25:22 2006
@@ -26,6 +26,9 @@
 import javax.xml.bind.JAXBElement;
 import javax.xml.stream.XMLStreamReader;
 
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Exchange;
@@ -33,6 +36,7 @@
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -53,30 +57,40 @@
         DataReader<XMLStreamReader> dr = getDataReader(message);
         List<Object> parameters = new ArrayList<Object>();
 
-        //StaxUtils.nextEvent(xmlReader);
         while (StaxUtils.toNextElement(xmlReader)) {
             Object o = dr.read(xmlReader);
             
             parameters.add(o);
         }
 
-        // If we didn't know the operation going into this, lets try to figure
-        // it out
-        if (operation == null) {
-            Endpoint ep = exchange.get(Endpoint.class);
-            Service service = ep.getService();
+        Endpoint ep = exchange.get(Endpoint.class);
+        Service service = ep.getService();
 
+        if (message.get(Element.class) != null) {
+            parameters.addAll(abstractParamsFromHeader(message.get(Element.class), ep, message));
+        }
+        
+        if (operation == null) {
+            
+            // If we didn't know the operation going into this, lets try to figure
+            // it out
+            
             OperationInfo op = findOperation(service.getServiceInfo().getInterface().getOperations(),
-                                             parameters);
+                                             parameters, isRequestor(message));
+            
 
             for (BindingOperationInfo bop : ep.getEndpointInfo().getBinding().getOperations())
{
                 if (bop.getOperationInfo().equals(op)) {
+                    operation = bop;
                     exchange.put(BindingOperationInfo.class, bop);
                     exchange.setOneWay(bop.getOutput() == null);
                     break;
                 }
             }
         }
+        
+        
+        
         List<Object> newParameters = new ArrayList<Object>();
         for (Iterator iter = parameters.iterator(); iter.hasNext();) {
             Object element = (Object)iter.next();
@@ -86,6 +100,44 @@
             newParameters.add(element);
             
         }
+       
         message.setContent(List.class, newParameters);
+    }
+    
+    private List<Object> abstractParamsFromHeader(Element headerElement, Endpoint ep,
 
+                                                  Message message) {
+ 
+        List<Object> paramInHeader = new ArrayList<Object>();
+        List<MessagePartInfo> parts = null;
+        for (BindingOperationInfo bop : ep.getEndpointInfo().getBinding().getOperations())
{
+           
+            if (isRequestor(message)) {
+                parts = bop.getOutput().getMessageInfo().getMessageParts();
+            } else {
+                parts = bop.getInput().getMessageInfo().getMessageParts();
+            }
+                        
+            
+            for (MessagePartInfo mpi : parts) {
+                if (mpi.isInSoapHeader()) {
+                    NodeList nodeList = headerElement.getChildNodes();
+                    if (nodeList != null) {
+                        for (int i = 0; i < nodeList.getLength(); i++) {
+                            if (nodeList.item(i).getNamespaceURI().equals(
+                                mpi.getElementQName().getNamespaceURI()) 
+                                && nodeList.item(i).getLocalName().equals(
+                                    mpi.getElementQName().getLocalPart())) {
+                                Element param = (Element)nodeList.item(i);
+                                paramInHeader.add(getNodeDataReader(message).read(param));
+                            }
+                        }
+                        
+                    }
+                    
+                }
+            }
+        }
+                            
+        return paramInHeader;
     }
 }

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
Mon Sep  4 00:25:22 2006
@@ -54,9 +54,8 @@
         
         BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);
         assertNotNull(bop);
-        // this doesn't pass yet as we can't introspect the message part type classes to
find
-        // the correct operation. One possibility is to try to match QNames instead.
-        // assertEquals("greetMe", bop.getName().getLocalPart());
+        
+        assertEquals("greetMe", bop.getName().getLocalPart());
     }
 
     public void testInterceptorOutbound() throws Exception {
@@ -64,7 +63,7 @@
 
         message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
             .createXMLStreamReader(getTestStream(getClass(), "resources/GreetMeDocLiteralResp.xml")));
-
+        message.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
         interceptor.handleMessage(message);
 
         List<?> parameters = message.getContent(List.class);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/ClientServerTest.java
Mon Sep  4 00:25:22 2006
@@ -91,7 +91,7 @@
                 assertTrue("server did not launch correctly", launchServer(Server.class));
             }
         };
-        
+                
         
         
     }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java?view=diff&rev=439963&r1=439962&r2=439963
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/HeaderClientServerTest.java
Mon Sep  4 00:25:22 2006
@@ -33,7 +33,7 @@
 import junit.framework.TestSuite;
 
 
-//import org.apache.cxf.systest.common.ClientServerSetupBase;
+
 import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.common.ClientServerTestBase;
 import org.apache.cxf.systest.common.TestServerBase;
@@ -90,8 +90,6 @@
             }
         };
         
-        
-
     }  
 
     
@@ -112,10 +110,8 @@
                 assertEquals(TestHeader1.class.getSimpleName(), returnVal.getResponseType());
             }
         } catch (UndeclaredThrowableException ex) {
-            //throw (Exception)ex.getCause();
-        } catch (Exception e) {
-            //should get Exception since Holder is not supported now
-        }
+            throw (Exception)ex.getCause();
+        } 
     } 
 
     /*public void testOutHeader() throws Exception {



Mime
View raw message