[jboss-svn-commits] JBossWS SVN: r886 - in branches/tdiesler/trunk/src: main/java/javax/xml/ws main/java/javax/xml/ws/handler main/java/org/jboss/ws/binding/soap main/java/org/jboss/ws/common main/java/org/jboss/ws/deployment main/java/org/jboss/ws/handler main/java/org/jboss/ws/jaxrpc/handler main/java/org/jboss/ws/jaxws/client main/java/org/jboss/ws/jaxws/core main/java/org/jboss/ws/jaxws/handler main/java/org/jboss/ws/server main/java/org/jboss/ws/soap main/java/org/jboss/ws/soap/attachment test test/ant test/java/org/jboss/test/ws/jaxws test/java/org/jboss/test/ws/jaxws/logicalhandler test/resources/addressing/action/Doc-META-INF/wsdl test/resources/jaxws test/resources/jaxws/logicalhandler test/resources/jaxws/logicalhandler/META-INF test/resources/jaxws/logicalhandler/META-INF/wsdl test/resources/jaxws/logicalhandler/WEB-INF

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Sep 1 14:21:02 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-09-01 14:19:58 -0400 (Fri, 01 Sep 2006)
New Revision: 886

Added:
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericLogicalHandler.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageContextImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementWriter.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ClientHandler.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/Echo.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/EchoResponse.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalHandlerTestCase.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ObjectFactory.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/package-info.java
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/TestService.wsdl
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/jaxws-server-handlers.xml
   branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/web.xml
Removed:
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java
Modified:
   branches/tdiesler/trunk/src/main/java/javax/xml/ws/LogicalMessage.java
   branches/tdiesler/trunk/src/main/java/javax/xml/ws/handler/Handler.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonClient.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonMessageContext.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/handler/HandlerChainBaseImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/SOAPMessageContextJAXWS.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementMessage.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementRpc.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPEnvelopeImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPFaultImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPHeaderImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedSwAEncoder.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedXOPEncoder.java
   branches/tdiesler/trunk/src/test/ant/build-jars.xml
   branches/tdiesler/trunk/src/test/build.xml
   branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
Log:
JAXWS logical handler, first cut
Refactor SAAJElementWriter

Modified: branches/tdiesler/trunk/src/main/java/javax/xml/ws/LogicalMessage.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/ws/LogicalMessage.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/ws/LogicalMessage.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -34,11 +34,32 @@
 public interface LogicalMessage
 {
 
+   /**
+    * Gets the message payload as an XML source, may be called multiple times on the same LogicalMessage instance, 
+    * always returns a new Source that may be used to retrieve the entire message payload.
+    * 
+    * If the returned Source is an instance of DOMSource, then modifications to the encapsulated DOM tree change 
+    * the message payload in-place, there is no need to susequently call setPayload. Other types of Source provide 
+    * only read access to the message payload.
+    *  
+    * @return The contained message payload; returns null if no payload is present in this message.
+    */
    Source getPayload();
 
+   /**
+    * Sets the message payload
+    */
    void setPayload(Source source);
 
+   /**
+    * Gets the message payload as a JAXB object. 
+    * Note that there is no connection between the returned object and the message payload, 
+    * changes to the payload require calling setPayload
+    */
    Object getPayload(JAXBContext jaxbcontext);
 
-   void setPayload(Object obj, JAXBContext jaxbcontext);
+   /**
+    * Sets the message payload
+    */
+   void setPayload(Object obj, JAXBContext jaxbContext);
 }
\ No newline at end of file

Modified: branches/tdiesler/trunk/src/main/java/javax/xml/ws/handler/Handler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/ws/handler/Handler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/ws/handler/Handler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -29,9 +29,21 @@
  */
 public interface Handler<C extends MessageContext>
 {
-   boolean handleMessage(C messagecontext);
+   /**
+    * The handleMessage method is invoked for normal processing of inbound and outbound messages. 
+    * Refer to the description of the handler framework in the JAX-WS specification for full details.
+    */
+   boolean handleMessage(C msgContext);
 
-   boolean handleFault(C messagecontext);
+   /**
+    * The handleFault method is invoked for fault message processing. Refer to the description of the 
+    * handler framework in the JAX-WS specification for full details.
+    */
+   boolean handleFault(C msgContext);
 
-   void close(MessageContext messagecontext);
+   /**
+    * Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime disptaching a message, 
+    * fault or exception. Refer to the description of the handler framework in the JAX-WS specification for full details.
+    */
+   void close(C msgContext);
 }
\ No newline at end of file

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -25,7 +25,7 @@
 import org.jboss.remoting.InvocationRequest;
 import org.jboss.remoting.invocation.OnewayInvocation;
 import org.jboss.remoting.marshal.Marshaller;
-import org.jboss.ws.soap.SAAJElementWriter;
+import org.jboss.ws.soap.SOAPElementWriter;
 import org.jboss.ws.soap.SOAPElementImpl;
 
 import javax.xml.soap.SOAPEnvelope;
@@ -70,7 +70,7 @@
          if (log.isTraceEnabled())
          {
             SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
-            String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+            String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
             log.trace("Outgoing SOAPMessage\n" + envStr);
          }
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonClient.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonClient.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -329,7 +329,7 @@
       }
       catch (Exception ex)
       {
-         throw new RemoteException("Call invocation failed: " + ex.getMessage(), ex);
+         throw new RemoteException("Call invocation failed", ex);
       }
       finally
       {

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonMessageContext.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonMessageContext.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/CommonMessageContext.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -25,6 +25,7 @@
 
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 
 import org.jboss.ws.metadata.EndpointMetaData;
 import org.jboss.ws.metadata.OperationMetaData;
@@ -43,7 +44,7 @@
    // The operation for this message ctx
    private OperationMetaData opMetaData;
    // The map of the properties
-   protected HashMap<String, Object> props = new HashMap<String, Object>();
+   protected Map<String, Object> props = new HashMap<String, Object>();
 
    public EndpointMetaData getEndpointMetaData()
    {
@@ -68,6 +69,16 @@
       this.opMetaData = opMetaData;
    }
 
+   public Map<String, Object> getProperties()
+   {
+      return props;
+   }
+
+   public void setProperties(Map<String, Object> props)
+   {
+      this.props = props;
+   }
+
    /**
     * Returns true if the MessageContext contains a property with the specified name.
     */

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -26,7 +26,6 @@
 import java.io.IOException;
 import java.net.URL;
 
-import javax.jws.soap.SOAPBinding.ParameterStyle;
 import javax.xml.namespace.QName;
 import javax.xml.rpc.ParameterMode;
 import javax.xml.rpc.encoding.TypeMappingRegistry;
@@ -92,13 +91,11 @@
 
          buildMetaDataInternal(serviceMetaData, wsdlDefinitions);
 
-         // Read the generated WSDL and initialize the schema model
+         // Read the WSDL and initialize the schema model
+         // This should only be needed for debuging purposes of the UMDM 
          JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
          serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
          
-         // eagerly initialize
-         wsMetaData.eagerInitialize();
-
          log.debug("END buildMetaData: " + serviceMetaData);
          return serviceMetaData;
       }
@@ -279,15 +276,8 @@
             javaTypeName = typeMetaData.getJavaTypeName();
 
          ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
-         epMetaData.setParameterStyle(ParameterStyle.BARE);
          inMetaData.setInHeader(opInput.getProperty(Constants.WSDL_PROPERTY_APPLICATION_DATA) != null);
          opMetaData.addParameter(inMetaData);
-
-         // Set the variable names
-         if (opMetaData.isDocumentWrapped())
-         {
-            throw new WSException("Cannot obtain java/xml type mapping for: " + xmlType);
-         }
       }
 
       for (WSDLInterfaceOperationOutput opOutput : wsdlOperation.getOutputs())
@@ -315,12 +305,6 @@
             {
                ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
                opMetaData.setReturnParameter(retMetaData);
-
-               // Set the variable names
-               if (opMetaData.getParameterStyle() == ParameterStyle.WRAPPED)
-               {
-                  throw new IllegalArgumentException("Cannot wrap parameters without SEI method mapping");
-               }
             }
             else
             {

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/handler/HandlerChainBaseImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/handler/HandlerChainBaseImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/handler/HandlerChainBaseImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -23,27 +23,40 @@
 
 // $Id$
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.handler.Handler;
+import javax.xml.rpc.handler.HandlerChain;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.soap.SOAPPart;
+
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
+import org.jboss.ws.common.SOAPMessageContextBase;
 import org.jboss.ws.jaxrpc.handler.HandlerWrapper;
-import org.jboss.ws.common.SOAPMessageContextBase;
 import org.jboss.ws.metadata.EndpointMetaData;
 import org.jboss.ws.metadata.OperationMetaData;
 import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.soap.SAAJElementWriter;
+import org.jboss.ws.soap.SOAPElementWriter;
 import org.jboss.ws.soap.SOAPEnvelopeImpl;
 import org.jboss.ws.soap.SOAPMessageImpl;
 
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.handler.Handler;
-import javax.xml.rpc.handler.HandlerChain;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.*;
-import java.util.*;
-
 /**
  * Represents a list of handlers. All elements in the
  * HandlerChain are of the type javax.xml.rpc.handler.Handler.
@@ -385,7 +398,7 @@
       try
       {
          SOAPEnvelopeImpl soapEnv = (SOAPEnvelopeImpl)soapPart.getEnvelope();
-         String envString = SAAJElementWriter.printSOAPElement(soapEnv, true);
+         String envString = SOAPElementWriter.writeElement(soapEnv, true);
          if (envString.equals(lastMessageTrace) == false)
          {
             log.debug(envString);
@@ -393,9 +406,9 @@
          }
          return lastMessageTrace;
       }
-      catch (SOAPException e)
+      catch (SOAPException ex)
       {
-         log.error("Cannot get SOAPEnvelope", e);
+         log.error("Cannot trace SOAP message", ex);
          return null;
       }
    }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -23,26 +23,39 @@
 
 // $Id$
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.handler.Handler;
+import javax.xml.rpc.handler.HandlerChain;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.soap.SOAPPart;
+
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
 import org.jboss.ws.metadata.EndpointMetaData;
 import org.jboss.ws.metadata.OperationMetaData;
 import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.soap.SAAJElementWriter;
+import org.jboss.ws.soap.SOAPElementWriter;
 import org.jboss.ws.soap.SOAPElementImpl;
 import org.jboss.ws.soap.SOAPEnvelopeImpl;
 import org.jboss.ws.soap.SOAPMessageImpl;
 
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.handler.Handler;
-import javax.xml.rpc.handler.HandlerChain;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.*;
-import java.util.*;
-
 /**
  * Represents a list of handlers. All elements in the
  * HandlerChain are of the type javax.xml.rpc.handler.Handler.
@@ -386,7 +399,7 @@
       try
       {
          SOAPEnvelopeImpl soapEnv = (SOAPEnvelopeImpl)soapPart.getEnvelope();
-         String envString = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+         String envString = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
          if (envString.equals(lastMessageTrace) == false)
          {
             log.debug(envString);
@@ -394,9 +407,9 @@
          }
          return lastMessageTrace;
       }
-      catch (SOAPException e)
+      catch (SOAPException ex)
       {
-         log.error("Cannot get SOAPEnvelope", e);
+         log.error("Cannot trace SOAP message", ex);
          return null;
       }
    }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -78,7 +78,7 @@
    protected boolean callRequestHandlerChain(QName portName)
    {
       List<Handler> handlerChain = getBindingProvider().getBinding().getHandlerChain();
-      HandlerChainExecutor executor = new HandlerChainExecutor(handlerChain);
+      HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, handlerChain);
       MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
       return executor.handleRequest(msgContext);
    }
@@ -87,7 +87,7 @@
    protected boolean callResponseHandlerChain(QName portName)
    {
       List<Handler> handlerChain = getBindingProvider().getBinding().getHandlerChain();
-      HandlerChainExecutor executor = new HandlerChainExecutor(handlerChain);
+      HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, handlerChain);
       MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
       return executor.handleResponse(msgContext);
    }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -586,6 +586,9 @@
          Style style = opMetaData.getStyle();
          if (style == Style.RPC)
          {
+            if (soapBodyElement == null)
+               throw new WSException("Cannot unbind response message with empty soap body");
+            
             ParameterMetaData retMetaData = opMetaData.getReturnParameter();
             if (retMetaData != null)
             {

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -70,7 +70,7 @@
       return true;
    }
 
-   public void close(MessageContext messagecontext)
+   public void close(MessageContext messageContext)
    {
    }
    

Added: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericLogicalHandler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericLogicalHandler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericLogicalHandler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.jaxws.handler;
+
+// $Id: $
+
+import javax.xml.ws.handler.LogicalHandler;
+import javax.xml.ws.handler.LogicalMessageContext;
+
+/**
+ * A generic jaxws logical handler
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 13-Aug-2006
+ */
+public class GenericLogicalHandler<C extends LogicalMessageContext> extends GenericHandler implements LogicalHandler
+{
+}


Property changes on: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericLogicalHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -27,7 +27,7 @@
 import java.util.Set;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.handler.PortInfo;
+import javax.xml.ws.handler.LogicalMessageContext;
 import javax.xml.ws.handler.soap.SOAPHandler;
 
 /**
@@ -36,7 +36,7 @@
  * @author Thomas.Diesler at jboss.org
  * @since 13-Aug-2006
  */
-public abstract class GenericSOAPHandler extends GenericHandler implements SOAPHandler
+public abstract class GenericSOAPHandler<C extends LogicalMessageContext> extends GenericHandler implements SOAPHandler
 {
    // The header blocks that can be processed by this Handler instance
    private Set<QName> headers = new HashSet<QName>();

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -28,11 +28,15 @@
 
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPPart;
+import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalHandler;
 import javax.xml.ws.handler.MessageContext;
 
 import org.jboss.logging.Logger;
 import org.jboss.util.xml.DOMWriter;
+import org.jboss.ws.jaxrpc.Style;
+import org.jboss.ws.metadata.EndpointMetaData;
 import org.jboss.ws.soap.SOAPEnvelopeImpl;
 
 /**
@@ -45,6 +49,8 @@
 {
    private static Logger log = Logger.getLogger(HandlerChainExecutor.class);
 
+   // The endpoint meta data
+   private EndpointMetaData epMetaData;
    // The List<Entry> objects
    protected List<Handler> handlers = new ArrayList<Handler>();
    // The index of the first handler that returned false during processing
@@ -53,8 +59,10 @@
    /**
     * Constructs a handler chain with the given handlers
     */
-   public HandlerChainExecutor(List<Handler> handlerList)
+   public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler> handlerList)
    {
+      this.epMetaData = epMetaData;
+      
       log.debug("Create a handler executor: " + handlerList);
       for (Handler handler : handlerList)
       {
@@ -82,6 +90,8 @@
       {
          log.debug("Enter: handleRequest");
 
+         SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
+
          int handlerIndex = 0;
          Handler currHandler = null;
          try
@@ -91,19 +101,18 @@
                String lastMessageTrace = null;
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
 
                currHandler = handlers.get(handlerIndex);
+
                log.debug("Handle request: " + currHandler);
-               doNext = currHandler.handleMessage(msgContext);
+               doNext = handleMessage(currHandler, soapContext);
 
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
             }
@@ -131,6 +140,8 @@
    {
       boolean doNext = true;
 
+      SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
+
       if (handlers.size() > 0)
       {
          log.debug("Enter: handleResponse");
@@ -147,19 +158,18 @@
                String lastMessageTrace = null;
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
 
                currHandler = handlers.get(handlerIndex);
+
                log.debug("Handle response: " + currHandler);
-               doNext = currHandler.handleMessage(msgContext);
+               doNext = handleMessage(currHandler, soapContext);
 
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
             }
@@ -191,6 +201,8 @@
       {
          log.debug("Enter: handleFault");
 
+         SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
+
          int handlerIndex = 0;
          Handler currHandler = null;
          try
@@ -200,19 +212,17 @@
                String lastMessageTrace = null;
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
 
                currHandler = handlers.get(handlerIndex);
                log.debug("Handle fault: " + currHandler);
-               doNext = currHandler.handleFault(msgContext);
+               doNext = handleFault(currHandler, soapContext);
 
                if (log.isTraceEnabled())
                {
-                  SOAPMessageContextJAXWS msgCtx = (SOAPMessageContextJAXWS)msgContext;
-                  SOAPPart soapPart = msgCtx.getMessage().getSOAPPart();
+                  SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
                   lastMessageTrace = traceSOAPPart(soapPart, lastMessageTrace);
                }
             }
@@ -236,6 +246,35 @@
       return doNext;
    }
 
+   private boolean handleMessage(Handler currHandler, SOAPMessageContextJAXWS soapContext)
+   {
+      MessageContext handlerContext = soapContext;
+      if (currHandler instanceof LogicalHandler)
+      {
+         if (epMetaData.getStyle() == Style.RPC)
+            throw new WebServiceException("Cannot use logical handler with RPC");
+         
+         handlerContext = new LogicalMessageContextImpl(soapContext);
+      }
+
+      boolean doNext = currHandler.handleMessage(handlerContext);
+
+      return doNext;
+   }
+
+   private boolean handleFault(Handler currHandler, SOAPMessageContextJAXWS soapContext)
+   {
+      MessageContext handlerContext = soapContext;
+      if (currHandler instanceof LogicalHandler)
+      {
+         handlerContext = new LogicalMessageContextImpl(soapContext);
+      }
+
+      boolean doNext = currHandler.handleFault(handlerContext);
+
+      return doNext;
+   }
+
    /**
     * Trace the SOAPPart, do nothing if the String representation is equal to the last one.
     */

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -71,25 +71,25 @@
       }
 
       List<Handler> handlerChain = getHandlerChain(epMetaData, type);
-      boolean status = new HandlerChainExecutor(handlerChain).handleRequest(msgContext);
+      boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleRequest(msgContext);
       return status;
    }
 
    public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
    {
       SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
-      ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
-      List<Handler> handlerChain = getHandlerChain(sepMetaData, type);
-      boolean status = new HandlerChainExecutor(handlerChain).handleResponse(msgContext);
+      ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
+      List<Handler> handlerChain = getHandlerChain(epMetaData, type);
+      boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleResponse(msgContext);
       return status;
    }
 
    public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
    {
       SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
-      ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
-      List<Handler> handlerChain = getHandlerChain(sepMetaData, type);
-      boolean status = new HandlerChainExecutor(handlerChain).handleFault(msgContext);
+      ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
+      List<Handler> handlerChain = getHandlerChain(epMetaData, type);
+      boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleFault(msgContext);
       return status;
    }
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -33,6 +33,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.handler.LogicalHandler;
 import javax.xml.ws.handler.PortInfo;
 import javax.xml.ws.http.HTTPBinding;
 import javax.xml.ws.soap.SOAPBinding;
@@ -67,7 +68,7 @@
    {
       log.debug("getHandlerChain: " + info);
 
-      List<Handler> handlerChain = new ArrayList<Handler>();
+      List<Handler> unsortedChain = new ArrayList<Handler>();
 
       String bindingID = info.getBindingID();
       QName serviceName = info.getServiceName();
@@ -79,7 +80,7 @@
          if (list != null)
          {
             log.debug("add protocol handlers: " + list);
-            handlerChain.addAll(list);
+            unsortedChain.addAll(list);
          }
       }
 
@@ -89,7 +90,7 @@
          if (list != null)
          {
             log.debug("add service handlers: " + list);
-            handlerChain.addAll(list);
+            unsortedChain.addAll(list);
          }
       }
 
@@ -99,7 +100,7 @@
          if (list != null)
          {
             log.debug("add port handlers: " + list);
-            handlerChain.addAll(list);
+            unsortedChain.addAll(list);
          }
       }
 
@@ -107,10 +108,23 @@
       if (list != null)
       {
          log.debug("add general handlers: " + list);
-         handlerChain.addAll(list);
+         unsortedChain.addAll(list);
       }
-
-      return Collections.unmodifiableList(handlerChain);
+      
+      // Sort handler logical handlers first
+      List<Handler> sortedChain = new ArrayList<Handler>();
+      for (Handler handler : unsortedChain)
+      {
+         if (handler instanceof LogicalHandler)
+            sortedChain.add(handler);
+      }
+      for (Handler handler : unsortedChain)
+      {
+         if ((handler instanceof LogicalHandler) == false)
+            sortedChain.add(handler);
+      }
+      
+      return Collections.unmodifiableList(sortedChain);
    }
 
    public void initHandlerChain(EndpointMetaData epMetaData, HandlerType type)

Added: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageContextImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageContextImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageContextImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.jaxws.handler;
+
+// $Id$
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.LogicalMessage;
+import javax.xml.ws.handler.LogicalMessageContext;
+
+/**
+ * The LogicalMessageContext interface extends MessageContext to provide access to a the 
+ * contained message as a protocol neutral LogicalMessage.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Aug-2006
+ */
+public class LogicalMessageContextImpl extends MessageContextJAXWS implements LogicalMessageContext
+{
+   // The LogicalMessage in this message context
+   private LogicalMessage logicalMessage;
+
+   /** Default ctor */
+   public LogicalMessageContextImpl(SOAPMessageContextJAXWS soapContext)
+   {
+      SOAPMessage soapMessage = soapContext.getMessage();
+      logicalMessage = new LogicalMessageImpl(soapMessage);
+      
+      // Copy the context properties
+      setProperties(soapContext.getProperties());
+   }
+
+   /**
+    * Gets the message from this message context
+    * @return  The contained message; returns null if no message is present in this message context
+    */
+   public LogicalMessage getMessage()
+   {
+      return logicalMessage;
+   }
+}


Property changes on: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageContextImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.jaxws.handler;
+
+// $Id$
+
+import java.io.StringReader;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.LogicalMessage;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.soap.SOAPBodyImpl;
+import org.jboss.ws.soap.SOAPContentElement;
+
+/**
+ * The LogicalMessageContext interface extends MessageContext to provide access to a the 
+ * contained message as a protocol neutral LogicalMessage.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Aug-2006
+ */
+public class LogicalMessageImpl implements LogicalMessage
+{
+   private SOAPBodyImpl soapBody;
+   
+   public LogicalMessageImpl(SOAPMessage soapMessage)
+   {
+      try
+      {
+         soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
+      }
+      catch (SOAPException ex)
+      {
+         throw new WebServiceException("Cannot obtain xml payload", ex);
+      }
+   }
+
+   public Source getPayload()
+   {
+      Source source = soapBody.getPayload();
+      if (source == null)
+      {
+         try
+         {
+            SOAPContentElement soapElement = (SOAPContentElement)soapBody.getChildElements().next();
+            String xmlPayload = soapElement.getXMLFragment();
+            source = new StreamSource(new StringReader(xmlPayload));
+         }
+         catch (SOAPException ex)
+         {
+            throw new WebServiceException("Cannot obtain xml payload", ex);
+         }
+      }
+      return source;
+   }
+
+   public void setPayload(Source source)
+   {
+      soapBody.setPayload(source);
+   }
+
+   public Object getPayload(JAXBContext jaxbContext)
+   {
+      throw new NotImplementedException();
+   }
+
+   public void setPayload(Object obj, JAXBContext jaxbContext)
+   {
+      throw new NotImplementedException();
+   }
+}


Property changes on: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/LogicalMessageImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/SOAPMessageContextJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/SOAPMessageContextJAXWS.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/SOAPMessageContextJAXWS.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -60,13 +60,6 @@
    {
    }
 
-   /** SOAP actor roles are invariant during the processing of SOAP message through the handler chain. */
-   public SOAPMessageContextJAXWS(Set<URI> roles)
-   {
-      if (roles != null)
-         this.roles = roles;
-   }
-
    /**
     * Gets the SOAPMessage from this message context. 
     * Modifications to the returned SOAPMessage change the message in-place, there is no need to susequently call setMessage.

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/AbstractServiceEndpointInvoker.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -204,22 +204,29 @@
       // Report a MustUnderstand fault
       if (opMetaData == null)
       {
+         String faultString;
          SOAPBody soapBody = reqMessage.getSOAPBody();
-         SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
-         Name soapName = soapBodyElement.getElementName();
+         if (soapBody.getChildElements().hasNext())
+         {
+            SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+            Name soapName = soapBodyElement.getElementName();
+            faultString = "Endpoint " + epMetaData.getQName() + " does not contain operation meta data for: " + soapName; 
+         }
+         else
+         {
+            faultString = "Endpoint " + epMetaData.getQName() + " does not contain operation meta data for empty soap body"; 
+         }
 
          // R2724 If an INSTANCE receives a message that is inconsistent with its WSDL description, it SHOULD generate a soap:Fault
          // with a faultcode of "Client", unless a "MustUnderstand" or "VersionMismatch" fault is generated.
          if (soapHeader != null && soapHeader.examineMustUnderstandHeaderElements(Constants.URI_SOAP11_NEXT_ACTOR).hasNext())
          {
             QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
-            String faultString = "Endpoint " + epMetaData.getQName() + " does not contain operation meta data for: " + soapName;
             throw new SOAPFaultException(faultCode, faultString, null, null);
          }
          else
          {
             QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
-            String faultString = "Endpoint " + epMetaData.getQName() + " does not contain operation meta data for: " + soapName;
             throw new SOAPFaultException(faultCode, faultString, null, null);
          }
       }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpoint.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -173,7 +173,7 @@
          if (msgLog.isDebugEnabled())
          {
             SOAPEnvelope soapEnv = reqMessage.getSOAPPart().getEnvelope();
-            String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+            String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
             msgLog.debug("Incomming SOAPMessage\n" + envStr);
          }
 
@@ -250,7 +250,7 @@
          {
             resMessage.saveChanges();
             SOAPEnvelope soapEnv = resMessage.getSOAPPart().getEnvelope();
-            String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+            String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
             msgLog.debug("Outgoing SOAPMessage\n" + envStr);
          }
       }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -606,20 +606,20 @@
 
    public void create() throws Exception
    {
+      log.info("WebServices: " + getClass().getPackage().getImplementationVersion());
       MBeanServer server = getJMXServer();
       if (server != null)
       {
-         log.debug("Create service endpoint manager");
          server.registerMBean(this, OBJECT_NAME);
       }
    }
 
    public void destroy() throws Exception
    {
+      log.debug("Destroy service endpoint manager");
       MBeanServer server = getJMXServer();
       if (server != null)
       {
-         log.debug("Destroy service endpoint manager");
          server.unregisterMBean(OBJECT_NAME);
       }
    }

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,193 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.soap;
-
-import javax.xml.soap.SOAPElement;
-import java.io.*;
-import java.util.Iterator;
-
-/**
- * Writes a SAAJ elements to an output stream.
- *
- * @see SOAPElementImpl
- *
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @version $Id$
- * @since Aug 4, 2006
- */
-public class SAAJElementWriter {
-
-   // Print writer
-   private PrintWriter out;
-   // True, if canonical output
-   private boolean canonical;
-   // True, if pretty printing should be used
-   private boolean prettyprint;
-   // True, if the XML declaration should be written
-   private boolean writeXMLDeclaration;
-   // Explicit character set encoding
-   private String charsetName;  
-   // True, if the XML declaration has been written
-   private boolean wroteXMLDeclaration;
-
-   public SAAJElementWriter(Writer w)
-   {
-      this.out = new PrintWriter(w);
-   }
-
-   public SAAJElementWriter(OutputStream stream)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         // ignore, UTF-8 should be available
-      }
-   }
-
-   public SAAJElementWriter(OutputStream stream, String charsetName)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
-         this.charsetName = charsetName;
-         this.writeXMLDeclaration = true;
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         throw new IllegalArgumentException("Unsupported encoding: " + charsetName);
-      }
-   }
-
-   /**
-    * Print a node with explicit prettyprinting.
-    * The defaults for all other DOMWriter properties apply.
-    *
-    */
-   public static String printSOAPElement(SOAPElementImpl element, boolean prettyprint)
-   {
-      StringWriter strw = new StringWriter();
-      new SAAJElementWriter(strw).setPrettyprint(prettyprint).print(element);
-      return strw.toString();
-   }
-
-   public boolean isCanonical()
-   {
-      return canonical;
-   }
-
-   /**
-    * Set wheter entities should appear in their canonical form.
-    * The default is false.
-    */
-   public SAAJElementWriter setCanonical(boolean canonical)
-   {
-      this.canonical = canonical;
-      return this;
-   }
-
-   public boolean isPrettyprint()
-   {
-      return prettyprint;
-   }
-
-   /**
-    * Set wheter element should be indented.
-    * The default is false.
-    */
-   public SAAJElementWriter setPrettyprint(boolean prettyprint)
-   {
-      this.prettyprint = prettyprint;
-      return this;
-   }
-
-   public boolean isWriteXMLDeclaration()
-   {
-      return writeXMLDeclaration;
-   }
-
-   /**
-    * Set wheter the XML declaration should be written.
-    * The default is false.
-    */
-   public SAAJElementWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
-   {
-      this.writeXMLDeclaration = writeXMLDeclaration;
-      return this;
-   }
-
-   public void print(SOAPElementImpl element)
-   {
-      printInternal(element);
-   }
-
-   private void printInternal(SOAPElementImpl element)
-   {
-      // is there anything to do?
-      if (element == null)
-      {
-         return;
-      }
-
-      if (wroteXMLDeclaration == false && writeXMLDeclaration == true && canonical == false)
-      {
-         out.print("<?xml version='1.0'");
-         if (charsetName != null)
-            out.print(" encoding='" + charsetName + "'");
-
-         out.println("?>");
-         wroteXMLDeclaration = true;
-      }
-
-      writeElement(element, out, prettyprint);
-
-      out.flush();
-   }
-
-   private static void writeElement(SOAPElementImpl element, PrintWriter out, boolean pretty) {
-
-      // the element itself
-      String endTag = element.write(out, pretty);
-
-      // skip SOAPContentElements
-      if(! (element instanceof SOAPContentElement))
-      {
-         // and it's children
-         Iterator it = element.getChildElements();
-         while(it.hasNext())
-         {
-            Object child = it.next();
-            if(child instanceof SOAPElement)
-            {
-               SOAPElementImpl childElement = (SOAPElementImpl)child;
-               writeElement(childElement, out, pretty);
-            }
-         }
-
-      }
-      if(endTag!=null)
-         out.write(endTag);
-   }
-
-}

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementMessage.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementMessage.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementMessage.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -46,18 +46,16 @@
    {
       super(element);
    }
-   public String write(Writer writer, boolean pretty) {
+   
+   public void writeElement(Writer writer) {
       try
       {
          DOMWriter domWriter = new DOMWriter(writer);
-         domWriter.setPrettyprint(pretty);
          domWriter.print(this);
       }
       catch (Exception e)
       {
          throw new JAXRPCException(e);
       }
-
-      return null;
    }
 }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementRpc.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementRpc.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyElementRpc.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -50,58 +50,4 @@
    {
       super(element);
    }
-   public String write(Writer writer, boolean pretty) {
-      try
-      {
-
-         writer.write('<');
-         String prefix = getPrefix()!=null ? getPrefix():"";
-         String fqn = prefix.length()>0 ? prefix+":"+getLocalName() : getLocalName();
-         writer.write(fqn);
-
-         // namespaces
-         Iterator it = getNamespacePrefixes();
-         while(it.hasNext())
-         {
-            String nsPrefix = (String)it.next();
-            writer.write(" xmlns:"+nsPrefix+"='"+getNamespaceURI(nsPrefix)+"'");
-         }
-
-          // attributes
-         Iterator attNames = getAllAttributes();
-         while(attNames.hasNext())
-         {
-            NameImpl name = (NameImpl)attNames.next();
-            String attPrefix = name.getPrefix()!=null ? name.getPrefix():"";
-            String attFqn = attPrefix.length()>0 ? attPrefix+":"+name.getLocalName() : name.getLocalName();
-            writer.write(" "+attFqn);
-            writer.write("='"+getAttributeValue(name)+"'");
-         }
-
-         writer.write('>');
-
-         // children
-         Iterator children = getChildElements();
-         while(children.hasNext())
-         {
-            Object child = children.next();
-            if( (child instanceof SOAPContentElement) == false)
-            {
-               DOMWriter domWriter = new DOMWriter(writer);
-               domWriter.setPrettyprint(pretty);
-               domWriter.print((Element)child);
-            }
-         }
-
-         if(pretty)
-            writer.write("\n");
-
-         return("</"+fqn+">");
-
-      }
-      catch (IOException e)
-      {
-         throw new JAXRPCException(e);
-      }
-   }
 }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -25,12 +25,12 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
+import java.io.Writer;
 import java.util.Iterator;
 import java.util.Locale;
-import java.io.Writer;
-import java.io.IOException;
 
 import javax.xml.bind.util.JAXBSource;
 import javax.xml.soap.Name;
@@ -41,14 +41,15 @@
 import javax.xml.soap.SOAPFault;
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.jboss.logging.Logger;
 import org.jboss.util.xml.DOMUtils;
 import org.jboss.util.xml.DOMWriter;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
-import org.jboss.util.xml.DOMUtils;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
@@ -56,7 +57,6 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
-import javax.xml.rpc.JAXRPCException;
 
 /**
  * An object that represents the contents of the SOAP body element in a SOAP message.
@@ -69,6 +69,9 @@
  */
 public class SOAPBodyImpl extends SOAPElementImpl implements SOAPBody
 {
+   // provide logging
+   private static Logger log = Logger.getLogger(SOAPBodyImpl.class);
+
    // Generic JAXWS payload
    private Source payload;
    private boolean expanded;
@@ -85,6 +88,8 @@
 
    public void setPayload(Source payload)
    {
+      log.debug("setPayload: " + payload.getClass().getName());
+      removeContents();
       this.payload = payload;
       this.expanded = false;
    }
@@ -246,96 +251,97 @@
    {
       if (payload != null && expanded == false)
       {
+         // This should never happen
+         log.warn("Expanding body to DOM", new Exception());
+
          expanded = true;
          try
          {
+            Element child = getBodyElementFromSource();
             SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
-            if (payload instanceof StreamSource)
-            {
-               Element child = null;
-               StreamSource streamSource = (StreamSource)payload;
-               
-               InputStream ins = streamSource.getInputStream();
-               if (ins != null)
-               {
-                  child = DOMUtils.parse(ins);
-               }
-               else
-               {
-                  Reader reader = streamSource.getReader();
-                  child = DOMUtils.parse(new InputSource(reader));
-               }
-               addChildElement(soapFactory.createElement(child, true));
-
-               // reset the excausted input stream  
-               String xmlStr = DOMWriter.printNode(child, false);
-               payload = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
-            }
-            else if (payload instanceof JAXBSource)
-            {
-               // The fact that JAXBSource derives from SAXSource is an implementation detail. 
-               // Thus in general applications are strongly discouraged from accessing methods defined on SAXSource. 
-               // The XMLReader object obtained by the getXMLReader method shall be used only for parsing the InputSource object returned by the getInputSource method.
-
-               TransformerFactory tf = TransformerFactory.newInstance();
-               ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); 
-               tf.newTransformer().transform(payload, new StreamResult(baos));
-               
-               Element child = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
-               addChildElement(soapFactory.createElement(child, true));
-            }
-            else
-            {
-               throw new WSException("Source type not implemented: " + payload.getClass().getName());
-            }
+            addChildElement(soapFactory.createElement(child, true));
          }
          catch (RuntimeException rte)
          {
+            expanded = false;
             throw rte;
          }
-         catch (Exception e)
+         catch (Exception ex)
          {
-            throw new WSException(e);
+            expanded = false;
+            throw new WSException("Cannot expand to DOM" + ex);
          }
       }
    }
 
-   public String write(Writer writer, boolean pretty) {
+   private Element getBodyElementFromSource()
+   {
+      Element child = null;
       try
       {
-         writer.write("<");
-         writer.write(getParentElement().getPrefix()+":Body");
+         if (payload instanceof StreamSource)
+         {
+            StreamSource streamSource = (StreamSource)payload;
 
-         // namespaces
-         Iterator nsPrefixes = getNamespacePrefixes();
-         while(nsPrefixes.hasNext())
+            InputStream ins = streamSource.getInputStream();
+            if (ins != null)
+            {
+               child = DOMUtils.parse(ins);
+            }
+            else
+            {
+               Reader reader = streamSource.getReader();
+               child = DOMUtils.parse(new InputSource(reader));
+            }
+
+            // reset the excausted input stream  
+            String xmlStr = DOMWriter.printNode(child, false);
+            payload = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
+         }
+         else if (payload instanceof DOMSource)
          {
-            String prefix = (String)nsPrefixes.next();
-            writer.write(" xmlns:"+prefix+"='"+getNamespaceURI(prefix)+"'");
+            DOMSource domSource = (DOMSource)payload;
+            child = (Element)domSource.getNode();
          }
+         else if (payload instanceof JAXBSource)
+         {
+            // The fact that JAXBSource derives from SAXSource is an implementation detail. 
+            // Thus in general applications are strongly discouraged from accessing methods defined on SAXSource. 
+            // The XMLReader object obtained by the getXMLReader method shall be used only for parsing the InputSource object returned by the getInputSource method.
 
-         // attributes
-         Iterator attNames = getAllAttributes();
-         while(attNames.hasNext())
+            TransformerFactory tf = TransformerFactory.newInstance();
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+            tf.newTransformer().transform(payload, new StreamResult(baos));
+
+            child = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+         }
+         else
          {
-            NameImpl name = (NameImpl)attNames.next();
-            String attPrefix = name.getPrefix()!=null ? name.getPrefix():"";
-            String attFqn = attPrefix.length()>0 ? attPrefix+":"+name.getLocalName() : name.getLocalName();
-            writer.write(" "+attFqn);
-            writer.write("='"+getAttributeValue(name)+"'");
+            throw new WSException("Source type not implemented: " + payload.getClass().getName());
          }
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new WSException("Cannot get root element from Source" + ex);
+      }
+      return child;
+   }
 
-         writer.write(">");
-
-         if(pretty)
-            writer.write("\n");
-
-         return ("</"+getParentElement().getPrefix()+":Body>");
+   @Override
+   public void writeElementContent(Writer writer) throws IOException
+   {
+      if (payload != null)
+      {
+         Element child = getBodyElementFromSource();
+         new DOMWriter(writer).printNode(child, false);
       }
-      catch (IOException e)
+      else
       {
-         throw new JAXRPCException(e);
+         super.writeElementContent(writer);
       }
    }
-
 }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -181,7 +181,7 @@
          if(msgLog.isDebugEnabled())
          {
             SOAPEnvelope soapReqEnv = reqMessage.getSOAPPart().getEnvelope();
-            String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapReqEnv, true);
+            String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapReqEnv, true);
             msgLog.debug("Remoting meta data: " + metadata);
             msgLog.debug("Outgoing SOAPMessage\n" + envStr);
          }
@@ -200,7 +200,7 @@
          if (resMessage != null && msgLog.isDebugEnabled())
          {
             SOAPEnvelope soapResEnv = resMessage.getSOAPPart().getEnvelope();
-            String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapResEnv, true);
+            String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapResEnv, true);
             msgLog.debug("Incomming Response SOAPMessage\n" + envStr);
          }
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPContentElement.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -21,6 +21,18 @@
  */
 package org.jboss.ws.soap;
 
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
 import org.jboss.logging.Logger;
 import org.jboss.util.xml.DOMUtils;
 import org.jboss.util.xml.DOMWriter;
@@ -39,19 +51,14 @@
 import org.jboss.ws.utils.JavaUtils;
 import org.jboss.ws.utils.ThreadLocalAssociation;
 import org.jboss.ws.xop.XOPContext;
-import org.w3c.dom.*;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.TypeInfo;
 
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import java.io.IOException;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.Iterator;
-
 /**
  * A SOAPElement that gives access to its content as XML fragment or Java object.
  *
@@ -177,7 +184,8 @@
          {
             throw new WSException(e);
          }
-         finally {
+         finally
+         {
             ThreadLocalAssociation.localDomExpansion().set(domExpansionState);
          }
       }
@@ -278,7 +286,7 @@
                {
                   Object convertedObj = null;
 
-                  if(obj instanceof DataHandler)
+                  if (obj instanceof DataHandler)
                   {
                      try
                      {
@@ -290,7 +298,7 @@
                      }
                   }
 
-                  if(null == convertedObj || !JavaUtils.isAssignableFrom(javaType, convertedObj.getClass()) ) // conversion failed
+                  if (null == convertedObj || !JavaUtils.isAssignableFrom(javaType, convertedObj.getClass())) // conversion failed
                   {
                      throw new WSException("Java type '" + javaType + "' is not assignable from: " + objType.getName());
                   }
@@ -324,7 +332,6 @@
       this.isObjectValid = true;
    }
 
-
    private void removeContentsAsIs()
    {
       log.trace("removeContentsAsIs");
@@ -852,7 +859,7 @@
                   {
                      SOAPElementImpl soapElement = soapFactory.createElement((Element)child, true);
                      super.addChildElement(soapElement);
-                     if(isXOPParameter())                     
+                     if (isXOPParameter())
                         XOPContext.inlineXOPData(soapElement);
                   }
                   else if (childType == Node.TEXT_NODE)
@@ -968,32 +975,32 @@
          invalidateXMLContent();
       }
    }
-   public String write(Writer writer, boolean pretty) {
+
+   public void writeElement(Writer writer)
+   {
       try
       {
          handleMTOMTransitions();
 
-         if(isDOMValid)
+         if (isDOMValid)
          {
-            DOMWriter dw = new DOMWriter(writer);
-            dw.setPrettyprint(pretty);
-            dw.print(this);
+            new DOMWriter(writer).print(this);
          }
          else
          {
-            writer.write( getXMLFragment() );
-            if(pretty)
-               writer.write("\n");
+            writer.write(getXMLFragment());
          }
-
       }
-      catch (Exception e)
+      catch (RuntimeException rte)
       {
-         throw new WSException(e);
+         throw rte;
       }
+      catch (Exception ex)
+      {
+         throw new WSException(ex);
+      }
+   }
 
-      return null;
-   }
    /**
     * When a SOAPContentElement transitions between dom-valid and xml-valid
     * the XOP elements need to transition from XOP optimized to base64 and reverse.<p>
@@ -1006,11 +1013,12 @@
     * it's needs to be decided wether or not the <code>xop:Include</code> should be restored.
     * This as well depends upon the message context property.
     */
-   private void handleMTOMTransitions() {
+   private void handleMTOMTransitions()
+   {
 
       boolean mtomEnabled = isXOPParameter() && XOPContext.isMTOMEnabled();
 
-      if( paramMetaData != null && mtomEnabled == false )
+      if (paramMetaData != null && mtomEnabled == false)
       {
          // If MTOM is disabled, we force dom expansion.
          // This will inline any XOP include element
@@ -1020,7 +1028,7 @@
          log.debug("Transitioning to dom-valid state, MTOM disabled");
          expandToDOM();
       }
-      else if(isDOMValid && mtomEnabled )
+      else if (isDOMValid && mtomEnabled)
       {
          // When the DOM representation is valid,
          // but MTOM is enabled we need to convert the inlined
@@ -1031,7 +1039,8 @@
       }
    }
 
-   private boolean isXOPParameter() {
+   private boolean isXOPParameter()
+   {
       return (paramMetaData != null && paramMetaData.isXOP());
    }
 }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,32 +1,33 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ws.soap;
 
 // $Id$
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import java.io.Writer;
 
 import javax.xml.namespace.QName;
 import javax.xml.soap.Name;
@@ -36,8 +37,8 @@
 import javax.xml.soap.Text;
 
 import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
 import org.jboss.util.xml.DOMUtils;
-import org.jboss.util.xml.DOMWriter;
 import org.jboss.ws.Constants;
 import org.w3c.dom.Attr;
 import org.w3c.dom.DOMException;
@@ -69,7 +70,7 @@
    /** Called by SOAPFactory */
    public SOAPElementImpl(String localPart)
    {
-	   
+
       super(DOMUtils.createElement(localPart, null, null));
       this.element = (Element)domNode;
       log.trace("new SOAPElementImpl: " + getElementName());
@@ -104,10 +105,10 @@
       SOAPElement soapElement = this;
       while (soapElement != null && (soapElement instanceof SOAPEnvelope) == false)
          soapElement = soapElement.getParentElement();
-      
+
       return (SOAPEnvelope)soapElement;
    }
-   
+
    //  javax.xml.soap.SOAPElement *************************************************************************************
 
    /**
@@ -240,7 +241,7 @@
       String qualifiedName = "xmlns";
       if (prefix != null && prefix.length() > 0)
          qualifiedName += ":" + prefix;
-      
+
       log.trace("addNamespaceDeclaration: " + qualifiedName + "='" + nsURI + "'");
       element.setAttributeNS("http://www.w3.org/2000/xmlns/", qualifiedName, nsURI);
       return this;
@@ -297,7 +298,7 @@
          if ("xmlns".equals(prefix) == false)
          {
             list.add(new NameImpl(local, prefix, uri));
-         }         
+         }
       }
       return list.iterator();
    }
@@ -320,8 +321,7 @@
       String nsURI = name.getURI();
       if (nsURI.length() > 0)
          attr = element.getAttributeNodeNS(nsURI, name.getLocalName());
-      else
-         attr = element.getAttributeNode(name.getLocalName());
+      else attr = element.getAttributeNode(name.getLocalName());
 
       return attr;
    }
@@ -636,42 +636,79 @@
 
    public TypeInfo getSchemaTypeInfo()
    {
-      // FIXME getSchemaTypeInfo
-      throw new org.jboss.util.NotImplementedException("getSchemaTypeInfo");
+      throw new NotImplementedException("getSchemaTypeInfo");
    }
 
    public void setIdAttribute(String name, boolean isId) throws DOMException
    {
-      // FIXME setIdAttribute
-      throw new org.jboss.util.NotImplementedException("setIdAttribute");
+      throw new NotImplementedException("setIdAttribute");
    }
 
    public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
    {
-      // FIXME setIdAttributeNode
-      throw new org.jboss.util.NotImplementedException("setIdAttributeNode");
+      throw new NotImplementedException("setIdAttributeNode");
    }
 
    public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
    {
-      // FIXME setIdAttributeNS
-      throw new org.jboss.util.NotImplementedException("setIdAttributeNS");
+      throw new NotImplementedException("setIdAttributeNS");
    }
+
    /**
     * The default implementation uses a DOMWriter.
     * SOAPContentElements overwrite this to optimize DOM callbacks.
-    *
-    * @param writer
-    * @param pretty
-    *
-    * @return end element tag
     */
-   public String write(Writer writer, boolean pretty)
+   public void writeElement(Writer writer) throws IOException
    {
-      /*DOMWriter domWriter = new DOMWriter(writer);
-      domWriter.setPrettyprint(pretty);
-      domWriter.print(this);
-      */
-      return null;
+         String fqn = getPrefix() + ":" + getLocalName();
+         writer.write("<" + fqn);
+
+         // namespaces
+         Iterator nsPrefixes = getNamespacePrefixes();
+         while (nsPrefixes.hasNext())
+         {
+            String prefix = (String)nsPrefixes.next();
+            writer.write(" xmlns:" + prefix + "='" + getNamespaceURI(prefix) + "'");
+         }
+
+         // attributes
+         Iterator attNames = getAllAttributes();
+         while (attNames.hasNext())
+         {
+            NameImpl name = (NameImpl)attNames.next();
+            String attPrefix = name.getPrefix() != null ? name.getPrefix() : "";
+            String attFqn = attPrefix.length() > 0 ? attPrefix + ":" + name.getLocalName() : name.getLocalName();
+            writer.write(" " + attFqn + "='" + getAttributeValue(name) + "'");
+         }
+         
+         if (hasChildNodes())
+         {
+            writer.write(">");
+            writeElementContent(writer);
+            writer.write("</" + fqn + ">");
+         }
+         else
+         {
+            writer.write("/>");
+         }
    }
+
+   protected void writeElementContent(Writer out) throws IOException
+   {
+      Iterator it = getChildElements();
+      if (it.hasNext())
+      {
+         while (it.hasNext())
+         {
+            SOAPElementImpl childElement = (SOAPElementImpl)it.next();
+            childElement.writeElement(out);
+         }
+      }
+      else
+      {
+         String text = getTextContent();
+         if (text != null)
+            out.write(text);
+      }
+   }
 }

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementWriter.java (from rev 883, branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SAAJElementWriter.java	2006-09-01 11:23:45 UTC (rev 883)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPElementWriter.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.soap;
+
+// $Id: $
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import javax.xml.soap.SOAPEnvelope;
+
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.util.xml.DOMWriter;
+import org.jboss.ws.WSException;
+
+/**
+ * Writes a SAAJ elements to an output stream.
+ *
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @author Thomas.Diesler at jboss.com
+ * @since 4-Aug-2006
+ */
+public class SOAPElementWriter
+{
+
+   // Print writer
+   private PrintWriter out;
+   // True, if the XML declaration should be written
+   private boolean writeXMLDeclaration;
+   // Explicit character set encoding
+   private String charsetName;
+
+   public SOAPElementWriter(Writer w)
+   {
+      this.out = new PrintWriter(w);
+   }
+
+   public SOAPElementWriter(OutputStream stream)
+   {
+      try
+      {
+         this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
+      }
+      catch (UnsupportedEncodingException e)
+      {
+         // ignore, UTF-8 should be available
+      }
+   }
+
+   public SOAPElementWriter(OutputStream stream, String charsetName)
+   {
+      try
+      {
+         this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
+         this.charsetName = charsetName;
+      }
+      catch (UnsupportedEncodingException e)
+      {
+         throw new IllegalArgumentException("Unsupported encoding: " + charsetName);
+      }
+   }
+
+   /**
+    * Set wheter the XML declaration should be written.
+    * The default is false.
+    */
+   public SOAPElementWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
+   {
+      this.writeXMLDeclaration = writeXMLDeclaration;
+      return this;
+   }
+
+   /**
+    * Print a node with explicit prettyprinting.
+    * The defaults for all other DOMWriter properties apply.
+    */
+   public static String writeElement(SOAPElementImpl element, boolean pretty)
+   {
+      StringWriter strw = new StringWriter();
+      new SOAPElementWriter(strw).writeElement(element);
+      String xmlStr = strw.toString();
+
+      if (pretty)
+      {
+         try
+         {
+            xmlStr = DOMWriter.printNode(DOMUtils.parse(xmlStr), true);
+         }
+         catch (IOException e)
+         {
+            // ignore
+         }
+      }
+
+      return xmlStr;
+   }
+
+   public void writeElement(SOAPElementImpl element)
+   {
+      writeElementInternal(element);
+   }
+
+   private void writeElementInternal(SOAPElementImpl element)
+   {
+      if (element == null)
+         throw new IllegalArgumentException("Invalid null element");
+
+      try
+      {
+         if (writeXMLDeclaration == true && element instanceof SOAPEnvelope)
+         {
+            out.print("<?xml version='1.0'");
+            if (charsetName != null)
+               out.print(" encoding='" + charsetName + "'");
+
+            out.println("?>");
+            writeXMLDeclaration = false;
+         }
+
+         element.writeElement(out);
+
+         out.flush();
+      }
+      catch (IOException ex)
+      {
+         throw new WSException("Cannot write SOAP element", ex);
+      }
+   }
+}

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPEnvelopeImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPEnvelopeImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPEnvelopeImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,24 +1,24 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ws.soap;
 
 // $Id$
@@ -83,7 +83,7 @@
 
       this.soapPart = soapPart;
       soapPart.setEnvelope(this);
-      
+
       assertEnvelopeNamespace(namespace);
       addNamespaceDeclaration(getPrefix(), namespace);
 
@@ -105,7 +105,7 @@
    {
       return soapPart.getSOAPMessage();
    }
-   
+
    public SOAPBody addBody() throws SOAPException
    {
       SOAPBody body = getBody();
@@ -182,32 +182,4 @@
    {
       return soapPart;
    }
-   public String write(Writer writer, boolean pretty) {
-      try
-      {
-         writer.write("<");
-         String envPrefix = getPrefix();
-         writer.write(envPrefix +":Envelope xmlns:"+getPrefix()+"='"+getNamespaceURI()+"'");
-
-         // namespaces
-         Iterator it = getNamespacePrefixes();
-         while(it.hasNext())
-         {
-            String prefix = (String)it.next();
-            if(!prefix.equals(envPrefix))
-               writer.write(" xmlns:"+prefix+"='"+getNamespaceURI(prefix)+"'");
-         }
-
-         writer.write('>');
-
-         if(pretty)
-            writer.write("\n");
-
-         return("</"+getPrefix()+":Envelope>");
-      }
-      catch (IOException e)
-      {
-         throw new JAXRPCException(e);
-      }
-   }   
 }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPFaultImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPFaultImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPFaultImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,44 +1,45 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ws.soap;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.Iterator;
 import java.util.Locale;
-import java.io.Writer;
 
 import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
 import javax.xml.soap.Detail;
 import javax.xml.soap.Name;
 import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPFault;
-import javax.xml.rpc.JAXRPCException;
 
 import org.jboss.logging.Logger;
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.util.xml.DOMWriter;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
 import org.jboss.xb.QNameBuilder;
-import org.jboss.util.xml.DOMUtils;
-import org.jboss.util.xml.DOMWriter;
 import org.w3c.dom.Element;
 
 /**
@@ -94,14 +95,14 @@
    {
       Detail detail = null;
       Iterator it = getChildElements(new NameImpl("detail"));
-      while(it.hasNext())
+      while (it.hasNext())
       {
          Object obj = it.next();
-         if(obj instanceof Detail)
+         if (obj instanceof Detail)
          {
             detail = (Detail)obj;
          }
-         else if(obj instanceof SOAPElementImpl)
+         else if (obj instanceof SOAPElementImpl)
          {
             try
             {
@@ -233,18 +234,9 @@
       setFaultString(faultString);
       this.faultStringLocale = locale;
    }
-   public String write(Writer writer, boolean pretty) {
-      try
-      {
-         DOMWriter dw = new DOMWriter(writer);
-         dw.setPrettyprint(pretty);
-         dw.print(this);
-      }
-      catch (Exception e)
-      {
-        throw new JAXRPCException(e);
-      }
 
-      return null;
+   public void writeElement(Writer writer)
+   {
+      new DOMWriter(writer).print(this);
    }
 }
\ No newline at end of file

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPHeaderImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPHeaderImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPHeaderImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,44 +1,39 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ws.soap;
 
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.io.Writer;
-import java.io.IOException;
 
 import javax.xml.soap.Name;
 import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.rpc.JAXRPCException;
 
 import org.w3c.dom.DOMException;
 import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Node;
-import org.jboss.ws.WSException;
 
-
 /**
  * A representation of the SOAP header element. A SOAP header element consists of XML data that affects the way the
  * application-specific content is processed by the message provider. For example, transaction semantics,
@@ -58,7 +53,7 @@
       if (!(node instanceof SOAPElementImpl))
          throw new IllegalArgumentException("SOAPElement expected");
 
-      SOAPElementImpl element = (SOAPElementImpl) node;
+      SOAPElementImpl element = (SOAPElementImpl)node;
 
       // convert to SOAPHeaderElement
       element.detachNode();
@@ -178,7 +173,7 @@
 
    public Node appendChild(Node newChild) throws DOMException
    {
-      if (! (newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
+      if (!(newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
          newChild = convertToHeaderElement(newChild);
 
       return super.appendChild(newChild);
@@ -186,7 +181,7 @@
 
    public Node insertBefore(Node newChild, Node refChild) throws DOMException
    {
-      if (! (newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
+      if (!(newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
          newChild = convertToHeaderElement(newChild);
 
       return super.insertBefore(newChild, refChild);
@@ -194,57 +189,9 @@
 
    public Node replaceChild(Node newChild, Node oldChild) throws DOMException
    {
-      if (! (newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
+      if (!(newChild instanceof SOAPHeaderElementImpl || newChild instanceof DocumentFragment))
          newChild = convertToHeaderElement(newChild);
 
       return super.replaceChild(newChild, oldChild);
    }
-   public String write(Writer writer, boolean pretty) {
-      try
-      {
-
-         writer.write('<');
-         writer.write(getParentElement().getPrefix()+":Header");
-
-         // namespaces
-         Iterator it = getNamespacePrefixes();
-         while(it.hasNext())
-         {
-            String prefix = (String)it.next();
-            writer.write(" xmlns:"+prefix+"='"+getNamespaceURI(prefix)+"'");
-         }
-
-         // attributes
-         Iterator attNames = getAllAttributes();
-         while(attNames.hasNext())
-         {
-            NameImpl name = (NameImpl)attNames.next();
-            String attPrefix = name.getPrefix()!=null ? name.getPrefix():"";
-            String attFqn = attPrefix.length()>0 ? attPrefix+":"+name.getLocalName() : name.getLocalName();
-            writer.write(" "+attFqn);
-            writer.write("='"+getAttributeValue(name)+"'");
-         }
-
-         boolean hasChildren = getChildNodes().getLength() > 0;
-         String endTag = null;
-         if(hasChildren)
-         {
-            writer.write('>');
-            endTag = "</"+getParentElement().getPrefix()+":Header>";
-         }
-         else
-         {
-            writer.write("/>");
-         }
-
-         if(pretty)
-            writer.write("\n");
-
-         return endTag;
-      }
-      catch (IOException e)
-      {
-         throw new JAXRPCException(e);
-      }
-   }
 }
\ No newline at end of file

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPMessageImpl.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -275,8 +275,8 @@
          {
             boolean writeXML = isWriteXMLDeclaration();
             String charsetEncoding = getCharSetEncoding();
-            SAAJElementWriter writer = new SAAJElementWriter(outs, charsetEncoding);
-            writer.setWriteXMLDeclaration(writeXML).print((SOAPEnvelopeImpl)soapEnv);
+            SOAPElementWriter writer = new SOAPElementWriter(outs, charsetEncoding);
+            writer.setWriteXMLDeclaration(writeXML).writeElement((SOAPEnvelopeImpl)soapEnv);
          }
       }
    }

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedSwAEncoder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedSwAEncoder.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedSwAEncoder.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -21,7 +21,7 @@
  */
 package org.jboss.ws.soap.attachment;
 
-import org.jboss.ws.soap.SAAJElementWriter;
+import org.jboss.ws.soap.SOAPElementWriter;
 import org.jboss.ws.soap.SOAPElementImpl;
 import org.jboss.ws.soap.SOAPMessageImpl;
 
@@ -71,7 +71,7 @@
        * stream.
        */
       SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
-      String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+      String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, false);
       rootPart.setText(envStr, "UTF-8");
 
       rootPart.setContentID(MimeConstants.ROOTPART_CID);

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedXOPEncoder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedXOPEncoder.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/attachment/MultipartRelatedXOPEncoder.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -21,7 +21,7 @@
  */
 package org.jboss.ws.soap.attachment;
 
-import org.jboss.ws.soap.SAAJElementWriter;
+import org.jboss.ws.soap.SOAPElementWriter;
 import org.jboss.ws.soap.SOAPElementImpl;
 import org.jboss.ws.soap.SOAPMessageImpl;
 
@@ -73,7 +73,7 @@
        * stream.
        */
       SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
-      String envStr = SAAJElementWriter.printSOAPElement((SOAPElementImpl)soapEnv, true);
+      String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, false);
       rootPart.setText(envStr, "UTF-8");
 
       rootPart.setContentID(MimeConstants.ROOTPART_CID);

Modified: branches/tdiesler/trunk/src/test/ant/build-jars.xml
===================================================================
--- branches/tdiesler/trunk/src/test/ant/build-jars.xml	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/ant/build-jars.xml	2006-09-01 18:19:58 UTC (rev 886)
@@ -265,6 +265,18 @@
       </webinf>
     </war>
     
+    <!-- jbossws-jaxws-logicalhandler -->
+    <war warfile="${build.test.dir}/libs/jbossws-jaxws-logicalhandler.war" webxml="${build.test.dir}/resources/jaxws/logicalhandler/WEB-INF/web.xml">
+      <classes dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.class"/>
+        <include name="org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.class"/>
+      </classes>
+      <webinf dir="${build.test.dir}/resources/jaxws/logicalhandler/WEB-INF">
+        <include name="jaxws-server-handlers.xml"/>
+      </webinf>
+    </war>
+    
     <!-- jbossws-jaxws-provider-jaxb -->
     <war warfile="${build.test.dir}/libs/jbossws-jaxws-provider-jaxb.war" webxml="${build.test.dir}/resources/jaxws/provider/jaxb/WEB-INF/web.xml">
       <classes dir="${build.test.dir}/classes">

Modified: branches/tdiesler/trunk/src/test/build.xml
===================================================================
--- branches/tdiesler/trunk/src/test/build.xml	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/build.xml	2006-09-01 18:19:58 UTC (rev 886)
@@ -320,7 +320,7 @@
   </target>
   
   <!-- Run samples test cases -->
-  <target name="tests-samples" depends="main" description="Run samples unit tests">
+  <target name="tests-samples" depends="init" description="Run samples unit tests">
     <antcall target="tests-main">
       <param name="include.wildcard" value="org/jboss/test/ws/samples/**/*TestCase.class"/>
       <param name="excludesfile" value="${tests.excludesfile}"/>
@@ -329,7 +329,7 @@
   </target>
   
   <!-- Run tools test cases -->
-  <target name="tests-tools" depends="main" description="Run tools unit tests">
+  <target name="tests-tools" depends="init" description="Run tools unit tests">
     <antcall target="tests-main">
       <param name="include.wildcard" value="org/jboss/test/ws/tools/**/*TestCase.class"/>
       <param name="excludesfile" value="${tests.noexcludes.file}"/>

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ClientHandler.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ClientHandler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ClientHandler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+// $Id: $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.ws.jaxws.handler.GenericLogicalHandler;
+import org.w3c.dom.Element;
+
+public class ClientHandler extends GenericLogicalHandler
+{
+   @Override
+   public boolean handleOutbound(MessageContext msgContext)
+   {
+      try
+      {
+         // Get the payload as Source
+         LogicalMessageContext logicalContext = (LogicalMessageContext)msgContext;
+         Source source = logicalContext.getMessage().getPayload();
+         TransformerFactory tf = TransformerFactory.newInstance();
+         ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+         tf.newTransformer().transform(source, new StreamResult(baos));
+         
+         // Parse the payload and extract the value
+         Element root = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+         Element element = DOMUtils.getFirstChildElement(root);
+         String value = DOMUtils.getTextContent(element);
+         
+         String handlerName = getHandlerName();
+         value = value + ":" + handlerName;
+         
+         element.setTextContent(value);
+
+         // Set the updated payload
+         source = new DOMSource(element);
+         //logicalContext.getMessage().setPayload(source);
+         
+         return true;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new WebServiceException(ex);
+      }
+   }
+   
+   @Override
+   public boolean handleInbound(MessageContext msgContext)
+   {
+      try
+      {
+         return true;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new WebServiceException(ex);
+      }
+   }
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ClientHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/Echo.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/Echo.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/Echo.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echo complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="echo">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="String_1" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "echo", propOrder = {
+    "string1"
+})
+public class Echo {
+
+    @XmlElement(name = "String_1", namespace = "http://org.jboss.ws/jaxws/logicalhandler", required = true, nillable = true)
+    protected String string1;
+
+    /**
+     * Gets the value of the string1 property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getString1() {
+        return string1;
+    }
+
+    /**
+     * Sets the value of the string1 property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setString1(String value) {
+        this.string1 = value;
+    }
+
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/Echo.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/EchoResponse.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/EchoResponse.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/EchoResponse.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echoResponse complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="echoResponse">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="result" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "echoResponse", propOrder = {
+    "result"
+})
+public class EchoResponse {
+
+    @XmlElement(namespace = "http://org.jboss.ws/jaxws/logicalhandler", required = true, nillable = true)
+    protected String result;
+
+    /**
+     * Gets the value of the result property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResult() {
+        return result;
+    }
+
+    /**
+     * Sets the value of the result property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResult(String value) {
+        this.result = value;
+    }
+
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/EchoResponse.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalHandlerTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalHandlerTestCase.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalHandlerTestCase.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+// $Id: $
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAXWS logical handlers
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-Aug-2006
+ */
+public class LogicalHandlerTestCase extends JBossWSTest
+{
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(LogicalHandlerTestCase.class, "jbossws-jaxws-logicalhandler.war");
+   }
+
+   public void testClientAccess() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jaxws-logicalhandler?wsdl");
+      QName serviceName = new QName("http://org.jboss.ws/jaxws/logicalhandler", "SOAPEndpointService");
+      Service service = Service.create(wsdlURL, serviceName);
+      SOAPEndpoint port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
+
+      String retStr = port.echo("hello");
+      
+      StringBuffer expStr = new StringBuffer("hello");
+      expStr.append(":SOAP12ClientHandler");
+      expStr.append(":SOAPClientHandler");
+      expStr.append(":ServiceClientHandler");
+      expStr.append(":ServiceWildcardClientHandler");
+      expStr.append(":PortClientHandler");
+      expStr.append(":PortWildcardClientHandler");
+      expStr.append(":GeneralClientHandler");
+      expStr.append(":SOAP12ServerHandler");
+      expStr.append(":SOAPServerHandler");
+      expStr.append(":ServiceServerHandler");
+      expStr.append(":ServiceWildcardServerHandler");
+      expStr.append(":PortServerHandler");
+      expStr.append(":PortWildcardServerHandler");
+      expStr.append(":GeneralServerHandler");
+      expStr.append(":endpoint");
+      expStr.append(":GeneralServerHandler");
+      expStr.append(":PortWildcardServerHandler");
+      expStr.append(":PortServerHandler");
+      expStr.append(":ServiceWildcardServerHandler");
+      expStr.append(":ServiceServerHandler");
+      expStr.append(":SOAPServerHandler");
+      expStr.append(":SOAP12ServerHandler");
+      expStr.append(":GeneralClientHandler");
+      expStr.append(":PortWildcardClientHandler");
+      expStr.append(":PortClientHandler");
+      expStr.append(":ServiceWildcardClientHandler");
+      expStr.append(":ServiceClientHandler");
+      expStr.append(":SOAPClientHandler");
+      expStr.append(":SOAP12ClientHandler");
+      assertEquals(expStr.toString(), retStr);
+   }
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalHandlerTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ObjectFactory.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ObjectFactory.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ObjectFactory.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,71 @@
+
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.jboss.test.ws.jaxws.logicalhandler package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _EchoResponse_QNAME = new QName("http://org.jboss.ws/jaxws/logicalhandler", "echoResponse");
+    private final static QName _Echo_QNAME = new QName("http://org.jboss.ws/jaxws/logicalhandler", "echo");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.logicalhandler
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link EchoResponse }
+     * 
+     */
+    public EchoResponse createEchoResponse() {
+        return new EchoResponse();
+    }
+
+    /**
+     * Create an instance of {@link Echo }
+     * 
+     */
+    public Echo createEcho() {
+        return new Echo();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link EchoResponse }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "echoResponse")
+    public JAXBElement<EchoResponse> createEchoResponse(EchoResponse value) {
+        return new JAXBElement<EchoResponse>(_EchoResponse_QNAME, EchoResponse.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Echo }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "echo")
+    public JAXBElement<Echo> createEcho(Echo value) {
+        return new JAXBElement<Echo>(_Echo_QNAME, Echo.class, null, value);
+    }
+
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+// $Id: $
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+ at WebService()
+ at HandlerChain(file = "resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml")
+public interface SOAPEndpoint
+{
+
+   @WebMethod
+   @RequestWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.Echo")
+   @ResponseWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.EchoResponse")
+   public String echo(String string1);
+
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+// $Id: $
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+ at WebService(name = "SOAPEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler")
+ at HandlerChain(file = "WEB-INF/jaxws-server-handlers.xml")
+public class SOAPEndpointBean
+{
+   private static Logger log = Logger.getLogger(SOAPEndpointBean.class);
+
+   @WebMethod
+   public String echo(String msg)
+   {
+      log.info("echo: " + msg);
+      return msg + ":endpoint";
+   }
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.logicalhandler;
+
+// $Id: $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.ws.jaxws.handler.GenericLogicalHandler;
+import org.w3c.dom.Element;
+
+public class ServerHandler extends GenericLogicalHandler
+{
+   @Override
+   public boolean handleOutbound(MessageContext msgContext)
+   {
+      try
+      {
+         Source source = ((LogicalMessageContext)msgContext).getMessage().getPayload();
+         TransformerFactory tf = TransformerFactory.newInstance();
+         ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+         tf.newTransformer().transform(source, new StreamResult(baos));
+
+         Element root = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+         Element element = DOMUtils.getFirstChildElement(root);
+         element = DOMUtils.getFirstChildElement(element);
+         String value = DOMUtils.getTextContent(element);
+
+         String handlerName = getHandlerName();
+         value = value + ":" + handlerName;
+
+         return true;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new WebServiceException(ex);
+      }
+   }
+
+   @Override
+   public boolean handleInbound(MessageContext msgContext)
+   {
+      try
+      {
+         return true;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new WebServiceException(ex);
+      }
+   }
+}


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/ServerHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/package-info.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/package-info.java	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/package-info.java	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,2 @@
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.ws/jaxws/logicalhandler")
+package org.jboss.test.ws.jaxws.logicalhandler;


Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/package-info.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
===================================================================
--- branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl	2006-09-01 18:19:58 UTC (rev 886)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
+  This wsdl is only used for client artifact generation
+  
   wsimport -keep -verbose -d ../../../../java -wsdllocation http://localhost:8080/jbossws-addressing-action-doc?wsdl ./wsdl/ActionDocService.wsdl
 -->
 

Added: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:ns1="http://org.jboss.ws/jaxws/logicalhandler"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
+
+	<handler-chain>
+		<handler>
+			<handler-name> LogicalClientHandler </handler-name>
+			<handler-class> org.jboss.test.ws.jaxws.logicalhandler.ClientHandler </handler-class>
+		</handler>
+	</handler-chain>
+  
+</handler-chains>
\ No newline at end of file


Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/jaxws-client-handlers.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/TestService.wsdl
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/TestService.wsdl	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/TestService.wsdl	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,74 @@
+
+<!--
+  This wsdl is only used for client artifact generation
+  
+  wsimport -keep -verbose -d ../../../../java ./wsdl/TestService.wsdl
+-->
+
+<definitions name='SOAPEndpointService' targetNamespace='http://org.jboss.ws/jaxws/logicalhandler' xmlns='http://schemas.xmlsoap.org/wsdl/'
+  xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/jaxws/logicalhandler' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+  
+  <jaxws:bindings>
+    <jaxws:package name="org.jboss.test.ws.jaxws.logicalhandler"/>
+  </jaxws:bindings>
+  
+  <types>
+    <schema elementFormDefault='qualified' targetNamespace='http://org.jboss.ws/jaxws/logicalhandler' xmlns='http://www.w3.org/2001/XMLSchema'
+      xmlns:tns='http://org.jboss.ws/jaxws/logicalhandler' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+      jaxb:version="2.0">
+
+      <xsd:annotation><xsd:appinfo>
+        <jaxb:schemaBindings>
+          <jaxb:package name="org.jboss.test.ws.jaxws.logicalhandler"/>
+        </jaxb:schemaBindings>
+      </xsd:appinfo></xsd:annotation>
+      
+      <complexType name='echo'>
+        <sequence>
+          <element name="String_1" type="string" nillable="true"/>
+        </sequence>
+      </complexType>
+      <complexType name='echoResponse'>
+        <sequence>
+          <element name="result" type="string" nillable="true"/>
+        </sequence>
+      </complexType>
+      <element name='echo' type='tns:echo'/>
+      <element name='echoResponse' type='tns:echoResponse'/>
+    </schema>
+  </types>
+  
+  <message name='SOAPEndpoint_echo'>
+    <part element='tns:echo' name='parameters'/>
+  </message>
+  <message name='SOAPEndpoint_echoResponse'>
+    <part element='tns:echoResponse' name='result'/>
+  </message>
+  
+  <portType name='SOAPEndpoint'>
+    <operation name='echo'>
+      <input message='tns:SOAPEndpoint_echo'/>
+      <output message='tns:SOAPEndpoint_echoResponse'/>
+    </operation>
+  </portType>
+  
+  <binding name='SOAPEndpointBinding' type='tns:SOAPEndpoint'>
+    <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+    <operation name='echo'>
+      <soap:operation soapAction=''/>
+      <input>
+        <soap:body use='literal'/>
+      </input>
+      <output>
+        <soap:body use='literal'/>
+      </output>
+    </operation>
+  </binding>
+  
+  <service name='SOAPEndpointService'>
+    <port binding='tns:SOAPEndpointBinding' name='SOAPEndpointPort'>
+      <soap:address location='http://@jbosstest.host.name@:8080/jbossws-jaxws-logicalhandler/TestService'/>
+    </port>
+  </service>
+</definitions>
\ No newline at end of file


Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/META-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/jaxws-server-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/jaxws-server-handlers.xml	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/jaxws-server-handlers.xml	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:ns1="http://org.jboss.ws/jaxws/logicalhandler"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
+
+	<handler-chain>
+		<handler>
+			<handler-name> LogicalServerHandler </handler-name>
+			<handler-class> org.jboss.test.ws.jaxws.logicalhandler.ServerHandler </handler-class>
+		</handler>
+	</handler-chain>
+  
+</handler-chains>
\ No newline at end of file


Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/jaxws-server-handlers.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/web.xml	2006-09-01 11:48:07 UTC (rev 885)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/web.xml	2006-09-01 18:19:58 UTC (rev 886)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+  version="2.4">
+
+  <servlet>
+    <servlet-name>TestService</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.logicalhandler.SOAPEndpointBean</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>TestService</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+
+</web-app>
+


Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/logicalhandler/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-svn-commits mailing list