cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r559134 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/service/invoker/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/ rt/frontend/ja...
Date Tue, 24 Jul 2007 17:47:00 GMT
Author: jliu
Date: Tue Jul 24 10:46:59 2007
New Revision: 559134

URL: http://svn.apache.org/viewvc?view=rev&rev=559134
Log:
Rewrite the data flow in dispatch/provider interceptor chain, so that getPayload/setPayload/getMessage etc all works. 

Added:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml   (with props)
Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchInDatabindingInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java Tue Jul 24 10:46:59 2007
@@ -51,8 +51,17 @@
         Method m = md.getMethod(bop);
         //Method m = (Method)bop.getOperationInfo().getProperty(Method.class.getName());
         m = matchMethod(m, serviceObject);
-        List<Object> params = CastUtils.cast((List<?>)o);
-
+        
+        List<Object> params = null;
+        if (o instanceof List) {
+            params = CastUtils.cast((List<?>)o);
+        } else {
+            if (o != null) {
+                params = new ArrayList<Object>();
+                params.add(o);
+            }
+        }
+        
         return invoke(exchange, serviceObject, m, params);
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java Tue Jul 24 10:46:59 2007
@@ -22,6 +22,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.logging.Logger;
 
 import javax.activation.DataSource;
 import javax.xml.bind.JAXBContext;
@@ -47,6 +48,7 @@
 
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.XMLMessage;
@@ -56,7 +58,7 @@
 
 
 public class LogicalMessageImpl implements LogicalMessage {
-
+    private static final Logger LOG = Logger.getLogger(LogicalMessageImpl.class.getName());
     private final LogicalMessageContextImpl msgContext;
     
     public LogicalMessageImpl(LogicalMessageContextImpl lmctx) {
@@ -66,50 +68,49 @@
     public Source getPayload() {
         Source source = null;
 
-        Service.Mode m = msgContext.getWrappedMessage().getExchange().get(Service.Mode.class);
+        Service.Mode mode = msgContext.getWrappedMessage().getExchange().get(Service.Mode.class);
         Message message = msgContext.getWrappedMessage();
         
-        //Have to handle Dispatch differently
-        if (m != null) {
-            //Dispatch case
-            Object obj = message.getContent(Object.class);
+        if (mode != null) {
+            //Dispatch/Provider case
+            Source obj = message.getContent(Source.class);
             if (message instanceof SoapMessage) {
-                SOAPMessage soapMessage = (SOAPMessage)message.getContent(SOAPMessage.class);
-               
-                if (obj instanceof SOAPMessage || soapMessage != null) {
-                    try {
-                        if (!(obj instanceof SOAPMessage)) {
-                            obj = soapMessage;
-                        }
-                        source = new DOMSource(((SOAPMessage)obj).getSOAPBody().getFirstChild());
-                    } catch (SOAPException e) {
-                        // ignore
-                    }                  
-                } else if (obj instanceof Source) {
+                // StreamSource may only be used once, need to make a copy
+                if (obj instanceof StreamSource) {
                     try {
                         CachedOutputStream cos = new CachedOutputStream();
+                        Transformer transformer = XMLUtils.newTransformer();
+                        transformer.transform(obj, new StreamResult(cos));
+
+                        obj = new StreamSource(cos.getInputStream());
+                        message.setContent(Source.class, new StreamSource(cos.getInputStream()));
+                    } catch (Exception e) {
+                        throw new Fault(e);
+                    }
+                }
 
+                if (mode == Service.Mode.PAYLOAD) {
+                    source = (Source)obj;
+                } else {
+                    try {
+                        CachedOutputStream cos = new CachedOutputStream();
                         Transformer transformer = XMLUtils.newTransformer();
-                        transformer.transform((Source)obj, new StreamResult(cos));
+
+                        transformer.transform(obj, new StreamResult(cos));
                         SOAPMessage msg = initSOAPMessage(cos.getInputStream());
                         source = new DOMSource(((SOAPMessage)msg).getSOAPBody().getFirstChild());
                     } catch (Exception e) {
-                        // ignore
-                    }                      
+                        throw new Fault(e);
+                    }
                 }
             } else if (message instanceof XMLMessage) {
-                if (obj instanceof Source) {
+                if (obj != null) {
                     source = (Source)obj;
-                } else if (obj instanceof DataSource) {
-                    try {
-                        source = new StreamSource(((DataSource)obj).getInputStream());
-                    } catch (IOException e) {
-                        // ignore
-                    }
-                } else {
-                    //JAXBElement
-                    source = message.getContent(Source.class);              
-                }              
+                } else if (message.getContent(DataSource.class) != null) {
+                    throw new Fault(new org.apache.cxf.common.i18n.Message(
+                                        "GETPAYLOAD_OF_DATASOURCE_NOT_VALID_XMLHTTPBINDING",
+                                        LOG));
+                }          
             }
         } else {
             source = message.getContent(Source.class);
@@ -122,7 +123,7 @@
                         source = new DOMSource(msg.getSOAPBody().getFirstChild());
                         reader = StaxUtils.createXMLStreamReader(source);
                     } catch (SOAPException e) {
-                        // ignore
+                        throw new Fault(e);
                     }
                 }
 
@@ -134,9 +135,9 @@
                         source = new DOMSource(writer.getDocument().getDocumentElement());
                         reader = StaxUtils.createXMLStreamReader(writer.getDocument());
                     } catch (ParserConfigurationException e) {
-                        throw new WebServiceException(e);
+                        throw new Fault(e);
                     } catch (XMLStreamException e) {
-                        throw new WebServiceException(e);
+                        throw new Fault(e);
                     }
                 }
                 message.setContent(XMLStreamReader.class, reader);
@@ -146,7 +147,7 @@
                 try {
                     writer = new W3CDOMStreamWriter();
                 } catch (ParserConfigurationException e) {
-                    throw new WebServiceException(e);
+                    throw new Fault(e);
                 }
                 XMLStreamReader reader = message.getContent(XMLStreamReader.class);
                 if (reader == null) {
@@ -155,7 +156,7 @@
                 try {
                     StaxUtils.copy(reader, writer);
                 } catch (XMLStreamException e) {
-                    throw new WebServiceException(e);
+                    throw new Fault(e);
                 }
 
                 source = new DOMSource(writer.getDocument().getDocumentElement());
@@ -169,10 +170,33 @@
         return source;
     }
 
-    public void setPayload(Source s) {
-        msgContext.getWrappedMessage().setContent(Source.class, s);
-        XMLStreamReader reader = StaxUtils.createXMLStreamReader(s);
-        msgContext.getWrappedMessage().setContent(XMLStreamReader.class, reader);                
+    public void setPayload(Source s) {       
+        Message message = msgContext.getWrappedMessage();
+        Service.Mode mode = msgContext.getWrappedMessage().getExchange().get(Service.Mode.class);
+        if (mode != null) {
+            if (message instanceof SoapMessage) {
+                if (mode == Service.Mode.MESSAGE) {
+                    try {
+                        // REVISIT: should try to use the original SOAPMessage
+                        // instead of creating a new empty one.
+                        SOAPMessage msg = initSOAPMessage(null);
+                        write(s, msg.getSOAPBody());
+                        s = new DOMSource(((SOAPMessage)msg).getSOAPPart());
+                    } catch (Exception e) {
+                        throw new Fault(e);
+                    }
+                }
+            } else if (message instanceof XMLMessage && message.getContent(DataSource.class) != null) {
+                throw new Fault(
+                                new org.apache.cxf.common.i18n.Message(
+                                    "GETPAYLOAD_OF_DATASOURCE_NOT_VALID_XMLHTTPBINDING",
+                                    LOG));
+            }
+        } else {
+            XMLStreamReader reader = StaxUtils.createXMLStreamReader(s);
+            msgContext.getWrappedMessage().setContent(XMLStreamReader.class, reader);
+        }
+        msgContext.getWrappedMessage().setContent(Source.class, s);          
     }
 
     public Object getPayload(JAXBContext arg0) {
@@ -196,9 +220,8 @@
             throw new WebServiceException(e);
         }
     }
-
    
-    public void write(Source source, Node n) {
+    private void write(Source source, Node n) {
         try {
             if (source instanceof DOMSource && ((DOMSource)source).getNode() == null) {
                 return;
@@ -209,13 +232,17 @@
             StaxUtils.copy(reader, writer);
             reader.close();
         } catch (XMLStreamException e) {
-            // throw new Fault(new Message("COULD_NOT_READ_XML_STREAM",
-            // LOG), e);
+            throw new Fault(e);
         }
-    }      
-    
+    }   
+
     private SOAPMessage initSOAPMessage(InputStream is) throws SOAPException, IOException {
-        SOAPMessage msg = MessageFactory.newInstance().createMessage(null, is);
+        SOAPMessage msg = null;
+        if (is != null) {
+            msg = MessageFactory.newInstance().createMessage(null, is);
+        } else {
+            msg = MessageFactory.newInstance().createMessage();
+        }
         msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
         msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(WSDLConstants.NP_SCHEMA_XSD,
                                                                 WSDLConstants.NU_SCHEMA_XSD);

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties Tue Jul 24 10:46:59 2007
@@ -0,0 +1,22 @@
+#
+#
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements. See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership. The ASF licenses this file
+#    to you under the Apache License, Version 2.0 (the
+#    "License"); you may not use this file except in compliance
+#    with the License. You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing,
+#    software distributed under the License is distributed on an
+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#    KIND, either express or implied. See the License for the
+#    specific language governing permissions and limitations
+#    under the License.
+#
+#
+
+GETPAYLOAD_OF_DATASOURCE_NOT_VALID_XMLHTTPBINDING = GetPayload of DataSource payload is not valid for XML/HTTP binding. 

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java Tue Jul 24 10:46:59 2007
@@ -20,8 +20,6 @@
 package org.apache.cxf.jaxws.handler.soap;
 
 
-import java.io.IOException;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -29,18 +27,12 @@
 import java.util.Set;
 
 import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
 import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPBody;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPHeaderElement;
 import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.stream.StreamResult;
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.soap.SOAPMessageContext;
@@ -48,12 +40,8 @@
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.helpers.XMLUtils;
-import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.message.XMLMessage;
-import org.apache.cxf.wsdl.WSDLConstants;
 
 public class SOAPMessageContextImpl extends WrappedMessageContext implements SOAPMessageContext {
     private static final SAAJInInterceptor SAAJ_IN = new SAAJInInterceptor();
@@ -66,54 +54,30 @@
     }
 
     public void setMessage(SOAPMessage message) {
-        getWrappedMessage().setContent(SOAPMessage.class, message);
+        if (getWrappedMessage().getContent(Object.class) instanceof SOAPMessage) {
+            getWrappedMessage().setContent(Object.class, message);
+        } else {
+            getWrappedMessage().setContent(SOAPMessage.class, message);
+        }
     }
 
     public SOAPMessage getMessage() {
-        SOAPMessage message = getWrappedMessage().getContent(SOAPMessage.class);
+        SOAPMessage message = null;
+        if (getWrappedMessage().getContent(Object.class) instanceof SOAPMessage) {
+            message = (SOAPMessage)getWrappedMessage().getContent(Object.class);
+        } else {
+            message = getWrappedMessage().getContent(SOAPMessage.class);
+        }
+        
+        //Only happens to non-Dispatch/Provider case.
         if (null == message) {
             Boolean outboundProperty = (Boolean)get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-
-            // No SOAPMessage exists yet, so lets create one
             if (!outboundProperty) {
-                if (getWrappedMessage().getContent(Object.class) != null) {
-                    //The Dispatch/Provider case:
-                    Object obj = getWrappedMessage().getContent(Object.class);
-                    if (obj instanceof SOAPMessage) {
-                        message = (SOAPMessage)obj;
-                    } else if (obj instanceof SOAPBody) {
-                        // what to do
-                    } else if (obj instanceof XMLMessage) {
-                        // what to do
-                    }
-                } else {
-                    SAAJ_IN.handleMessage(getWrappedSoapMessage());
-                    message = getWrappedSoapMessage().getContent(SOAPMessage.class);
-                }
-            } else {
-                if (getWrappedMessage().getContent(Object.class) != null) {
-                    //The Dispatch/Provider case:
-                    Object obj = getWrappedMessage().getContent(Object.class);
-                    if (obj instanceof SOAPMessage) {
-                        message = (SOAPMessage)obj;
-                    } else if (obj instanceof Source) {
-                        try {
-                            CachedOutputStream cos = new CachedOutputStream();
-
-                            Transformer transformer = XMLUtils.newTransformer();
-                            transformer.transform((Source)obj, new StreamResult(cos));
-                            message = initSOAPMessage(cos.getInputStream());
-                        } catch (Exception e) {
-                            // ignore
-                        } 
-                    } else if (obj instanceof JAXBElement) {
-                        // what to do
-                    }
-                }
+                //No SOAPMessage exists yet, so lets create one
+                SAAJ_IN.handleMessage(getWrappedSoapMessage());
+                message = getWrappedSoapMessage().getContent(SOAPMessage.class);           
             }
-           
         }
-
         return message;
     }
 
@@ -153,15 +117,5 @@
     private SoapMessage getWrappedSoapMessage() {
         return (SoapMessage)getWrappedMessage();
     }
-    
-    private SOAPMessage initSOAPMessage(InputStream is) throws SOAPException, IOException {
-        SOAPMessage msg = MessageFactory.newInstance().createMessage(null, is);
-        msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
-        msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(WSDLConstants.NP_SCHEMA_XSD,
-                                                                WSDLConstants.NU_SCHEMA_XSD);
-        msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(WSDLConstants.NP_SCHEMA_XSI,
-                                                                WSDLConstants.NU_SCHEMA_XSI);
-
-        return msg;
-    }     
+   
 }

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=559134&r1=559133&r2=559134
==============================================================================
--- 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 24 10:46:59 2007
@@ -29,13 +29,13 @@
 import javax.mail.util.ByteArrayDataSource;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPBody;
 import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.stream.StreamResult;
 import javax.xml.ws.Service;
 import javax.xml.ws.Service.Mode;
 
@@ -46,19 +46,24 @@
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.databinding.DataReader;
-import org.apache.cxf.databinding.DataWriter;
+import org.apache.cxf.databinding.source.NodeDataReader;
+import org.apache.cxf.databinding.source.XMLStreamDataReader;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.StaxInInterceptor;
+import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxb.JAXBDataBinding;
+import org.apache.cxf.jaxws.handler.logical.DispatchLogicalHandlerInterceptor;
+import org.apache.cxf.jaxws.handler.soap.DispatchSOAPHandlerInterceptor;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.XMLMessage;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.staxutils.W3CDOMStreamWriter;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public class DispatchInDatabindingInterceptor extends AbstractInDatabindingInterceptor {
 
@@ -81,11 +86,10 @@
             BindingOperationInfo bop = ep.getEndpointInfo().getBinding().getOperations().iterator().next();
             ex.put(BindingOperationInfo.class, bop);
             getMessageInfo(message, bop);
-        }
-        
-        List<Object> params = new ArrayList<Object>();          
+        }      
         
         if (isGET(message)) {
+            List<Object> params = new ArrayList<Object>();    
             params.add(null);
             message.setContent(List.class, params);
             LOG.info("DispatchInInterceptor skipped in HTTP GET method");
@@ -95,67 +99,40 @@
         try {
             InputStream is = message.getContent(InputStream.class);
             Object obj = null;
-            org.apache.cxf.service.Service service = 
-                message.getExchange().get(org.apache.cxf.service.Service.class);
-            
+            ex.put(Service.Mode.class, mode);            
             
             if (message instanceof SoapMessage) {
                 SOAPMessage soapMessage = newSOAPMessage(is, ((SoapMessage)message).getVersion());
-
-                if (type.equals(SOAPMessage.class)) {
-                    obj = soapMessage;
-                } else if (type.equals(SOAPBody.class)) {
-                    obj = soapMessage.getSOAPBody();
-                } else {
-                    DataReader<Node> dataReader = getDataReader(message, Node.class);
-                    Node n = null;
-                    if (mode == Service.Mode.MESSAGE) {
-                        n = soapMessage.getSOAPPart();
-                    } else if (mode == Service.Mode.PAYLOAD) {
-                        n = DOMUtils.getChild(soapMessage.getSOAPBody(), Node.ELEMENT_NODE);
-                    }
-                    if (Source.class.isAssignableFrom(type)) {
-                        obj = dataReader.read(null, n, type);
-                    } else {
-                        dataReader.setProperty(JAXBDataBinding.UNWRAP_JAXB_ELEMENT, Boolean.FALSE);
-                        obj = dataReader.read(n);
-                    }
-                }
-
+                PostDispatchSOAPHandlerInterceptor postSoap = new PostDispatchSOAPHandlerInterceptor();
+                message.getInterceptorChain().add(postSoap);
+                
+                //soapMessage.writeTo(System.out);
                 message.setContent(SOAPMessage.class, soapMessage);               
             } else if (message instanceof XMLMessage) {
                 if (type.equals(DataSource.class)) {
                     try {
                         obj = new ByteArrayDataSource(is, (String) message.get(Message.CONTENT_TYPE));
-                    } catch (IOException e1) {
-                        e1.printStackTrace();
+                    } catch (IOException e) {
+                        throw new Fault(e);
                     }
-
-                } else {
+                    //Treat DataSource specially here as it is not valid to call getPayload from 
+                    //LogicalHandler for DataSource payload
+                    message.setContent(DataSource.class, obj);  
+                } else {                 
                     new StaxInInterceptor().handleMessage(message);
-
-                    DataReader<XMLStreamReader> dataReader = getDataReader(message);
-                    Class<?> readType = type;
-                    if (readType == Object.class) {
-                        readType = null;
-                    }
-                    obj = dataReader.read(null, message.getContent(XMLStreamReader.class), readType);
                     
+                    DataReader<XMLStreamReader> dataReader = new XMLStreamDataReader();
+                    Class readType = type;
                     if (!Source.class.isAssignableFrom(type)) {
-                        //JAXB, need to make a Source format available for Logical handler                   
-                        DataWriter<XMLStreamWriter> dataWriter =
-                            service.getDataBinding().createWriter(XMLStreamWriter.class);
-                        W3CDOMStreamWriter xmlWriter = new W3CDOMStreamWriter();
-                        dataWriter.write(obj, xmlWriter);                       
-
-                        Source source = new DOMSource(xmlWriter.getDocument().getDocumentElement()); 
-                        message.setContent(Source.class, source);
+                        readType = Source.class;
                     }
+                    obj = dataReader.read(null, message.getContent(XMLStreamReader.class), readType);
+                    message.setContent(Source.class, obj); 
                 }
             }
-            params.add(obj);           
-            message.setContent(Object.class, obj);    
-            message.setContent(List.class, params);
+    
+            PostDispatchLogicalHandlerInterceptor postLogical = new PostDispatchLogicalHandlerInterceptor();
+            message.getInterceptorChain().add(postLogical);      
             
             is.close();
         } catch (Exception e) {
@@ -176,4 +153,134 @@
         }
         return msgFactory.createMessage(headers, is);
     }
+    
+    //This interceptor is invoked after DispatchSOAPHandlerInterceptor, converts SOAPMessage to Source
+    private class PostDispatchSOAPHandlerInterceptor extends AbstractInDatabindingInterceptor {
+
+        public PostDispatchSOAPHandlerInterceptor() {
+            super(Phase.USER_PROTOCOL);
+            addAfter(DispatchSOAPHandlerInterceptor.class.getName());
+        }
+
+        public void handleMessage(Message message) throws Fault {
+            Object obj = null;
+            
+            //Convert SOAPMessage to Source
+            if (message instanceof SoapMessage) {
+                SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
+                message.removeContent(SOAPMessage.class);
+
+                DataReader<Node> dataReader = new NodeDataReader();
+                Node n = null;
+                if (mode == Service.Mode.MESSAGE) {
+                    n = soapMessage.getSOAPPart();
+                } else if (mode == Service.Mode.PAYLOAD) {
+                    try {
+                        n = DOMUtils.getChild(soapMessage.getSOAPBody(), Node.ELEMENT_NODE);
+                    } catch (SOAPException e) {
+                        throw new Fault(e);
+                    }
+                }
+                
+                Class tempType = type;
+                if (!Source.class.isAssignableFrom(type)) {
+                    tempType = Source.class;
+                }
+                obj = dataReader.read(null, n, tempType);
+
+                message.setContent(Source.class, obj);
+            }
+        }
+    }
+    
+    //This interceptor is invoked after DispatchLogicalHandlerInterceptor, converts Source to object
+    private class PostDispatchLogicalHandlerInterceptor extends AbstractInDatabindingInterceptor {
+
+        public PostDispatchLogicalHandlerInterceptor() {
+            super(Phase.USER_LOGICAL);
+            addAfter(DispatchLogicalHandlerInterceptor.class.getName());            
+        }
+
+        public void handleMessage(Message message) throws Fault {
+            Object obj = null;
+
+            //Convert Source to object
+            if (message instanceof SoapMessage) {
+                Source source = message.getContent(Source.class);
+                message.removeContent(Source.class);
+
+                if (SOAPMessage.class.isAssignableFrom(type)) {
+                    try {
+                        CachedOutputStream cos = new CachedOutputStream();
+                        Transformer transformer = XMLUtils.newTransformer();
+                        transformer.transform(source, new StreamResult(cos));
+                        obj = newSOAPMessage(cos.getInputStream(), ((SoapMessage)message).getVersion());
+                    } catch (Exception e) {
+                        throw new Fault(e);
+                    } 
+                } else if (Source.class.isAssignableFrom(type)) {
+                    obj = source;                
+                } else {
+                    //JAXB  
+                    try {                        
+                        obj = convertSourceToJaxb(source, message);                        
+                    } catch (Exception e) {
+                        throw new Fault(e);
+                    }
+                }             
+            } else if (message instanceof XMLMessage) {
+                Source source = message.getContent(Source.class);
+                message.removeContent(Source.class);
+                DataSource dataSource = message.getContent(DataSource.class);
+                message.removeContent(DataSource.class);
+                
+                if (source != null) {
+                    if (Source.class.isAssignableFrom(type)) {
+                        obj = (Source)source;
+                    } else {
+                        //jaxb
+                        try {                        
+                            obj = convertSourceToJaxb(source, message);                        
+                        } catch (Exception e) {
+                            throw new Fault(e);
+                        }
+                    }
+                } else if (dataSource != null && DataSource.class.isAssignableFrom(type)) {
+                    obj = (DataSource)dataSource;
+                }
+                    
+            }
+            message.setContent(Object.class, obj);
+        }
+        
+    }
+    
+    private Object convertSourceToJaxb(Source source, Message message) throws Exception {
+        CachedOutputStream cos = new CachedOutputStream();
+        Transformer transformer = XMLUtils.newTransformer();
+        transformer.transform(source, new StreamResult(cos));
+        String encoding = (String)message.get(Message.ENCODING);
+
+        XMLStreamReader reader = null;
+
+        reader = StaxUtils.getXMLInputFactory().createXMLStreamReader(cos.getInputStream(),
+                                                                      encoding);
+
+        DataReader<XMLStreamReader> dataReader = getDataReader(message);
+        dataReader.setProperty(JAXBDataBinding.UNWRAP_JAXB_ELEMENT, Boolean.FALSE);
+
+        Object obj = dataReader.read(null, reader, null);
+        
+        return obj;
+        
+        //not sure why code below does not work                        
+/*                        
+        DataReader<XMLStreamReader> dataReader1 = 
+            getDataReader(message, XMLStreamReader.class);
+        XMLStreamReader reader1 = 
+            StaxUtils.getXMLInputFactory().createXMLStreamReader(source);
+        dataReader.setProperty(JAXBDataBinding.UNWRAP_JAXB_ELEMENT, Boolean.FALSE);
+        obj = dataReader1.read(null, reader1, null);*/       
+    }
+
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/DispatchOutDatabindingInterceptor.java Tue Jul 24 10:46:59 2007
@@ -28,7 +28,8 @@
 import javax.activation.DataSource;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPException;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPConstants;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Source;
@@ -41,13 +42,21 @@
 
 import org.w3c.dom.Node;
 
+import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataWriter;
+import org.apache.cxf.databinding.source.NodeDataWriter;
+import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.jaxws.handler.logical.DispatchLogicalHandlerInterceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.XMLMessage;
 import org.apache.cxf.phase.Phase;
@@ -79,28 +88,31 @@
         } else {
             obj = message.getContent(Object.class);
         }
+        message.removeContent(Object.class);
 
         if (obj == null) {
             throw new Fault(new org.apache.cxf.common.i18n.Message("DISPATCH_OBJECT_CANNOT_BE_NULL", LOG));
         }
 
         if (message instanceof SoapMessage) {
+            Source source = null;
             if (mode == Service.Mode.PAYLOAD) {
                 if (obj instanceof SOAPMessage || obj instanceof DataSource) {
                     throw new Fault(
                                     new org.apache.cxf.common.i18n.Message(
                                         "DISPATCH_OBJECT_NOT_SUPPORTED_SOAPBINDING",
                                         LOG, obj.getClass(), "PAYLOAD"));
+                } else if (obj instanceof Source) {
+                    source = (Source)obj;
                 } else {
-                    // Input is Source or JAXB in payload mode, need to wrap it
-                    // with a SOAPMessage
+                    //JAXB
                     try {
-                        SOAPMessage msg = initSOAPMessage();
+                        SOAPMessage msg = newSOAPMessage(null, ((SoapMessage)message).getVersion());
                         DataWriter<Node> dataWriter = getDataWriter(message, service, Node.class);
                         dataWriter.write(obj, msg.getSOAPBody());
-                        message.setContent(Object.class, msg);
-                        message.setContent(SOAPMessage.class, msg);
-                    } catch (SOAPException e) {
+                        //msg.writeTo(System.out);
+                        source = new DOMSource(DOMUtils.getChild(msg.getSOAPBody(), Node.ELEMENT_NODE));
+                    } catch (Exception e) {
                         throw new Fault(new org.apache.cxf.common.i18n.Message("EXCEPTION_WRITING_OBJECT",
                                                                                LOG), e);
                     }
@@ -111,12 +123,18 @@
                                     new org.apache.cxf.common.i18n.Message(
                                         "DISPATCH_OBJECT_NOT_SUPPORTED_SOAPBINDING",
                                         LOG, "DataSource", "MESSAGE"));
-                } else if (obj instanceof Source || obj instanceof SOAPMessage) {
-                    // Input is Source or SOAPMessage, no conversion needed
-                } else {
-                    //REVISIT: JAXB element in Message mode, is this a valid input?
-                }
+                } else if (obj instanceof SOAPMessage) {
+                    source = new DOMSource(((SOAPMessage)obj).getSOAPPart());
+                } else if (obj instanceof Source) {
+                    source = (Source)obj;
+                } 
             }
+            
+            PostDispatchOutLogicalHandlerInterceptor postSoap = 
+                new PostDispatchOutLogicalHandlerInterceptor();
+            message.getInterceptorChain().add(postSoap);
+            
+            message.setContent(Source.class, source);
         } else if (message instanceof XMLMessage) {
             if (obj instanceof SOAPMessage) {
                 throw new Fault(
@@ -132,8 +150,10 @@
                                     LOG, "DataSource", "PAYLOAD"));
             }
 
-            if (obj instanceof Source || obj instanceof DataSource) {
-                // no conversion needed
+            if (obj instanceof DataSource) {
+                message.setContent(DataSource.class, obj);
+            } else if (obj instanceof Source) {
+                message.setContent(Source.class, obj);
             } else {
                 // JAXB element
                 try {
@@ -143,11 +163,11 @@
                     dataWriter.write(obj, xmlWriter);                    
 
                     Source source = new DOMSource(xmlWriter.getDocument().getDocumentElement());   
-                    message.setContent(Object.class, source);                
+                    message.setContent(Source.class, source);                
                 } catch (ParserConfigurationException e) {
                     throw new Fault(new org.apache.cxf.common.i18n.Message("EXCEPTION_WRITING_OBJECT",
                                                                            LOG), e);
-                }
+                }                
             }
         }
         message.getInterceptorChain().add(ending);
@@ -160,35 +180,94 @@
         
         public void handleMessage(Message message) throws Fault {
             OutputStream os = message.getContent(OutputStream.class);
-            Object obj = message.getContent(Object.class);
+            
             XMLStreamWriter xmlWriter = message.getContent(XMLStreamWriter.class);
+            SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
+            Source source = message.getContent(Source.class);
+            DataSource dataSource = message.getContent(DataSource.class);
             
             try {
                 if (xmlWriter != null) {
                     xmlWriter.flush();
-                } else if (obj instanceof SOAPMessage) {
-                    ((SOAPMessage)obj).writeTo(os);
-                } else if (obj instanceof Source || obj instanceof DataSource) {
-                    doTransform(obj, os);
+                } else if (soapMessage != null) {
+                    soapMessage.writeTo(os);
+                } else if (source != null) {
+                    doTransform(source, os);
+                } else if (dataSource != null) {
+                    doTransform(dataSource, os);
                 }
 
                 // Finish the message processing, do flush
                 os.flush();
             } catch (Exception ex) {
-                ex.printStackTrace();
-                throw new Fault(new org.apache.cxf.common.i18n.Message("EXCEPTION_WRITING_OBJECT", LOG));
+                throw new Fault(new org.apache.cxf.common.i18n.Message("EXCEPTION_WRITING_OBJECT", LOG, ex));
             }
         }      
     }
+    
+    //This interceptor is invoked after DispatchLogicalHandlerInterceptor, converts Source to SOAPMessage
+    private class PostDispatchOutLogicalHandlerInterceptor extends AbstractInDatabindingInterceptor {
+
+        public PostDispatchOutLogicalHandlerInterceptor() {
+            super(Phase.PRE_MARSHAL);
+            addAfter(DispatchLogicalHandlerInterceptor.class.getName());            
+        }
+
+        public void handleMessage(Message message) throws Fault {
+            Object obj = null;
+            
+            //Convert Source to SOAPMessage
+            if (message instanceof SoapMessage) {
+                Source source = message.getContent(Source.class);
+                message.removeContent(Source.class);
+
+                if (mode == Service.Mode.PAYLOAD) {
+                    // Input is Source in payload mode, need to wrap it
+                    // with a SOAPMessage
+                    try {
+                        obj = newSOAPMessage(null, ((SoapMessage)message).getVersion());
+                        DataWriter<Node> dataWriter = new NodeDataWriter();
+                        dataWriter.write(source, ((SOAPMessage)obj).getSOAPBody());
+                    } catch (Exception e) {
+                        throw new Fault(new org.apache.cxf.common.i18n.Message("EXCEPTION_WRITING_OBJECT",
+                                                                               LOG), e);
+                    }
+                } else {
+                    try {
+                        CachedOutputStream cos = new CachedOutputStream();
+                        Transformer transformer = XMLUtils.newTransformer();
+                        transformer.transform(source, new StreamResult(cos));
+                        obj = newSOAPMessage(cos.getInputStream(), ((SoapMessage)message).getVersion());
+                    } catch (Exception e) {
+                        throw new Fault(e);
+                    }
+                }                
+                message.setContent(SOAPMessage.class, obj);
+            } 
+        }
+    }
+
+    private SOAPMessage newSOAPMessage(InputStream is, SoapVersion version) throws Exception {
+        SOAPMessage msg = null;
         
-    private SOAPMessage initSOAPMessage() throws SOAPException {
-        SOAPMessage msg = MessageFactory.newInstance().createMessage();
+        MimeHeaders headers = new MimeHeaders();
+        MessageFactory msgFactory = null;
+        if (version == null || version instanceof Soap11) {
+            msgFactory = MessageFactory.newInstance();
+        } else if (version instanceof Soap12) {
+            msgFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+        }
+        
+        if (is != null) {
+            msg = msgFactory.createMessage(headers, is);
+        } else {
+            msg = msgFactory.createMessage();
+        }        
         msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
         msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(WSDLConstants.NP_SCHEMA_XSD,
                                                                 WSDLConstants.NU_SCHEMA_XSD);
         msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(WSDLConstants.NP_SCHEMA_XSI,
                                                                 WSDLConstants.NU_SCHEMA_XSI);
-
         return msg;
     }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java Tue Jul 24 10:46:59 2007
@@ -21,6 +21,7 @@
 
 import java.io.InputStream;
 import java.net.URL;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -31,6 +32,9 @@
 import javax.xml.namespace.QName;
 
 import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
@@ -93,7 +97,7 @@
         JAXBElement response = (JAXBElement)disp.invoke(e);
         assertNotNull(response);
         AddNumbersResponse value = (AddNumbersResponse)response.getValue();
-        assertEquals(200, value.getReturn());
+        assertEquals(222, value.getReturn());
     }
 
     @Test
@@ -115,6 +119,7 @@
         DOMSource domReqMessage = new DOMSource(soapReq.getSOAPPart());
 
         DOMSource response = disp.invoke(domReqMessage);
+        //XMLUtils.writeTo(response, System.out);
         assertNotNull(response);
     }
 
@@ -254,9 +259,12 @@
         URL is = getClass().getResource("/messages/XML_GreetMeDocLiteralReq.xml");
         DataSource ds = new URLDataSource(is);
 
-        DataSource response = disp.invoke(ds);
-        assertNotNull(response);
-        //IOUtils.copy(response.getInputStream(), System.out);
+        try {
+            disp.invoke(ds);
+            fail("Did not get expected exception");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
     @Test
@@ -361,6 +369,13 @@
 
                     assertEquals(10, req.getArg0());
                     assertEquals(20, req.getArg1());
+                    
+                    req.setArg0(11);
+                    req.setArg1(21);
+                    ObjectFactory of = new ObjectFactory();
+                    of.createAddNumbers(req);
+                    msg.setPayload(of.createAddNumbers(req), jaxbContext);
+                    
                 } else {
                     LogicalMessage msg = ctx.getMessage();
                     JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
@@ -368,7 +383,13 @@
                     org.apache.handlers.types.AddNumbersResponse res =
                         (org.apache.handlers.types.AddNumbersResponse)payload;
 
-                    assertEquals(200, res.getReturn());
+                    assertEquals(333, res.getReturn());
+                    
+                    res.setReturn(222);
+                    
+                    ObjectFactory of = new ObjectFactory();
+                    msg.setPayload(of.createAddNumbersResponse(res), jaxbContext);                     
+                    
                 }
             } catch (Exception e) {
                 e.printStackTrace();
@@ -385,15 +406,11 @@
 
     class TestHandlerXMLBinding implements LogicalHandler<LogicalMessageContext> {
         public boolean handleMessage(LogicalMessageContext ctx) {
-            try {
-                LogicalMessage msg = ctx.getMessage();
+            LogicalMessage msg = ctx.getMessage();
+
+            Source payload = msg.getPayload();
+            assertNotNull(payload);
 
-                Source payload = msg.getPayload();
-                assertNotNull(payload);
-            } catch (Exception e) {
-                e.printStackTrace();
-                fail(e.toString());
-            }
             return true;
         }
         public boolean handleFault(LogicalMessageContext ctx) {
@@ -406,9 +423,77 @@
     class TestSOAPHandler implements SOAPHandler<SOAPMessageContext> {
         public boolean handleMessage(SOAPMessageContext ctx) {
             try {
-                SOAPMessage msg = ctx.getMessage();
+                Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+                if (outbound) {
+                    SOAPMessage msg = ctx.getMessage();
+                    /*
+                     * System.out.println("-----------soap---------");
+                     * msg.writeTo(System.out);
+                     * System.out.println("-----------soap---------");
+                     */
+
+                    SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
+                    SOAPBody body = env.getBody();
+                    Iterator it = body.getChildElements();
+                    while (it.hasNext()) {
+                        
+                        Object elem = it.next();
+                        if (elem instanceof SOAPElement) {
+
+                            Iterator it2 = ((SOAPElement)elem).getChildElements();
+                            while (it2.hasNext()) {
+                                Object elem2 = it2.next();
+                                if (elem2 instanceof SOAPElement) {
+                                    String value = ((SOAPElement)elem2).getValue();
+                                    String name = ((SOAPElement)elem2).getLocalName();
+                                    if (name.indexOf("arg0") >= 0 && value.equalsIgnoreCase("11")) {
+                                        value = "12";
+                                        ((SOAPElement)elem2).setValue(value);
+                                    }
+                                    if (name.indexOf("arg1") >= 0 && value.equalsIgnoreCase("21")) {
+                                        value = "22";
+                                        ((SOAPElement)elem2).setValue(value);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    msg.saveChanges();           
+                } else {
+                    SOAPMessage msg = ctx.getMessage();
+                    /*
+                     * System.out.println("-----------soap---------");
+                     * msg.writeTo(System.out);
+                     * System.out.println("-----------soap---------");
+                     */
+
+                    SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
+                    SOAPBody body = env.getBody();
+                    Iterator it = body.getChildElements();
+                    while (it.hasNext()) {
+                        
+                        Object elem = it.next();
+                        if (elem instanceof SOAPElement) {
+
+                            Iterator it2 = ((SOAPElement)elem).getChildElements();
+                            while (it2.hasNext()) {
+                                Object elem2 = it2.next();
+                                if (elem2 instanceof SOAPElement) {
+                                    String value = ((SOAPElement)elem2).getValue();
+                                    String name = ((SOAPElement)elem2).getLocalName();
+                                    if (name.indexOf("return") >= 0 && value.equalsIgnoreCase("264")) {
+                                        value = "333";
+                                        ((SOAPElement)elem2).setValue(value);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    msg.saveChanges();                     
+                }
+/*                SOAPMessage msg = ctx.getMessage();
                 //msg.writeTo(System.out);
-                assertNotNull(msg);
+                assertNotNull(msg);*/
             } catch (Exception e) {
                 e.printStackTrace();
                 fail(e.toString());
@@ -416,6 +501,7 @@
 
             return true;
         }
+        
         public final Set<QName> getHeaders() {
             return null;
         }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java Tue Jul 24 10:46:59 2007
@@ -20,6 +20,7 @@
 package org.apache.cxf.systest.provider;
 import java.io.InputStream;
 
+import javax.jws.HandlerChain;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPBody;
@@ -37,7 +38,8 @@
                     serviceName = "SOAPServiceProviderRPCLit",
                     targetNamespace = "http://apache.org/hello_world_rpclit",
                     wsdlLocation = "wsdl/hello_world_rpc_lit.wsdl")
-@ServiceMode(value = Service.Mode.MESSAGE)            
+@ServiceMode(value = Service.Mode.MESSAGE)      
+@HandlerChain(file = "./handlers_invocation.xml", name = "TestHandlerChain")
 public class HWSoapMessageProvider implements Provider<SOAPMessage> {
 
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java Tue Jul 24 10:46:59 2007
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.provider;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import javax.jws.HandlerChain;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Provider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceProvider;
+
+//The following wsdl file is used.
+//wsdlLocation = "/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl"
+@WebServiceProvider(portName = "SoapPortProviderRPCLit3", serviceName = "SOAPServiceProviderRPCLit",
+                      targetNamespace = "http://apache.org/hello_world_rpclit",
+ wsdlLocation = "/wsdl/hello_world_rpc_lit.wsdl")
+@ServiceMode (value = javax.xml.ws.Service.Mode.PAYLOAD)
+@HandlerChain(file = "./handlers_invocation.xml", name = "TestHandlerChain")
+public class HWSourcePayloadProvider implements Provider<Source> {
+    
+    public HWSourcePayloadProvider() {
+    
+    }
+    
+    public Source invoke(Source request) {        
+        try {
+            String input = getSourceAsString(request);
+            System.out.println(input);  
+            
+            if (input.indexOf("ServerLogicalHandler") >= 0) {
+                StreamSource source = new StreamSource();
+                
+                InputStream greetMeInputStream = getClass()
+                    .getResourceAsStream("resources/GreetMeRpcLiteralRespBody.xml");
+
+                source.setInputStream(greetMeInputStream);
+                return source;               
+            }
+
+        } catch (Exception e) {
+            System.out.println("Received an exception while parsing the source");
+            e.printStackTrace();
+        }
+        return null;
+    }
+    
+    public static String getSourceAsString(Source s) throws Exception {
+        Transformer transformer = TransformerFactory.newInstance().newTransformer();
+        transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+        Writer out = new StringWriter();
+        StreamResult streamResult = new StreamResult();
+        streamResult.setWriter(out);
+        transformer.transform(s, streamResult);
+        return streamResult.getWriter().toString();
+    }
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java Tue Jul 24 10:46:59 2007
@@ -98,7 +98,31 @@
 
         doGreeterRPCLit(service, portName, 1);
     }
+    
+    @Test
+    public void testPayloadModeWithSourceData() throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
+        assertNotNull(wsdl);
 
+        QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
+        QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit8");
+
+        SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
+        assertNotNull(service);
+
+        
+        String response1 = new String("TestGreetMeResponseServerLogicalHandlerServerSOAPHandler");
+        try {
+            GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class);
+            String greeting = greeter.greetMe("Milestone-0");
+            assertNotNull("no response received from service", greeting);
+            assertEquals(response1, greeting);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+
+    }
+    
     @Test
     public void testMessageModeWithSAXSourceData() throws Exception {
         URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/Server.java Tue Jul 24 10:46:59 2007
@@ -26,8 +26,12 @@
 public class Server extends AbstractBusTestServerBase {
 
     protected void run() {
-        Object implementor = new HWSoapMessageProvider();
-        String address = "http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1";
+        Object implementor = new HWSourcePayloadProvider();
+        String address = "http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit8";
+        Endpoint.publish(address, implementor);        
+               
+        implementor = new HWSoapMessageProvider();
+        address = "http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1";
         Endpoint.publish(address, implementor);
 
         implementor = new HWDOMSourceMessageProvider();

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java Tue Jul 24 10:46:59 2007
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.provider;
+
+
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.LogicalMessage;
+import javax.xml.ws.handler.LogicalHandler;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+
+public class TestLogicalHandler implements LogicalHandler<LogicalMessageContext> {
+    public boolean handleMessage(LogicalMessageContext ctx) {
+        try {
+            LogicalMessage msg = ctx.getMessage();
+            Source payload = msg.getPayload();
+            String request = getSourceAsString(payload);
+            // System.out.println(getSourceAsString(payload));
+
+            // Make sure SOAP handler has changed the value successfully.
+            if (request.indexOf("ServerSOAPHandler") >= 0) {
+                InputStream greetMeInputStream = getClass()
+                    .getResourceAsStream("resources/GreetMeRpcLiteralReqLogical.xml");
+                StreamSource source = new StreamSource();
+                source.setInputStream(greetMeInputStream);
+                msg.setPayload(source);
+            } else if (request.indexOf("TestGreetMeResponse") >= 0) {
+                InputStream greetMeInputStream = getClass()
+                    .getResourceAsStream("resources/GreetMeRpcLiteralRespLogical.xml");
+                StreamSource source = new StreamSource();
+                source.setInputStream(greetMeInputStream);
+                msg.setPayload(source);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return true;
+    }
+    public boolean handleFault(LogicalMessageContext ctx) {
+        return true;
+    }
+    public void close(MessageContext arg0) {
+    }
+    
+    public static String getSourceAsString(Source s) throws Exception {
+        Transformer transformer = TransformerFactory.newInstance().newTransformer();
+        transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+        Writer out = new StringWriter();
+        StreamResult streamResult = new StreamResult();
+        streamResult.setWriter(out);
+        transformer.transform(s, streamResult);
+        return streamResult.getWriter().toString();
+    }
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestLogicalHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java Tue Jul 24 10:46:59 2007
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.provider;
+
+
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+
+public class TestSOAPHandler implements SOAPHandler<SOAPMessageContext> {
+    public boolean handleMessage(SOAPMessageContext ctx) {
+        try {
+            SOAPMessage msg = ctx.getMessage();
+            /*
+             * System.out.println("-----------soap---------");
+             * msg.writeTo(System.out);
+             * System.out.println("-----------soap---------");
+             */
+
+            SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
+            SOAPBody body = env.getBody();
+            Iterator it = body.getChildElements();
+            while (it.hasNext()) {
+                
+                Object elem = it.next();
+                if (elem instanceof SOAPElement) {
+
+                    Iterator it2 = ((SOAPElement)elem).getChildElements();
+                    while (it2.hasNext()) {
+                        Object elem2 = it2.next();
+                        if (elem2 instanceof SOAPElement) {
+                            String value = ((SOAPElement)elem2).getValue();
+                            if (value.indexOf("Milestone-0") >= 0
+                                || value.indexOf("TestGreetMeResponseServerLogicalHandler") >= 0) {
+                                value = value + "ServerSOAPHandler";
+                                ((SOAPElement)elem2).setValue(value);
+                            }
+                        }
+                    }
+                }
+            }
+            msg.saveChanges();
+
+            /*
+             * System.out.println("-----------soapaf---------");
+             * msg.writeTo(System.out);
+             * System.out.println("-----------soapaf---------");
+             */
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return true;
+    }
+    public final Set<QName> getHeaders() {
+        return null;
+    }
+    public boolean handleFault(SOAPMessageContext ctx) {
+        return true;
+    }
+    public void close(MessageContext arg0) {
+    }
+}
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml Tue Jul 24 10:46:59 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership. The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied. See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+	
+	<!-- ====================== -->
+	<!-- service based handlers -->
+	<!-- ====================== -->
+	<handler-chain>
+		<handler>
+			<handler-name>Handler1</handler-name>
+			<handler-class>
+				org.apache.cxf.systest.provider.TestLogicalHandler
+			</handler-class>
+		</handler>
+		<handler>
+			<handler-name>Handler2</handler-name>
+			<handler-class>
+				org.apache.cxf.systest.provider.TestSOAPHandler
+			</handler-class>
+		</handler>
+	</handler-chain>
+
+</handler-chains>
+
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/handlers_invocation.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml Tue Jul 24 10:46:59 2007
@@ -0,0 +1 @@
+<ns1:greetMe xmlns:ns1="http://apache.org/hello_world_rpclit"><in xmlns:ns2="http://apache.org/hello_world_rpclit/types">Milestone-0-ServerLogicalHandler</in></ns1:greetMe>

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml Tue Jul 24 10:46:59 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<ns4:greetMeResponse xmlns:ns4="http://apache.org/hello_world_rpclit">
+  <out>TestGreetMeResponse</out>
+</ns4:greetMeResponse>
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespBody.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml?view=auto&rev=559134
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml Tue Jul 24 10:46:59 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<ns4:greetMeResponse xmlns:ns4="http://apache.org/hello_world_rpclit">
+  <out>TestGreetMeResponseServerLogicalHandler</out>
+</ns4:greetMeResponse>
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralRespLogical.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl?view=diff&rev=559134&r1=559133&r2=559134
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_rpc_lit.wsdl Tue Jul 24 10:46:59 2007
@@ -206,7 +206,12 @@
 			<soap:address
 				location="http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit7" />
 		</wsdl:port>
-	</wsdl:service>
+		<wsdl:port binding="tns:Greeter_SOAPBinding_RPCLit"
+			name="SoapPortProviderRPCLit8">
+			<soap:address
+				location="http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit8" />
+		</wsdl:port>
+        </wsdl:service>
 
 	<wsdl:service name="SOAPServiceRPCLit1">
 		<wsdl:port binding="tns:Greeter_SOAPBinding_RPCLit"
@@ -255,5 +260,13 @@
 				location="http://localhost:9002/SOAPServiceRPCLit/SoapPort6" />
 		</wsdl:port>
 	</wsdl:service>
-
+	
+	<wsdl:service name="SOAPServiceRPCLit8">
+		<wsdl:port binding="tns:Greeter_SOAPBinding_RPCLit"
+			name="SoapPortRPCLit8">
+			<soap:address
+				location="http://localhost:9002/SOAPServiceRPCLit/SoapPort8" />
+		</wsdl:port>
+	</wsdl:service>
+	
 </wsdl:definitions>



Mime
View raw message