You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pr...@apache.org on 2007/08/09 17:15:50 UTC

svn commit: r564235 [7/9] - in /webservices/axis2/branches/java/jaxws21: ./ legal/ modules/adb-codegen/src/org/apache/axis2/schema/template/ modules/adb/src/org/apache/axis2/databinding/utils/ modules/addressing/src/org/apache/axis2/handlers/addressing...

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Thu Aug  9 08:14:52 2007
@@ -73,6 +73,8 @@
 
     private OMNamespace wsdl;
 
+    private OMNamespace wsaw;
+
     private String style = DOCUMENT;
 
     private String use = LITERAL;
@@ -135,6 +137,7 @@
         soap12 = ele.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX);
         http = ele.declareNamespace(HTTP_NAMESPACE, HTTP_PREFIX);
         mime = ele.declareNamespace(MIME_NAMESPACE, MIME_PREFIX);
+        wsaw =ele.declareNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
         String prefix = WSDLSerializationUtil.getPrefix(axisService.getTargetNamespace(),
                                                         namespaceMap);
         if (prefix == null || "".equals(prefix)) {
@@ -345,6 +348,8 @@
             operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
             addPolicyAsExtElement(PolicyInclude.OPERATION_POLICY, axisOperation
                     .getPolicyInclude(), operation);
+            addPolicyAsExtElement(PolicyInclude.AXIS_OPERATION_POLICY, axisOperation
+                    .getPolicyInclude(), operation);
 
             String MEP = axisOperation.getMessageExchangePattern();
             if (WSDL2Constants.MEP_URI_IN_ONLY.equals(MEP)
@@ -368,8 +373,11 @@
                             + ":" + inaxisMessage.getName(), null);
                     addPolicyAsExtElement(PolicyInclude.INPUT_POLICY,
                                           inaxisMessage.getPolicyInclude(), input);
+                    addPolicyAsExtElement(PolicyInclude.AXIS_MESSAGE_POLICY,
+                                          inaxisMessage.getPolicyInclude(), input);
+                    
                     WSDLSerializationUtil.addWSAWActionAttribute(input, axisOperation
-                            .getInputAction());
+                            .getInputAction(),wsaw);
                     operation.addChild(input);
                 }
             }
@@ -395,8 +403,10 @@
                             + ":" + outAxisMessage.getName(), null);
                     addPolicyAsExtElement(PolicyInclude.OUTPUT_POLICY,
                                           outAxisMessage.getPolicyInclude(), output);
+                    addPolicyAsExtElement(PolicyInclude.AXIS_MESSAGE_POLICY,
+                            outAxisMessage.getPolicyInclude(), output);
                     WSDLSerializationUtil.addWSAWActionAttribute(output, axisOperation
-                            .getOutputAction());
+                            .getOutputAction(),wsaw);
                     operation.addChild(output);
                 }
             }
@@ -414,7 +424,7 @@
                             + ":" + faultyMessage.getName(), null);
                     fault.addAttribute(ATTRIBUTE_NAME, faultyMessage.getName(), null);
                     WSDLSerializationUtil.addWSAWActionAttribute(fault, axisOperation
-                            .getFaultAction(faultyMessage.getName()));
+                            .getFaultAction(faultyMessage.getName()),wsaw);
                     // TODO add policies for fault messages
                     operation.addChild(fault);
                 }
@@ -441,6 +451,9 @@
 
         addPolicyAsExtElement(PolicyInclude.SERVICE_POLICY, axisService
                 .getPolicyInclude(), service);
+        addPolicyAsExtElement(PolicyInclude.AXIS_SERVICE_POLICY, axisService.
+                getPolicyInclude(), service);
+        
         if (!disableREST) {
             generateHTTPPorts(fac, service);
         }
@@ -535,8 +548,6 @@
         binding.addAttribute("type", tns.getPrefix() + ":"
                 + axisService.getName() + PORT_TYPE_SUFFIX, null);
 
-        addPolicyAsExtElement(PolicyInclude.AXIS_SERVICE_POLICY, axisService
-                .getPolicyInclude(), binding);
         addPolicyAsExtElement(PolicyInclude.BINDING_POLICY, axisService
                 .getPolicyInclude(), binding);
 
@@ -548,20 +559,16 @@
         // SHOULD be on the binding element per the specification
         if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_OPTIONAL)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         } else if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         }
 
         for (Iterator operations = axisService.getOperations(); operations.hasNext();) {
@@ -582,8 +589,6 @@
 
             addPolicyAsExtElement(PolicyInclude.BINDING_OPERATION_POLICY,
                                   axisOperation.getPolicyInclude(), operation);
-            addPolicyAsExtElement(PolicyInclude.AXIS_OPERATION_POLICY,
-                                  axisOperation.getPolicyInclude(), operation);
 
             String MEP = axisOperation.getMessageExchangePattern();
 
@@ -675,8 +680,6 @@
         binding.addAttribute("type", tns.getPrefix() + ":"
                 + axisService.getName() + PORT_TYPE_SUFFIX, null);
 
-        addPolicyAsExtElement(PolicyInclude.AXIS_SERVICE_POLICY, axisService
-                .getPolicyInclude(), binding);
         addPolicyAsExtElement(PolicyInclude.BINDING_POLICY, axisService
                 .getPolicyInclude(), binding);
 
@@ -688,20 +691,16 @@
         // SHOULD be on the binding element per the specification
         if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_OPTIONAL)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         } else if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         }
 
         for (Iterator operations = axisService.getOperations(); operations.hasNext();) {
@@ -722,8 +721,7 @@
 
             addPolicyAsExtElement(PolicyInclude.BINDING_OPERATION_POLICY,
                                   axisOperation.getPolicyInclude(), operation);
-            addPolicyAsExtElement(PolicyInclude.AXIS_OPERATION_POLICY,
-                                  axisOperation.getPolicyInclude(), operation);
+
 
             String MEP = axisOperation.getMessageExchangePattern();
 
@@ -931,7 +929,7 @@
         }
     }
 
-    private void addPolicyAsExtElement(int type, PolicyInclude policyInclude, OMElement element)
+    private void addPolicyAsExtElement(int type, PolicyInclude policyInclude, OMElement parentElement)
             throws Exception {
         ArrayList elementList = policyInclude.getPolicyElements(type);
 
@@ -939,14 +937,28 @@
             Object policyElement = iterator.next();
 
             if (policyElement instanceof Policy) {
-                element.addChild(PolicyUtil.getPolicyComponentAsOMElement(
-                        (PolicyComponent) policyElement, serializer));
+                OMElement child = PolicyUtil.getPolicyComponentAsOMElement(
+                        (PolicyComponent) policyElement, serializer);
+                
+                OMNode firstChildElem = parentElement.getFirstElement();
+                
+                if (firstChildElem == null) {
+                    parentElement.addChild(child);
+                } else {
+                    firstChildElem.insertSiblingBefore(child);
+                }
 
             } else if (policyElement instanceof PolicyReference) {
-                element
-                        .addChild(PolicyUtil
-                                .getPolicyComponentAsOMElement((PolicyComponent) policyElement));
-
+                OMElement child = PolicyUtil
+                                .getPolicyComponentAsOMElement((PolicyComponent) policyElement);
+                OMElement firstChildElem = parentElement.getFirstElement();
+                
+                if (firstChildElem == null) {
+                    parentElement.addChild(child);
+                } else {
+                    firstChildElem.insertSiblingBefore(child);
+                }
+                
                 PolicyRegistry reg = policyInclude.getPolicyRegistry();
                 String key = ((PolicyReference) policyElement).getURI();
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java Thu Aug  9 08:14:52 2007
@@ -30,6 +30,7 @@
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.ws.commons.schema.XmlSchema;
 
@@ -49,6 +50,7 @@
 
     private AxisService axisService;
     private String[] eprs = null;
+    private OMNamespace wsaw;
 
     public AxisService2WSDL20(AxisService service) {
         this.axisService = service;
@@ -82,7 +84,7 @@
         WSDLSerializationUtil.populateNamespaces(descriptionElement, nameSpacesMap);
 
         descriptionElement.declareNamespace(axisService.getTargetNamespace(), axisService.getTargetNamespacePrefix());
-
+        wsaw = descriptionElement.declareNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
         // Need to add the targetnamespace as an attribute according to the wsdl 2.0 spec
         OMAttribute targetNamespace = omFactory
                 .createOMAttribute(WSDL2Constants.TARGET_NAMESPACE, null,
@@ -248,7 +250,7 @@
                                                    interfaceName,
                                                    axisService.getNamespaceMap(),
                                                    axisService.getWSAddressingFlag(),
-                                                   axisService.getName()));
+                                                   axisService.getName(),wsaw));
             }
 
             descriptionElement.addChild(serviceElement);
@@ -395,7 +397,7 @@
         if (inMessage != null) {
             OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, wsdl);
             inMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(inMessage, nameSpaceMap)));
-            WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, axisOperation.getInputAction());
+            WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, axisOperation.getInputAction(),wsaw);
             WSDLSerializationUtil.addWSDLDocumentationElement(inMessage, inMessageElement, omFactory, wsdl);
             axisOperationElement.addChild(inMessageElement);
         }
@@ -405,7 +407,7 @@
         if (outMessage != null) {
             OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, wsdl);
             outMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(outMessage, nameSpaceMap)));
-            WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, axisOperation.getOutputAction());
+            WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, axisOperation.getOutputAction(),wsaw);
             WSDLSerializationUtil.addWSDLDocumentationElement(outMessage, outMessageElement, omFactory, wsdl);
             axisOperationElement.addChild(outMessageElement);
         }
@@ -423,7 +425,7 @@
                     faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, wsdl);
                 }
                 faultElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + faultMessage.getName()));
-                WSDLSerializationUtil.addWSAWActionAttribute(faultElement, axisOperation.getFaultAction(faultMessage.getName()));
+                WSDLSerializationUtil.addWSAWActionAttribute(faultElement, axisOperation.getFaultAction(faultMessage.getName()),wsaw);
                 WSDLSerializationUtil.addWSDLDocumentationElement(faultMessage, faultElement, omFactory, wsdl);
                 axisOperationElement.addChild(faultElement);
             }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Thu Aug  9 08:14:52 2007
@@ -499,6 +499,7 @@
          * @param msgContext the MessageContext containing the fault.
          */
         public void onFault(MessageContext msgContext) {
+           error =Utils.getInboundFaultFromMessageContext(msgContext);
         }
 
         /**

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Thu Aug  9 08:14:52 2007
@@ -284,16 +284,22 @@
             return axisService;
 
         } catch (WSDLException e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
             throw AxisFault.makeFault(e);
         } catch (Exception e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
             throw AxisFault.makeFault(e);
         }
     }
 
     private void processTypes(Definition wsdlDefinition, AxisService axisService)
             throws AxisFault {
+        processTypes(wsdlDefinition, axisService, new Stack());
+    }
+
+    private void processTypes(Definition wsdlDefinition, AxisService axisService, Stack stack)
+            throws AxisFault {
+        stack.push(wsdlDefinition);
         // process all the types in all the wsdls
         Types types = wsdlDefinition.getTypes();
         if (types != null) {
@@ -312,9 +318,13 @@
             for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
                 wsdlImport = (Import) valuesIter.next();
                 // process the types recuresiveilt
-                processTypes(wsdlImport.getDefinition(), axisService);
+                Definition innerDefinition = wsdlImport.getDefinition();
+                if(!stack.contains(innerDefinition)){
+                    processTypes(innerDefinition, axisService, stack);
+                }
             }
         }
+        stack.pop();
     }
 
     private void addDocumentation(AxisDescription axisDescription, Element documentationElement) {
@@ -634,7 +644,7 @@
 
         // setup the schemaMap
         this.schemaMap = new HashMap();
-        populateSchemaMap(wsdl4jDefinition);
+        populateSchemaMap(wsdl4jDefinition, new Stack());
 
         setPolicyRegistryFromService(axisService);
 
@@ -650,8 +660,8 @@
      * @param definition
      */
 
-    private void populateSchemaMap(Definition definition) {
-
+    private void populateSchemaMap(Definition definition, Stack stack) {
+        stack.push(definition);
         Types types = definition.getTypes();
         Object extensibilityElement;
         if (types != null) {
@@ -673,9 +683,13 @@
             values = (Vector) iter.next();
             for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
                 wsdlImport = (Import) valuesIter.next();
-                populateSchemaMap(wsdlImport.getDefinition());
+                Definition innerDefinition = wsdlImport.getDefinition();
+                if(!stack.contains(innerDefinition)) {
+                    populateSchemaMap(innerDefinition, stack);
+                }
             }
         }
+        stack.pop();
     }
 
 
@@ -824,6 +838,19 @@
      */
 
     private PortType getPortType(QName portTypeQName, Definition definition) {
+        return getPortType(portTypeQName, definition, new Stack());
+    }
+
+    /**
+     * get the port type form all the imported documents
+     *
+     * @param portTypeQName
+     * @param definition
+     * @return portType
+     */
+
+    private PortType getPortType(QName portTypeQName, Definition definition, Stack stack) {
+        stack.push(definition);
         PortType portType = null;
         Iterator iter = definition.getImports().values().iterator();
         Vector values = null;
@@ -832,10 +859,13 @@
             values = (Vector) iter.next();
             for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
                 wsdlImport = (Import) valuesIter.next();
-                // find the binding recursively
-                portType = getPortType(portTypeQName, wsdlImport.getDefinition());
-                if (portType != null) {
-                    break;
+                Definition innerDefinition = wsdlImport.getDefinition();
+                if(stack.contains(innerDefinition)){
+                    // find the binding recursively
+                    portType = getPortType(portTypeQName, innerDefinition, stack);
+                    if (portType != null) {
+                        break;
+                    }
                 }
             }
             if (portType != null) {
@@ -847,9 +877,25 @@
             // this can be in a imported wsdl
             portType = definition.getPortType(portTypeQName);
         }
+        stack.pop();
         return portType;
     }
 
+    private Binding getBinding(QName bindingQName, Definition definition) {
+        ArrayList list = new ArrayList();
+        Binding binding = getBinding(bindingQName, definition, list);
+        if (binding == null) {
+            for(int i=0;i<list.size();i++){
+                Binding binding2 = definition.getBinding(bindingQName);
+                if(binding2 != null && binding2.getPortType() != null){
+                    binding = binding2;
+                    break;
+                }
+            }
+        }
+        return binding;
+    }
+
     /**
      * first find the binding in the given definition
      * if not found serch in the imported doucuments
@@ -859,8 +905,8 @@
      * @return binding
      */
 
-    private Binding getBinding(QName bindingQName, Definition definition) {
-
+    private Binding getBinding(QName bindingQName, Definition definition, ArrayList list) {
+        list.add(definition);
         Binding binding = null;
         //first try to find a binding in the upper inmport
         Iterator iter = definition.getImports().values().iterator();
@@ -870,20 +916,19 @@
             values = (Vector) iter.next();
             for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
                 wsdlImport = (Import) valuesIter.next();
-                // find the binding recursively
-                binding = getBinding(bindingQName, wsdlImport.getDefinition());
-                if (binding != null) {
-                    break;
+                Definition innerDefinition = wsdlImport.getDefinition();
+                if(!list.contains(innerDefinition)) {
+                    // find the binding recursively
+                    binding = getBinding(bindingQName, innerDefinition, list);
+                    if (binding != null) {
+                        break;
+                    }
                 }
             }
             if (binding != null) {
                 break;
             }
         }
-
-        if (binding == null) {
-            binding = definition.getBinding(bindingQName);
-        }
         return binding;
     }
 
@@ -2554,7 +2599,16 @@
      * @param definition
      */
     private void processPoliciesInDefintion(Definition definition) {
+        processPoliciesInDefintion(definition, new Stack());
+    }
 
+    /**
+     * Process the policy definitions
+     *
+     * @param definition
+     */
+    private void processPoliciesInDefintion(Definition definition, Stack stack) {
+        stack.push(definition);
         List extElements = definition.getExtensibilityElements();
         ExtensibilityElement extElement;
         UnknownExtensibilityElement unknown = null;
@@ -2585,10 +2639,14 @@
             values = (Vector) iter.next();
             for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
                 wsdlImport = (Import) valuesIter.next();
+                Definition innerDefinition = wsdlImport.getDefinition();
                 // find the binding recursively
-                processPoliciesInDefintion(wsdlImport.getDefinition());
+                if(!stack.contains(innerDefinition)) {
+                    processPoliciesInDefintion(innerDefinition, stack);
+                }
             }
         }
+        stack.pop();
     }
 
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Thu Aug  9 08:14:52 2007
@@ -692,7 +692,14 @@
             elt1.setMaxOccurs(Long.MAX_VALUE);
         }
         elt1.setMinOccurs(0);
-        elt1.setNillable(true);
+        if (!("int".equals(schemaTypeName.getLocalPart()) ||
+                "double".equals(schemaTypeName.getLocalPart()) ||
+                "long".equals(schemaTypeName.getLocalPart()) ||
+                "boolean".equals(schemaTypeName.getLocalPart()) ||
+                "short".equals(schemaTypeName.getLocalPart()) ||
+                "float".equals(schemaTypeName.getLocalPart()) )) {
+            elt1.setNillable(true);
+        }
     }
 
     private XmlSchemaComplexType createSchemaTypeForMethodPart(String localPartName) {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/HTTPLocationBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/HTTPLocationBasedDispatcher.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/HTTPLocationBasedDispatcher.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dispatchers/HTTPLocationBasedDispatcher.java Thu Aug  9 08:14:52 2007
@@ -51,7 +51,7 @@
             throws AxisFault {
 
         AxisService axisService = messageContext.getAxisService();
-        if (axisService != null) {
+        if (axisService != null && messageContext.getTo() != null) {
             String uri = messageContext.getTo().getAddress();
             String httpLocation = parseRequestURL(uri, messageContext
                     .getConfigurationContext().getServiceContextPath());

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Thu Aug  9 08:14:52 2007
@@ -173,7 +173,7 @@
             // Figure out where this goes
             sendFault(faultMC);
         } catch (AxisFault axisFault) {
-            log.error(axisFault);
+            log.error(axisFault.getMessage(), axisFault);
         }
     }
 
@@ -369,9 +369,8 @@
         ArrayList executionChain = operationContext.getAxisOperation().getPhasesOutFlow();
         //rather than having two steps added both oparation and global chain together
         ArrayList outPhases = new ArrayList();
-        outPhases.addAll((ArrayList) executionChain.clone());
-        outPhases.addAll((ArrayList) msgContext.getConfigurationContext()
-                .getAxisConfiguration().getOutFlowPhases().clone());
+        outPhases.addAll(executionChain);
+        outPhases.addAll(msgContext.getConfigurationContext().getAxisConfiguration().getOutFlowPhases());
         msgContext.setExecutionChain(outPhases);
         msgContext.setFLOW(MessageContext.OUT_FLOW);
         try {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DispatchPhase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DispatchPhase.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DispatchPhase.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DispatchPhase.java Thu Aug  9 08:14:52 2007
@@ -59,8 +59,10 @@
         EndpointReference toEPR = msgContext.getTo();
 
         if (msgContext.getAxisService() == null) {
-            throw new AxisFault(Messages.getMessage("servicenotfoundforepr",
+            AxisFault fault = new AxisFault(Messages.getMessage("servicenotfoundforepr",
                                                     ((toEPR != null) ? toEPR.getAddress() : "")));
+            fault.setFaultCode(org.apache.axis2.namespace.Constants.FAULT_CLIENT);
+            throw fault;
         }
 
         AxisService service = msgContext.getAxisService();
@@ -81,9 +83,11 @@
 
         // If we still don't have an operation, fault.
         if (operation == null) {
-            throw new AxisFault(Messages.getMessage("operationnotfoundforepr",
+            AxisFault fault = new AxisFault(Messages.getMessage("operationnotfoundforepr",
                                                     ((toEPR != null) ? toEPR.getAddress()
                                                             : ""), msgContext.getWSAAction()));
+            fault.setFaultCode(org.apache.axis2.namespace.Constants.FAULT_CLIENT);
+            throw fault;
         }
 
         validateTransport(msgContext);

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java Thu Aug  9 08:14:52 2007
@@ -243,7 +243,7 @@
                     listenerManager.stop();
                 }
             } catch (AxisFault axisFault) {
-                log.error(axisFault);
+                log.error(axisFault.getMessage(), axisFault);
             }
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties Thu Aug  9 08:14:52 2007
@@ -126,9 +126,10 @@
 invalidmodulerefbyop={0} operation refers to the {1} module, which is not valid.
 addingnewmodule=Adding new module
 settingcl=The service is setting the {0} class loader.
-deployingws=Deploying Web service: {0}
+deployingws=Deploying Web service: {0} - {1}
 invalidservice=The {0} service, which is not valid, caused {1}
-deployeingmodule=Deploying module: {0}
+deployingmodule=Deploying module: {0} - {1}
+deployingpojo=Deploying pojo: {0} - {1}
 invalidmodule=The {0} module, which is not valid, caused {1}
 serviceremoved=Undeploying Web service: {0}
 typemappingnotallowed=Type Mappings are not allowed in the axis2.xml file.

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java Thu Aug  9 08:14:52 2007
@@ -34,6 +34,7 @@
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.InOnlyAxisOperation;
+import org.apache.axis2.description.WSDL2Constants;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.engine.AxisEngine;
@@ -95,7 +96,8 @@
             invokeBusinessLogic(messageCtx);
         } catch (AxisFault fault) {
             // If we're in-only, eat this.  Otherwise, toss it upwards!
-            if (messageCtx.getAxisOperation() instanceof InOnlyAxisOperation) {
+            if ((messageCtx.getAxisOperation() instanceof InOnlyAxisOperation) &&
+                    !WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(messageCtx.getAxisOperation().getMessageExchangePattern())) {
                 log.error(fault);
             } else {
                 throw fault;
@@ -245,7 +247,7 @@
             } catch (AxisFault e) {
                 // If we're IN-ONLY, swallow this.  Otherwise, send it.
                 if (messageCtx.getAxisOperation() instanceof InOnlyAxisOperation) {
-                    log.debug(e);
+                    log.debug(e.getMessage(), e);
                 } else {
                     try {
                         MessageContext faultContext =
@@ -253,9 +255,9 @@
 
                         AxisEngine.sendFault(faultContext);
                     } catch (AxisFault axisFault) {
-                        log.error(e);
+                        log.error(e.getMessage(), e);
                     }
-                    log.error(e);
+                    log.error(e.getMessage(), e);
                 }
             }
         }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java Thu Aug  9 08:14:52 2007
@@ -87,6 +87,8 @@
             repoLocation = repoOption.getOptionValue();
             log.info("[SimpleAxisServer] Using the Axis2 Repository"
                     + new File(repoLocation).getAbsolutePath());
+            System.out.println("[SimpleAxisServer] Using the Axis2 Repository"
+                    + new File(repoLocation).getAbsolutePath());
         }
         if (confOption != null) {
             confLocation = confOption.getOptionValue();
@@ -99,8 +101,10 @@
             SimpleAxis2Server server = new SimpleAxis2Server(repoLocation, confLocation);
             server.start();
             log.info("[SimpleAxisServer] Started");
+            System.out.println("[SimpleAxisServer] Started");
         } catch (Throwable t) {
             log.fatal("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer", t);
+            System.err.println("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer");
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java Thu Aug  9 08:14:52 2007
@@ -93,9 +93,9 @@
                 }
             }
         } catch (Exception e) {
-            log.info(e);
+            log.info(e.getMessage(), e);
         } catch (Throwable e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Thu Aug  9 08:14:52 2007
@@ -25,6 +25,7 @@
 import org.apache.axiom.om.impl.builder.StAXBuilder;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFaultCode;
+import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingHelper;
@@ -155,7 +156,7 @@
                     throw new ServletException(e);
                 }
             } catch (Throwable t) {
-                log.error(t);
+                log.error(t.getMessage(), t);
                 try {
                     // If the fault is not going along the back channel we should be 202ing
                     if (AddressingHelper.isFaultRedirected(msgContext)) {
@@ -167,11 +168,14 @@
                                 (AxisBindingOperation) msgContext
                                         .getProperty(Constants.AXIS_BINDING_OPERATION);
                         if (axisBindingOperation != null) {
-                            Integer code = (Integer) axisBindingOperation.getFault(
-                                    (String) msgContext.getProperty(Constants.FAULT_NAME))
-                                    .getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
-                            if (code != null) {
-                                response.setStatus(code.intValue());
+                            AxisBindingMessage axisBindingMessage = axisBindingOperation.getFault(
+                                    (String) msgContext.getProperty(Constants.FAULT_NAME));
+                            if(axisBindingMessage != null){
+                                Integer code = (Integer) axisBindingMessage
+                                        .getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
+                                if (code != null) {
+                                    response.setStatus(code.intValue());
+                                }
                             }
                         }
                     }
@@ -308,16 +312,17 @@
     private void closeStaxBuilder(MessageContext messageContext) throws ServletException {
         if (closeReader && messageContext != null) {
             try {
-                StAXBuilder builder = (StAXBuilder) messageContext.getEnvelope().getBuilder();
-                if (builder != null) {
-                    builder.close();
+                SOAPEnvelope envelope = messageContext.getEnvelope();
+                if(envelope != null) {
+                    StAXBuilder builder = (StAXBuilder) envelope.getBuilder();
+                    if (builder != null) {
+                        builder.close();
+                    }
                 }
             } catch (Exception e) {
-                log.debug(e);
-                throw new ServletException(e);
+                log.debug(e.toString(), e);
             }
         }
-
     }
 
     /**

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Thu Aug  9 08:14:52 2007
@@ -294,7 +294,7 @@
                 messageFormatter.writeTo(msgContext, format, out, false);
             }
         } catch (AxisFault axisFault) {
-            log.error(axisFault);
+            log.error(axisFault.getMessage(), axisFault);
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/ListingAgent.java Thu Aug  9 08:14:52 2007
@@ -30,15 +30,16 @@
 import org.apache.axis2.deployment.DeploymentConstants;
 import org.apache.axis2.description.AxisDescription;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.PolicyInclude;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.util.ExternalPolicySerializer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyRegistry;
 import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -51,7 +52,11 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 public class ListingAgent extends AbstractAgent {
 
@@ -113,8 +118,12 @@
             ip = filePart.substring(ipindex + 2, filePart.length());
             int seperatorIndex = ip.indexOf(":");
             int slashIndex = ip.indexOf("/");
-            String portstr = ip.substring(seperatorIndex + 1,
-                                          slashIndex);
+            String portstr;
+            if (seperatorIndex >= 0) {
+                portstr = ip.substring(seperatorIndex + 1, slashIndex);
+            } else {
+                portstr = "80";
+            }
             try {
                 addTransportListner(httpServletRequest.getScheme(), Integer.parseInt(portstr));
             } catch (NumberFormatException e) {
@@ -200,13 +209,28 @@
         }
     }
 
+    public String extractServiceName(String urlString) {
+        int n = urlString.indexOf(configContext.getServiceContextPath());
+        if (n != -1) {
+            String serviceName = urlString.substring(n + configContext.getServiceContextPath().length(),
+                    urlString.length());
+            if (serviceName.length() > 0) {
+                if(serviceName.charAt(0)=='/'){
+                    serviceName = serviceName.substring(1);
+                }
+                return serviceName;
+            }
+        }
+        return urlString.substring(urlString.lastIndexOf("/") + 1,
+                urlString.length());
+    }
+
     public void processListService(HttpServletRequest req,
                                    HttpServletResponse res)
             throws IOException, ServletException {
 
-        String filePart = req.getRequestURL().toString();
-        String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1,
-                                                filePart.length());
+        String url = req.getRequestURL().toString();
+        String serviceName = extractServiceName(url);
         HashMap services = configContext.getAxisConfiguration().getServices();
         String query = req.getQueryString();
         int wsdl2 = query.indexOf("wsdl2");
@@ -220,7 +244,7 @@
                 boolean isHttp = "http".equals(req.getScheme());
                 if (wsdl2 >= 0) {
                     res.setContentType("text/xml");
-                    String ip = extractHostAndPort(filePart, isHttp);
+                    String ip = extractHostAndPort(url, isHttp);
                     String wsdlName = req.getParameter("wsdl2");
                     if (wsdlName != null && wsdlName.length()>0) {
                         InputStream in = ((AxisService) serviceObj).getClassLoader()
@@ -244,7 +268,7 @@
                 } else if (wsdl >= 0) {
                     OutputStream out = res.getOutputStream();
                     res.setContentType("text/xml");
-                    String ip = extractHostAndPort(filePart, isHttp);
+                    String ip = extractHostAndPort(url, isHttp);
                     String wsdlName = req.getParameter("wsdl");
 
                     if (wsdlName != null && wsdlName.length()>0) {
@@ -417,6 +441,7 @@
                 }
             } else {
                 req.getSession().setAttribute(Constants.SINGLE_SERVICE, null);
+                res.sendError(HttpServletResponse.SC_NOT_FOUND, url);
             }
         }
 
@@ -491,6 +516,10 @@
         public void init(ConfigurationContext axisConf,
                          TransportInDescription transprtIn) throws AxisFault {
             this.axisConf = axisConf;
+            Parameter param = transprtIn.getParameter(PARAM_PORT);
+            if (param != null) {
+                this.port = Integer.parseInt((String) param.getValue());
+            }
         }
 
         public void start() throws AxisFault {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java Thu Aug  9 08:14:52 2007
@@ -121,9 +121,10 @@
         if (log.isDebugEnabled()) {
             log.debug("contentType from the OMOutputFormat =" + contentType);
         }
-        if (encoding != null) {
-            contentType += "; charset=" + encoding;
-        }
+         if (encoding != null && contentType != null &&
+        		contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED)==-1) {
+             contentType += "; charset=" + encoding;
+         }
 
         // action header is not mandated in SOAP 1.2. So putting it, if
         // available

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java Thu Aug  9 08:14:52 2007
@@ -218,7 +218,7 @@
             embedded.init();
             embedded.start();
         } catch (IOException e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
             throw AxisFault.makeFault(e);
         }
     }
@@ -234,7 +234,7 @@
             try {
                 embedded.destroy();
             } catch (Exception e) {
-                log.error(e);
+                log.error(e.getMessage(), e);
             }
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailServer.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailServer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailServer.java Thu Aug  9 08:14:52 2007
@@ -45,7 +45,7 @@
             log.info("Sleeping for a bit to let the mail server start up.");
             Thread.sleep(2000);
         } catch (InterruptedException e1) {
-            log.error(e1);
+            log.error(e1.getMessage(), e1);
         }
     }
 
@@ -73,14 +73,14 @@
             configurationContext =
                     ConfigurationContextFactory.createConfigurationContextFromFileSystem(dir, null);
         } catch (Exception e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
         }
 
         try {
             log.info("Sleeping for a bit to let the engine start up.");
             Thread.sleep(2000);
         } catch (InterruptedException e1) {
-            log.error(e1);
+            log.error(e1.getMessage(), e1);
         }
 
         st = new Storage();
@@ -94,7 +94,7 @@
             log.info("Sleeping for a bit to let the engine start up.");
             Thread.sleep(2000);
         } catch (InterruptedException e1) {
-            log.error(e1);
+            log.error(e1.getMessage(), e1);
         }
     }
 
@@ -128,7 +128,7 @@
             log.info("Giving some time for the sockets to close.");
             Thread.sleep(2000);
         } catch (InterruptedException e1) {
-            log.error(e1);
+            log.error(e1.getMessage(), e1);
         }
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java Thu Aug  9 08:14:52 2007
@@ -142,7 +142,7 @@
                     engine.sendFault(faultContext);
                 }
             } catch (Exception e1) {
-                log.error(e);
+                log.error(e.getMessage(), e);
             }
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java Thu Aug  9 08:14:52 2007
@@ -53,7 +53,7 @@
 
                 thread.start();
             } catch (Exception e) {
-                log.error(e);
+                log.error(e.getMessage(), e);
             }
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java Thu Aug  9 08:14:52 2007
@@ -173,7 +173,7 @@
 
             socket.close();
         } catch (Exception e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
         }
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java Thu Aug  9 08:14:52 2007
@@ -91,6 +91,7 @@
                                                         Constants.TRANSPORT_TCP));
             }
         } catch (Throwable e) {
+            log.error(e.getMessage(), e);
             try {
                 AxisEngine engine = new AxisEngine(configurationContext);
 
@@ -103,7 +104,7 @@
                     engine.sendFault(faultContext);
                 }
             } catch (Exception e1) {
-                log.error(e);
+                log.error(e1.getMessage(), e1);
             }
         } finally {
             if (socket != null) {

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/PrettyPrinter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/PrettyPrinter.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/PrettyPrinter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/PrettyPrinter.java Thu Aug  9 08:14:52 2007
@@ -79,15 +79,9 @@
             Object settings = instance.invoke(null, new Object[]{});
 
             Class clazz3 = Loader.loadClass("de.hunsicker.jalopy.storage.ConventionKeys");
-            Field field = clazz3.getField("COMMENT_JAVADOC_PARSE");
+            Field field = clazz3.getField("COMMENT_FORMAT_MULTI_LINE");
             Object key = field.get(null);
-
             Method put = clazz2.getMethod("put", new Class[]{key.getClass(), String.class});
-            put.invoke(settings, new Object[]{key, "true"});
-
-            field = clazz3.getField("COMMENT_FORMAT_MULTI_LINE");
-            key = field.get(null);
-            put = clazz2.getMethod("put", new Class[]{key.getClass(), String.class});
             put.invoke(settings, new Object[]{key, "true"});
 
             // format and overwrite the given input file

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java Thu Aug  9 08:14:52 2007
@@ -414,13 +414,13 @@
         }
     }
 
-    public static void addWSAWActionAttribute(OMElement element, String action) {
+    public static void addWSAWActionAttribute(OMElement element,
+                                              String action ,
+                                              OMNamespace wsaw) {
         if (action == null || action.length() == 0) {
             return;
         }
-        OMNamespace namespace = element.declareNamespace(
-                AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
-        element.addAttribute("Action", action, namespace);
+        element.addAttribute("Action", action, wsaw);
     }
 
     public static void addExtensionElement(OMFactory fac, OMElement element,
@@ -433,23 +433,20 @@
 
     public static void addWSAddressingToBinding(String addressingFlag,
                                                 OMFactory omFactory,
-                                                OMElement bindingElement) {
+                                                OMElement bindingElement ,
+                                                OMNamespace wsaw) {
         // Add WS-Addressing UsingAddressing element if appropriate
         // SHOULD be on the binding element per the specification
         if (addressingFlag.equals(AddressingConstants.ADDRESSING_OPTIONAL)) {
-            OMNamespace wsawNamespace = omFactory.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(omFactory, bindingElement,
                                 AddressingConstants.USING_ADDRESSING,
                                 "required", "true",
-                                wsawNamespace);
+                                wsaw);
         } else if (addressingFlag.equals(AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = omFactory.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(omFactory, bindingElement,
                                 AddressingConstants.USING_ADDRESSING,
                                 "required", "true",
-                                wsawNamespace);
+                                wsaw);
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLPrettyPrinter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLPrettyPrinter.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLPrettyPrinter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/XMLPrettyPrinter.java Thu Aug  9 08:14:52 2007
@@ -38,6 +38,7 @@
 import java.io.OutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ByteArrayInputStream;
+import java.io.IOException;
 
 /**
  * An XML pretty printer based on xsl stylesheets
@@ -52,10 +53,13 @@
      * @param file
      */
     public static void prettify(final File file) {
+        InputStream inputStream = null;
+        FileOutputStream outputStream = null;
+        byte[] byteArray = null;
         try {
-            InputStream inputStream = new ByteArrayInputStream(IOUtils.getStreamAsByteArray(new FileInputStream(file)));
-
-            FileOutputStream outputStream = new FileOutputStream(file);
+            byteArray = IOUtils.getStreamAsByteArray(new FileInputStream(file));
+            inputStream = new ByteArrayInputStream(byteArray);
+            outputStream = new FileOutputStream(file);
 
             Source stylesheetSource = new StreamSource(new ByteArrayInputStream(prettyPrintStylesheet.getBytes()));
             Source xmlSource = new StreamSource(inputStream);
@@ -81,12 +85,32 @@
             inputStream.close();
             outputStream.close();
             log.debug("Pretty printed file : " + file);
-        } catch (Exception e) {
-            log.warn("Exception occurred while trying to pretty print file " + file, e);
         } catch (Throwable t) {
             log.debug("Exception occurred while trying to pretty print file " + file, t);
+            try {
+                if (byteArray != null) {
+                    outputStream = new FileOutputStream(file);
+                    outputStream.write(byteArray);
+                }
+            } catch (IOException e) {
+                log.debug(e.getMessage(), e);
+            }
+        } finally {
+            if (inputStream != null) {
+                try {
+                    inputStream.close();
+                } catch (IOException e) {
+                    log.debug(e.getMessage(), e);
+                }
+            }
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    log.debug(e.getMessage(), e);
+                }
+            }
         }
-
     }
 
 

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java Thu Aug  9 08:14:52 2007
@@ -221,7 +221,7 @@
         return paramType;
 	}
     
-    private static String getType(Type type, String paramType) {
+    public static String getType(Type type, String paramType) {
         if (type instanceof Class) {
             paramType = paramType + ((Class)type).getName();
         } else if (type instanceof ParameterizedType) {

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaParamToPDCConverter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaParamToPDCConverter.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaParamToPDCConverter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaParamToPDCConverter.java Thu Aug  9 08:14:52 2007
@@ -45,16 +45,8 @@
         for (int i = 0; i < paramTypes.length; i++) {
             ParameterDescriptionComposite pdc = new ParameterDescriptionComposite();
             Type paramType = paramTypes[i];
-            if (paramType instanceof Class) {
-                Class paramClass = (Class)paramType;
-                String fullType = "";
-                pdc.setParameterType(paramClass.getName());
-            } else if (paramType instanceof ParameterizedType) {
-                ParameterizedType pt = (ParameterizedType)paramType;
-                String fullType = "";
-                fullType = ConverterUtils.getFullType(pt, fullType);
-                pdc.setParameterType(fullType);
-            }
+            String fullType = ConverterUtils.getType(paramType, "");
+            pdc.setParameterType(fullType);
             pdc.setListOrder(i);
             attachWebParamAnnotation(pdc, i);
             pdcList.add(pdc);

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Thu Aug  9 08:14:52 2007
@@ -120,6 +120,51 @@
     }
 
     /**
+     * Clears the entire ServiceDescription cache.
+     * 
+     * <h4>Note</h4>     
+     * This function might cause unpredictable results when configuration contexts are being reused
+     * and/or there are outstanding requests using the cached ServiceDescription objects. Also, 
+     * in-flight requests (both client and server) using ServiceDelegates MUST be done and out of
+     * scope before this method is called.
+     * 
+     */
+    public static void clearServiceDescriptionCache() {
+        cache.clear();
+    }
+    
+    /**
+     * Clears all the ServiceDescription objects in the cache associated with the specified 
+     * configuration context.
+     * 
+     * <h4>Note</h4>
+     * This function should only be used to clear the cache when the specified configuration context
+     * will not be used anymore and there are no outstanding requests using the associated 
+     * ServiceDescription objects. Also, in-flight requests (both client and server) using 
+     * ServiceDelegates MUST be done and out of scope before this method is called.      
+     * Otherwise, unpredictable results might occur.
+     * 
+     * @param configContext The configuration context associated with the ServiceDescription 
+     *                      objects in the cache.
+     */
+    public static void clearServiceDescriptionCache(ConfigurationContext configContext) {
+        if (configContext == null) {
+            return;
+        }
+        synchronized (configContext) {
+            synchronized (cache) {
+                Iterator<DescriptionKey> iter = cache.keySet().iterator();
+                while (iter.hasNext()) {
+                    DescriptionKey key = iter.next();
+                    if (key.getConfigContext() == configContext) {
+                        iter.remove();
+                    }
+                }
+            }
+        }
+    }    
+    
+    /**
      * @see org.apache.axis2.jaxws.description.DescriptionFactory#createServiceDescriptionFromServiceImpl(Class,
      *      AxisService)
      * @deprecated

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Thu Aug  9 08:14:52 2007
@@ -264,6 +264,12 @@
                 break;
 
             case GET_PORT:
+                
+                // try to find existing endpointDesc by SEI class if portQName was not specified 
+                if (endpointDescription == null && portQName == null && sei != null) {
+                    endpointDescription = getEndpointDescriptionImpl(sei);
+                }
+                
                 // If an endpointDesc doesn't exist, and the port exists in the WSDL, create it
                 // If an endpointDesc already exists and has an associated SEI already, make sure they match
                 // If an endpointDesc already exists and was created for Dispatch (no SEI), update that with the SEI provided on the getPort
@@ -404,6 +410,21 @@
 
     EndpointDescriptionImpl getEndpointDescriptionImpl(QName portQName) {
         return (EndpointDescriptionImpl)getEndpointDescription(portQName);
+    }
+    
+    EndpointDescriptionImpl getEndpointDescriptionImpl(Class seiClass) {
+        for (EndpointDescription endpointDescription : endpointDescriptions.values()) {
+            EndpointInterfaceDescription endpointInterfaceDesc =
+                    endpointDescription.getEndpointInterfaceDescription();
+            // Note that Dispatch endpoints will not have an endpointInterface because the do not have an associated SEI
+            if (endpointInterfaceDesc != null) {
+                Class endpointSEIClass = endpointInterfaceDesc.getSEIClass();
+                if (endpointSEIClass != null && endpointSEIClass.equals(seiClass)) {
+                    return (EndpointDescriptionImpl)endpointDescription;
+                }
+            }
+        }
+        return null;
     }
 
     DescriptionBuilderComposite getDescriptionBuilderComposite() {

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java Thu Aug  9 08:14:52 2007
@@ -87,10 +87,6 @@
                     (url != null && "file".equals(url.getProtocol())) ? true : false;
             if (isFileProtocol) {
                 filePath = (url != null) ? url.getPath() : null;
-                URI uri = null;
-                if(url != null) {
-                    uri = url.toURI();
-                }
                 //Check is the uri has relative path i.e path is not absolute and is not starting with a "/"
                 boolean isRelativePath =
                         (filePath != null && !new File(filePath).isAbsolute()) ? true : false;
@@ -115,7 +111,7 @@
                     else {
                         if(log.isDebugEnabled()) {
                             log.debug("WSDL URL found for relative path: " + filePath + " scheme: " +
-                                    uri.getScheme());
+                                    url.getProtocol());
                         }
                     }
                 }

Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java Thu Aug  9 08:14:52 2007
@@ -19,13 +19,17 @@
 
 package org.apache.axis2.jaxws.description.impl;
 
+import java.lang.reflect.Field;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
 
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.jaxws.ClientConfigurationFactory;
 import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.metadata.registry.MetadataFactoryRegistry;
 
 public class DescriptionFactoryImplTests extends TestCase {
     
@@ -34,12 +38,13 @@
     private static final String localPart = "EchoService";
     private static final QName serviceQName = new QName(namespaceURI, localPart);
 
+    
     public void testServiceDescriptionCaching() {        
         QName uniqueQName = new QName(namespaceURI, localPart + "_testValidServiceSubclass");
         
         ServiceDescription desc1 = 
             DescriptionFactoryImpl.createServiceDescription(null, uniqueQName, ServiceSubclass.class);
-                    
+                  
         /*
         int size = 5;
         ServiceDescription desc2; 
@@ -48,13 +53,99 @@
                 DescriptionFactoryImpl.createServiceDescription(null, uniqueQName, ServiceSubclass.class);
             assertTrue("service description was not reused", desc1 == desc2);
         } 
-        */     
-    }   
+        */    
+    }      
 
+    public void testClearServiceDescriptionCache() throws Exception {        
+        QName uniqueQName1 = new QName(namespaceURI, localPart + "_testClearCache1");
+        QName uniqueQName2 = new QName(namespaceURI, localPart + "_testClearCache2");
+  
+        // the ClientConfigFactory instance is stored DescriptionFactoryImpl clientConfigFactory 
+        // field and for this test we need to clear it, so that a custom version of 
+        // ClientConfigurationFactory can be used.
+        resetClientConfigFactory();
+        
+        // install caching factory        
+        ClientConfigurationFactory oldFactory = 
+            (ClientConfigurationFactory)MetadataFactoryRegistry.getFactory(ClientConfigurationFactory.class);
+        CachingClientContextFactory newFactory = new CachingClientContextFactory();
+        MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class, newFactory);
+        
+        try {
+            ServiceDescription desc1 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName1, ServiceSubclass.class);
+                        
+            ServiceDescription desc2 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName1, ServiceSubclass.class);
+            
+            newFactory.reset();
+            
+            ServiceDescription desc3 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName2, ServiceSubclass.class);
+            
+            assertTrue(desc1 == desc2);
+            assertTrue(desc1 != desc3);
+                        
+            // should clear one
+            DescriptionFactoryImpl.clearServiceDescriptionCache(desc2.getAxisConfigContext());
+            
+            ServiceDescription desc4 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName1, ServiceSubclass.class);
+                        
+            ServiceDescription desc5 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName2, ServiceSubclass.class);
+            
+            assertTrue(desc1 != desc4);
+            assertTrue(desc3 == desc5);
+                       
+            // should clear both
+            DescriptionFactoryImpl.clearServiceDescriptionCache();
+            
+            ServiceDescription desc6 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName1, ServiceSubclass.class);
+            
+            ServiceDescription desc7 = 
+                DescriptionFactoryImpl.createServiceDescription(null, uniqueQName2, ServiceSubclass.class);
+            
+            assertTrue(desc4 != desc6);
+            assertTrue(desc3 != desc7);
+            
+            // this should do nothing
+            DescriptionFactoryImpl.clearServiceDescriptionCache(null);
+            
+        } finally {
+            // restore old factory
+            MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class, oldFactory);
+        }                          
+    }
+    
+    private void resetClientConfigFactory() throws Exception {
+        Field field = DescriptionFactoryImpl.class.getDeclaredField("clientConfigFactory");
+        field.setAccessible(true);
+        field.set(null, null);
+    }
+    
     private static class ServiceSubclass extends javax.xml.ws.Service {
 
         protected ServiceSubclass(URL wsdlDocumentLocation, QName serviceName) {
             super(wsdlDocumentLocation, serviceName);
         }
+    }
+    
+    private static class CachingClientContextFactory extends ClientConfigurationFactory {
+        ConfigurationContext context;
+        
+        public ConfigurationContext getClientConfigurationContext() {
+            if (context == null) {
+                context = super.getClientConfigurationContext();
+            }
+            System.out.println(context);
+            return context;
+        }
+        
+        public void reset() {
+            context = null;
+        }
+        
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml Thu Aug  9 08:14:52 2007
@@ -84,6 +84,7 @@
 	<soapmonitor.mar.version>SNAPSHOT</soapmonitor.mar.version>
 	<mex.mar.version>SNAPSHOT</mex.mar.version>
 	<ping.mar.version>SNAPSHOT</ping.mar.version>
+	<scripting.mar.version>SNAPSHOT</scripting.mar.version>
         <annogen.version>0.1.0</annogen.version>
         <ant.version>1.7.0</ant.version>
         <antlr.version>2.7.4</antlr.version>
@@ -98,6 +99,7 @@
         <commons.io.version>1.2</commons.io.version>
         <commons.logging.version>1.1</commons.logging.version>
         <eclipse.version>3.2.0</eclipse.version>
+	<eclipse.plugins.version>1.3.0</eclipse.plugins.version>
         <fi.version>1.2.1</fi.version>
         <geronimo.spec.activation.version>1.0-M1</geronimo.spec.activation.version>
         <geronimo.spec.javamail.version>1.0-M1</geronimo.spec.javamail.version>
@@ -235,6 +237,18 @@
             <organization>WSO2</organization>
         </developer>
         <developer>
+            <name>Sumedha Rubasinghe</name>
+            <id>sumedha</id>
+            <email>sumedha AT WSO2.com</email>
+            <organization>WSO2</organization>
+        </developer>
+        <developer>
+            <name>Charitha Kamkanamge</name>
+            <id>charitha</id>
+            <email>charitha AT WSO2.com</email>
+            <organization>WSO2</organization>
+        </developer>
+        <developer>
             <name>Srinath Perera</name>
             <id>hemapani</id>
             <email>hemapani AT apache.org</email>
@@ -345,6 +359,13 @@
             <email/>
             <organization>Lanka Software Foundation / University of Moratuwa</organization>
         </contributor>
+       
+<contributor>
+            <name>Shivantha Huruggamuwa</name>
+            <email>shivanthah AT gmail.com</email>
+            <organization>University Of Peradeniya , Sri Lanaka</organization>
+        </contributor>
+
     </contributors>
     <repositories>
         <!--

Modified: webservices/axis2/branches/java/jaxws21/modules/saaj/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/saaj/pom.xml?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/saaj/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/saaj/pom.xml Thu Aug  9 08:14:52 2007
@@ -29,9 +29,9 @@
 	<name>Apache Axis 2.0 - SAAJ</name>
 	<description>Axis2 SAAJ implementation</description>
 	<scm>
-		<connection>scm:svn:http://svn.apache.org/repos/asf/webservices/axis2/branches/java/1_2/modules/saaj</connection>
-		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/webservices/axis2/branches/java/1_2/modules/saaj</developerConnection>
-		<url>http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/saaj</url>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/saaj</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/saaj</developerConnection>
+		<url>http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj</url>
 	</scm>
 	<dependencies>
 		<dependency>

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/pojoguidespring/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/pojoguidespring/build.xml?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/pojoguidespring/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/pojoguidespring/build.xml Thu Aug  9 08:14:52 2007
@@ -50,7 +50,10 @@
 
 	<target name="clean">
 		<delete dir="${dest.dir}" />
-		<delete dir="lib"/>
+	</target>
+
+	<target name="clean.libs">
+		<delete dir="lib" />
 	</target>
 
 	<target name="prepare" depends="clean">

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/userguide/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/userguide/build.xml?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/userguide/build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/userguide/build.xml Thu Aug  9 08:14:52 2007
@@ -25,6 +25,8 @@
         </fileset>
         <pathelement location="build/userguide.jar"/>
     </path>
+<mkdir dir="${basedir}/build/classes"/>
+
 
     <target name="run.client.all"
             depends="run.client.ping,run.client.blocking,run.client.blockingdual,run.client.nonblocking,run.client.nonblockingdual,run.client.servicewithmodule">

Modified: webservices/axis2/branches/java/jaxws21/modules/samples/userguide/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/samples/userguide/conf/axis2.xml?view=diff&rev=564235&r1=564234&r2=564235
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/samples/userguide/conf/axis2.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/samples/userguide/conf/axis2.xml Thu Aug  9 08:14:52 2007
@@ -241,7 +241,7 @@
     <!-- Phases  -->
     <!-- ================================================= -->
     <phaseOrder type="InFlow">
-        <!--  System pre defined phases       -->
+        <!--  System predefined phases       -->
         <phase name="Transport">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
@@ -252,65 +252,76 @@
                 <order phase="Transport"/>
             </handler>
         </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
         <phase name="Security"/>
         <phase name="PreDispatch"/>
         <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher"/>
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
             <handler name="RequestURIOperationDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
             <handler name="HTTPLocationBasedDispatcher"
                      class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
         </phase>
-	<phase name="loggingPhase"/>
-        <!--  System pre defined phases       -->
-        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
         <phase name="OperationInPhase"/>
-	<phase name="soapmonitorPhase"/>
+        <phase name="soapmonitorPhase"/>
     </phaseOrder>
     <phaseOrder type="OutFlow">
         <!--      user can add his own phases to this area  -->
-	<phase name="soapmonitorPhase"/>
+        <phase name="soapmonitorPhase"/>
         <phase name="OperationOutPhase"/>
-	<phase name="loggingPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
         <phase name="Security"/>
     </phaseOrder>
     <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
         <phase name="PreDispatch"/>
         <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
-
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
-
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher"/>
             <handler name="RequestURIOperationDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
-
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
 
             <handler name="HTTPLocationBasedDispatcher"
                      class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
         </phase>
+        <phase name="RMPhase"/>
         <!--      user can add his own phases to this area  -->
-	<phase name="loggingPhase"/>
         <phase name="OperationInFaultPhase"/>
-	<phase name="soapmonitorPhase"/>
+        <phase name="soapmonitorPhase"/>
     </phaseOrder>
     <phaseOrder type="OutFaultFlow">
         <!--      user can add his own phases to this area  -->
-	<phase name="loggingPhase"/>
-	<phase name="soapmonitorPhase"/>
+        <phase name="soapmonitorPhase"/>
         <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org