geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1150977 [1/5] - in /geronimo/bundles/trunk/axis2: ./ src/main/java/org/apache/axis2/handlers/ src/main/java/org/apache/axis2/handlers/addressing/ src/main/java/org/apache/axis2/jaxws/ src/main/java/org/apache/axis2/jaxws/addressing/factory...
Date Tue, 26 Jul 2011 03:06:02 GMT
Author: xuhaihong
Date: Tue Jul 26 03:06:00 2011
New Revision: 1150977

URL: http://svn.apache.org/viewvc?rev=1150977&view=rev
Log:
Include the changed below from axis2-1.7.0 trunk in the Axis2 1.6.0_1-SNAPSHOT bundle
Revision: 1068985
AXIS2-4952
Scope dynamic ports to the instance of the service that did the addPort(...).  Add TDD Unit test and flag to revert to previous behavior of sharing dynamic ports across services.

Revision: 1069659
Message:
AXIS2-4938
Patch submitted by Katherine Sanders.  BindingProvider.getEndpointReference should put reference parameters from WSDL in returned EPR.

Revision: 1069898
AXIS2-4948
Patch contributed by Katherine Sanders.  Wrong WSDL location returned by BindingProvider; was using the local filesystem path instead of the endpoint URL.

Revision: 1075057
Prevent index out of bounds exception, or any exception, from attempting to log.  Add TDD/UT for same.

Revision: 1103336
AXIS2-5021: Committed patch provided by Ivan (xuhaihong).

Revision: 1136177
AXIS2-5067: Committed patch provided by Ivan (xuhaihong), with minor changes. This implements the saveChanges method and calculates the correct content type for a SOAPMessage.

Revision: 1096557
Two changes in JAX-WS Endpoint implementation (1) Override setEndpointContext method, (2) Add logic to throw an exception if endpoint publishing is disabled by a property (publishing is enabled by default); per JSR-109 5.3.3 dynamically publishing endpoints in a server environment is non portable and should be disabled.  A server runtime can use the property to disabled dynamically publishing JAX-WS endpoints via Endpoint.publish methods.

Revision: 1096530
On JAX-WS Client, treat local exceptions (e.g. ConnectException) as a SOAPFault, driving the JAX-WS handler handleFault methods and throwing a SOAPFAultException back through the client invocation.  Also provide a property to revert to previous behavior of creating an empty message, driving the JAX-WS handler handleMessage methods, and throwing a WebServiceException back through the client invocation.

Added:
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/ExceptionFactory.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/WebServiceExceptionLogger.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/addressing/factory/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/addressing/factory/impl/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/context/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/context/WebServiceContextImpl.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/core/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/core/controller/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/core/controller/impl/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/description/builder/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/description/builder/MDQConstants.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/server/endpoint/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java   (with props)
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/spi/
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/spi/ServiceDelegate.java   (with props)
Modified:
    geronimo/bundles/trunk/axis2/pom.xml
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java

Modified: geronimo/bundles/trunk/axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/pom.xml?rev=1150977&r1=1150976&r2=1150977&view=diff
==============================================================================
--- geronimo/bundles/trunk/axis2/pom.xml (original)
+++ geronimo/bundles/trunk/axis2/pom.xml Tue Jul 26 03:06:00 2011
@@ -224,6 +224,11 @@
             <artifactId>geronimo-saaj_1.3_spec</artifactId>
             <version>1.1</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
+            <version>1.2_2</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
@@ -327,7 +332,35 @@
                            org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl$1.class=target/classes/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl$1.class,
                            org/apache/axis2/jaxws/message/impl/BlockImpl.class=target/classes/org/apache/axis2/jaxws/message/impl/BlockImpl.class,
                            org/apache/axis2/jaxws/message/impl/XMLSpineImpl.class=target/classes/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.class,                           
-                           org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.class=target/classes/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.class
+                           org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.class=target/classes/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.class,
+                           
+                           org/apache/axis2/handlers/addressing/AddressingOutHandler.class=target/classes/org/apache/axis2/handlers/addressing/AddressingOutHandler.class,
+                           org/apache/axis2/handlers/addressing/AddressingOutHandler$WSAHeaderWriter.class=target/classes/org/apache/axis2/handlers/addressing/AddressingOutHandler$WSAHeaderWriter.class,
+                           
+                           org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.class=target/classes/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.class,
+                           
+                           org/apache/axis2/jaxws/BindingProvider.class=target/classes/org/apache/axis2/jaxws/BindingProvider.class,
+                           org/apache/axis2/jaxws/BindingProvider$ValidatingClientContext.class=target/classes/org/apache/axis2/jaxws/BindingProvider$ValidatingClientContext.class,
+                           
+                           org/apache/axis2/jaxws/Constants.class=target/classes/org/apache/axis2/jaxws/Constants.class,
+                           org/apache/axis2/jaxws/context/WebServiceContextImpl.class=target/classes/org/apache/axis2/jaxws/context/WebServiceContextImpl.class,
+                           org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.class=target/classes/org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.class,
+                           org/apache/axis2/jaxws/description/builder/MDQConstants.class=target/classes/org/apache/axis2/jaxws/description/builder/MDQConstants.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$SharedDynamicEndpointEntry.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$SharedDynamicEndpointEntry.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$1.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$1.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$2.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$2.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$3.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$3.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$4.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$4.class,
+                           org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$5.class=target/classes/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl$5.class,
+                           
+                           org/apache/axis2/jaxws/ExceptionFactory.class=target/classes/org/apache/axis2/jaxws/ExceptionFactory.class,
+                           org/apache/axis2/jaxws/server/endpoint/EndpointImpl.class=target/classes/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.class,
+                           org/apache/axis2/jaxws/spi/ServiceDelegate.class=target/classes/org/apache/axis2/jaxws/spi/ServiceDelegate.class,
+                           org/apache/axis2/jaxws/spi/ServiceDelegate$1.class=target/classes/org/apache/axis2/jaxws/spi/ServiceDelegate$1.class,
+                           org/apache/axis2/jaxws/spi/ServiceDelegate$2.class=target/classes/org/apache/axis2/jaxws/spi/ServiceDelegate$2.class,
+                           org/apache/axis2/jaxws/spi/ServiceDelegate$3.class=target/classes/org/apache/axis2/jaxws/spi/ServiceDelegate$3.class,
+                           org/apache/axis2/jaxws/WebServiceExceptionLogger.class=target/classes/org/apache/axis2/jaxws/WebServiceExceptionLogger.class
                         </Include-Resource>
                         <SPI-Provider>true</SPI-Provider>
                     </instructions>

Added: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=1150977&view=auto
==============================================================================
--- geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (added)
+++ geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Tue Jul 26 03:06:00 2011
@@ -0,0 +1,640 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.handlers.addressing;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.util.AttributeHelper;
+import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.util.UIDGenerator;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.AddressingFaultsHelper;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.addressing.EndpointReferenceHelper;
+import org.apache.axis2.addressing.RelatesTo;
+import org.apache.axis2.addressing.i18n.AddressingMessages;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.AxisEndpoint;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.handlers.AbstractTemplatedHandler;
+import org.apache.axis2.util.JavaUtils;
+import org.apache.axis2.util.LoggingControl;
+import org.apache.axis2.util.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+public class AddressingOutHandler extends AbstractTemplatedHandler implements AddressingConstants {
+
+    private static final Log log = LogFactory.getLog(AddressingOutHandler.class);
+
+    // TODO: This is required for MessageContext#getModuleParameter.
+    //       Not clear why there is no way to automatically determine this!
+    private static final String MODULE_NAME = "addressing";
+
+
+    public boolean shouldInvoke(MessageContext msgContext) throws AxisFault {
+        Parameter param = null;
+        boolean disableAddressing = false;
+        
+        Object o = msgContext.getProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+        if (o == null || !(o instanceof Boolean)) {
+            //determine whether outbound addressing has been disabled or not.
+            // Get default value from module.xml or axis2.xml files
+            param = msgContext.getModuleParameter(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, MODULE_NAME, handlerDesc);
+            disableAddressing =
+                msgContext.isPropertyTrue(DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
+                    JavaUtils.isTrueExplicitly(Utils.getParameterValue(param)));
+        } else {
+            disableAddressing = (Boolean) o;
+        }
+
+        if (disableAddressing) {
+            if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                log.trace(msgContext.getLogIDString() +
+                        " Addressing is disabled. Not adding WS-Addressing headers.");
+            }
+            return false;
+        }
+        return true;
+    }
+    
+    public InvocationResponse doInvoke(MessageContext msgContext) throws AxisFault {
+        
+
+        // Determine the addressin namespace in effect.
+        Object addressingVersionFromCurrentMsgCtxt = msgContext.getProperty(WS_ADDRESSING_VERSION);
+        if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+            log.trace("Addressing version string from messageContext=" +
+                    addressingVersionFromCurrentMsgCtxt);
+        }
+        boolean isSubmissionNamespace =
+                Submission.WSA_NAMESPACE.equals(addressingVersionFromCurrentMsgCtxt);
+
+        // Determine whether to include optional addressing headers in the output.
+        // Get default value from module.xml or axis2.xml files
+        Parameter param = msgContext.getModuleParameter(
+                INCLUDE_OPTIONAL_HEADERS, MODULE_NAME, handlerDesc);
+        boolean includeOptionalHeaders =
+            msgContext.isPropertyTrue(INCLUDE_OPTIONAL_HEADERS,
+                    JavaUtils.isTrueExplicitly(Utils.getParameterValue(param)));
+
+        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+            log.debug("includeOptionalHeaders=" + includeOptionalHeaders);
+        }
+
+        // Determine if a MustUnderstand attribute will be added to all headers in the
+        // addressing namespace.
+        boolean addMustUnderstandAttribute =
+                msgContext.isPropertyTrue(ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS);
+
+        // what if there are addressing headers already in the message. Do you replace that or not?
+        // Lets have a parameter to control that. The default behavior is you won't replace addressing
+        // headers if there are any (this was the case so far).
+        boolean replaceHeaders = msgContext.isPropertyTrue(REPLACE_ADDRESSING_HEADERS);
+        
+        // Allow the user to specify the role these WS-Addressing headers should be targetted at.
+        String role = (String) msgContext.getProperty(SOAP_ROLE_FOR_ADDRESSING_HEADERS);
+
+        WSAHeaderWriter writer = new WSAHeaderWriter(msgContext, isSubmissionNamespace,
+                                                     addMustUnderstandAttribute, replaceHeaders,
+                                                     includeOptionalHeaders, role);
+        writer.writeHeaders();
+
+        return InvocationResponse.CONTINUE;
+    }
+
+    private class WSAHeaderWriter {
+
+        private MessageContext messageContext;
+        private SOAPEnvelope envelope;
+        private SOAPHeader header;
+        private SOAPFactory factory;
+        private Options messageContextOptions;
+        private OMNamespace addressingNamespaceObject;
+        private String addressingNamespace;
+        private String addressingRole;
+
+        private boolean isFinalAddressingNamespace;
+        private boolean addMustUnderstandAttribute;
+        private boolean replaceHeaders;  // determines whether we replace the existing headers or not, if they present
+        private boolean includeOptionalHeaders;
+
+        private ArrayList existingWSAHeaders = null;
+        
+        public WSAHeaderWriter(MessageContext mc, boolean isSubmissionNamespace, boolean addMU,
+                               boolean replace, boolean includeOptional, String role) {
+            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+                log.debug("WSAHeaderWriter: isFinal=" + !isSubmissionNamespace + " addMU=" + addMU +
+                        " replace=" + replace + " includeOptional=" + includeOptional+" role="+role);
+            }
+
+            messageContext = mc;
+            envelope = mc.getEnvelope();
+            factory = (SOAPFactory)envelope.getOMFactory();
+
+            messageContextOptions = messageContext.getOptions();
+
+            addressingNamespace =
+                    isSubmissionNamespace ? Submission.WSA_NAMESPACE : Final.WSA_NAMESPACE;
+
+            header = envelope.getHeader();
+            // if there is no soap header in the envelope being processed, add one.
+            if (header == null) {
+            	header = factory.createSOAPHeader(envelope);
+            }else{
+            	ArrayList addressingHeaders = header.getHeaderBlocksWithNSURI(addressingNamespace);
+            	if(addressingHeaders!=null && !addressingHeaders.isEmpty()){
+            		existingWSAHeaders = new ArrayList(addressingHeaders.size());
+            		for(Iterator iter=addressingHeaders.iterator();iter.hasNext();){
+            			SOAPHeaderBlock oe = (SOAPHeaderBlock)iter.next();
+            			if(addressingRole == null || addressingRole.length() ==0 || addressingRole.equals(oe.getRole())){
+            				existingWSAHeaders.add(oe.getLocalName());
+            			}
+            		}
+            	}
+            	if(addressingHeaders != null && addressingHeaders.size() ==0){
+            		addressingHeaders = null;
+            	}
+            }
+            
+            isFinalAddressingNamespace = !isSubmissionNamespace;
+            addMustUnderstandAttribute = addMU;
+            replaceHeaders = replace;
+            includeOptionalHeaders = includeOptional;
+            addressingRole = role;
+            
+            if(!isFinalAddressingNamespace && mc.getTo() == null){
+            	mc.setTo(new EndpointReference(AddressingConstants.Submission.WSA_ANONYMOUS_URL));
+            }
+        }
+
+        public void writeHeaders() throws AxisFault {
+
+            // by this time, we definitely have some addressing information to be sent. This is because,
+            // we have tested at the start of this whether messageInformationHeaders are null or not.
+            // So rather than declaring addressing namespace in each and every addressing header, lets
+            // define that in the Header itself.
+        	addressingNamespaceObject = header.declareNamespace(addressingNamespace, WSA_DEFAULT_PREFIX);
+
+            // processing WSA To
+            processToEPR();
+
+            // processing WSA replyTo
+            processReplyTo();
+
+            // processing WSA From
+            processFromEPR();
+
+            // processing WSA FaultTo
+            processFaultToEPR();
+
+            // processing WSA MessageID
+            processMessageID();
+
+            // processing WSA Action
+            processWSAAction();
+
+            // processing WSA RelatesTo
+            processRelatesTo();
+
+            // process fault headers, if present
+            processFaultsInfoIfPresent();
+
+            // process mustUnderstand attribute, if required.
+            processMustUnderstandProperty();
+        }
+
+
+        private void processMessageID() {
+            String messageID = messageContextOptions.getMessageId();
+            
+            //Check whether we want to force a message id to be sent.
+            if (messageID == null && includeOptionalHeaders) {
+                messageID = UIDGenerator.generateURNString();
+                messageContextOptions.setMessageId(messageID);
+            }
+            
+            if (messageID != null && !isAddressingHeaderAlreadyAvailable(WSA_MESSAGE_ID, false))
+            {//optional
+            	ArrayList attributes = (ArrayList)messageContext.getLocalProperty(
+                        AddressingConstants.MESSAGEID_ATTRIBUTES);
+                createSOAPHeaderBlock(messageID, WSA_MESSAGE_ID, attributes);
+            }
+        }
+
+        private void processWSAAction() throws AxisFault {
+            String action = messageContextOptions.getAction();
+
+            if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                log.trace(messageContext.getLogIDString() +
+                        " processWSAAction: action from messageContext: " + action);
+            }
+            if (action == null || action.length()==0) {
+                if (messageContext.getAxisOperation() != null) {
+                    action = messageContext.getAxisOperation().getOutputAction();
+                    if(action!=null){
+                    	// Set this action back to obviate possible action mismatch problems
+                    	messageContext.setWSAAction(action);
+                    }
+                    if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                        log.trace(messageContext.getLogIDString() +
+                                " processWSAAction: action from AxisOperation: " + action);
+                    }
+                }
+            }else{
+	            // Use the correct fault action for the selected namespace
+	            if(isFinalAddressingNamespace){
+	            	if(Submission.WSA_FAULT_ACTION.equals(action)){
+	            		action = Final.WSA_FAULT_ACTION;
+	            		messageContextOptions.setAction(action);
+	            	}
+	            }else{
+	            	if(Final.WSA_FAULT_ACTION.equals(action)){
+	            		action = Submission.WSA_FAULT_ACTION;
+	            		messageContextOptions.setAction(action);
+	            	}else if(Final.WSA_SOAP_FAULT_ACTION.equals(action)){
+	                    action = Submission.WSA_FAULT_ACTION;
+	                    messageContextOptions.setAction(action);
+	            	}
+	            }
+            }
+
+            // If we need to add a wsa:Action header
+            if (!isAddressingHeaderAlreadyAvailable(WSA_ACTION, false)) {
+                if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                    log.trace(messageContext.getLogIDString() +
+                            " processWSAAction: No existing wsa:Action header found");
+                }
+                // If we don't have an action to add,
+                if (action == null || action.length()==0) {
+                    if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                        log.trace(messageContext.getLogIDString() +
+                                " processWSAAction: No action to add to header");
+                    }
+                    // Fault unless validation has been explictily turned off
+                    if (!messageContext.isPropertyTrue(
+                            AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION))
+                    {
+                        throw new AxisFault(AddressingMessages.getMessage("outboundNoAction"));
+                    }
+                } else {
+                    if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                        log.trace(messageContext.getLogIDString() +
+                                " processWSAAction: Adding action to header: " + action);
+                    }
+                    // Otherwise just add the header
+                    ArrayList attributes = (ArrayList)messageContext.getLocalProperty(
+                            AddressingConstants.ACTION_ATTRIBUTES);
+                    createSOAPHeaderBlock(action, WSA_ACTION, attributes);
+                }
+            }
+        }
+
+        private void processFaultsInfoIfPresent() {
+            OMElement detailElement = AddressingFaultsHelper
+                    .getDetailElementForAddressingFault(messageContext, addressingNamespaceObject);
+            if (detailElement != null) {
+                //The difference between SOAP 1.1 and SOAP 1.2 fault messages is explained in the WS-Addressing Specs.
+                if (isFinalAddressingNamespace && messageContext.isSOAP11()) {
+                    // Add detail as a wsa:FaultDetail header
+                    if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, false)) {
+                        SOAPHeaderBlock faultDetail = header.addHeaderBlock(
+                                Final.FAULT_HEADER_DETAIL, addressingNamespaceObject);
+                        faultDetail.addChild(ElementHelper.importOMElement(detailElement, factory));
+                    }
+                } else if (!messageContext.isSOAP11()) {
+                    // Add detail to the Fault in the SOAP Body
+                    SOAPFault fault = envelope.getBody().getFault();
+                    if (fault != null && fault.getDetail() != null) {
+                        fault.getDetail().addDetailEntry(
+                                ElementHelper.importOMElement(detailElement, factory));
+                    }
+                }
+            }
+        }
+
+        private void processRelatesTo() {
+            if (!isAddressingHeaderAlreadyAvailable(WSA_RELATES_TO, true)) {
+                RelatesTo[] relatesTo = messageContextOptions.getRelationships();
+
+                if (relatesTo != null) {
+                    for (int i = 0, length = relatesTo.length; i < length; i++) {
+                        OMElement relatesToHeader = createSOAPHeaderBlock(relatesTo[i].getValue(),
+                        		WSA_RELATES_TO, relatesTo[i].getExtensibilityAttributes());
+                        String relationshipType = relatesTo[i].getRelationshipType();
+                        if (relatesToHeader != null) {
+                        	
+                        	if(!includeOptionalHeaders){
+                        		if (Final.WSA_DEFAULT_RELATIONSHIP_TYPE.equals(relationshipType) ||
+                                        Submission.WSA_DEFAULT_RELATIONSHIP_TYPE
+                                                .equals(relationshipType)) {
+                        			relationshipType = null; //Omit the attribute.
+                        		}
+                        	}
+                        	
+                            if(relationshipType != null){
+	                            relatesToHeader.addAttribute(WSA_RELATES_TO_RELATIONSHIP_TYPE,
+	                                                         relationshipType,
+	                                                         null);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private void processFaultToEPR() throws AxisFault {
+            EndpointReference epr = messageContextOptions.getFaultTo();
+            String headerName = AddressingConstants.WSA_FAULT_TO;
+
+            //Omit the header if the epr is null.
+            if (epr != null && !isAddressingHeaderAlreadyAvailable(headerName, false)) {
+                addToSOAPHeader(epr, headerName);
+            }
+        }
+
+        private void processFromEPR() throws AxisFault {
+            EndpointReference epr = messageContextOptions.getFrom();
+            String headerName = AddressingConstants.WSA_FROM;
+
+            //Omit the header if the epr is null.
+            if (epr != null && !isAddressingHeaderAlreadyAvailable(headerName, false)) {
+                addToSOAPHeader(epr, headerName);
+            }
+        }
+
+        private void processReplyTo() throws AxisFault {
+            EndpointReference epr = messageContextOptions.getReplyTo();
+            String headerName = AddressingConstants.WSA_REPLY_TO;
+
+            //Don't check epr for null here as addToSOAPHeader() will provide an appropriate default.
+            //This default is especially useful for client side outbound processing.
+            if (!isAddressingHeaderAlreadyAvailable(headerName, false)) {
+                addToSOAPHeader(epr, headerName);
+            }
+        }
+
+        private void processToEPR() throws AxisFault {
+            EndpointReference epr = messageContextOptions.getTo();
+            if (epr != null && !isAddressingHeaderAlreadyAvailable(WSA_TO, false)) {
+                try {
+                    processToEPRReferenceInformation(epr.getAllReferenceParameters());
+                }
+                catch (Exception e) {
+                    throw new AxisFault(AddressingMessages.getMessage("referenceParameterError"), e);
+                }
+                String address = epr.getAddress();
+                if (address != null && address.length()!=0) {
+                    if (!includeOptionalHeaders && isFinalAddressingNamespace &&
+                            epr.isWSAddressingAnonymous())
+                    {
+                        return; //Omit the header.
+                    }
+                    createSOAPHeaderBlock(address, WSA_TO, epr.getAddressAttributes());
+                }
+            }
+        }
+
+        private OMElement createSOAPHeaderBlock(String value, String headerName, ArrayList attributes) {
+            if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                log.trace("createSOAPHeaderBlock: value=" + value + " headerName=" + headerName);
+            }
+            if (value != null && value.length()!=0) {
+                SOAPHeaderBlock soapHeaderBlock =
+                        header.addHeaderBlock(headerName, addressingNamespaceObject);
+                soapHeaderBlock.addChild(factory.createOMText(value));
+                if (attributes != null && !attributes.isEmpty()) {
+                    Iterator attrIterator = attributes.iterator();
+                    while (attrIterator.hasNext()) {
+                        AttributeHelper
+                                .importOMAttribute((OMAttribute)attrIterator.next(), soapHeaderBlock);
+                    }
+                }
+                addRoleToHeader(soapHeaderBlock);
+                return soapHeaderBlock;
+            }
+            return null;
+        }
+
+        private void addToSOAPHeader(EndpointReference epr, String headerName) throws AxisFault {
+            String prefix = addressingNamespaceObject.getPrefix();
+            String anonymous = isFinalAddressingNamespace ?
+                    Final.WSA_ANONYMOUS_URL : Submission.WSA_ANONYMOUS_URL;
+
+            if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                log.trace("addToSOAPHeader: epr=" + epr + " headerName=" + headerName);
+            }
+
+            if (epr == null) {
+                if (!includeOptionalHeaders && isFinalAddressingNamespace &&
+                        AddressingConstants.WSA_REPLY_TO.equals(headerName)) {
+                    return; //Omit the header.
+                } else {
+                    epr = new EndpointReference(anonymous);
+                }
+            }
+            else if (!isFinalAddressingNamespace && epr.hasNoneAddress()) {
+                return; //Omit the header.
+            }
+            else if (epr.isWSAddressingAnonymous())
+            {
+                if (!includeOptionalHeaders && isFinalAddressingNamespace &&
+                        AddressingConstants.WSA_REPLY_TO.equals(headerName)) {
+                    return; //Omit the header.
+                } else {
+                    epr.setAddress(anonymous);
+                }
+            }
+
+            OMElement soapHeaderBlock = EndpointReferenceHelper.toOM(factory,
+                                                                     epr,
+                                                                     new QName(addressingNamespace,
+                                                                               headerName, prefix),
+                                                                     addressingNamespace);
+            addRoleToHeader((SOAPHeaderBlock) soapHeaderBlock);
+            header.addChild(soapHeaderBlock);
+        }
+
+        /**
+         * This will add reference parameters and/or reference properties in to the message
+         *
+         * @param referenceInformation a Map from QName -> OMElement
+         * @param parent               is the element to which the referenceparameters should be
+         *                             attached
+         */
+        private void processToEPRReferenceInformation(Map referenceInformation) throws Exception {
+            if (referenceInformation != null) {
+                if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                    log.trace("processToEPRReferenceInformation: " + referenceInformation);
+                }
+                Iterator iterator = referenceInformation.values().iterator();
+                while (iterator.hasNext()) {
+                    OMElement omElement = (OMElement)iterator.next();
+                    SOAPHeaderBlock newElement = ElementHelper.toSOAPHeaderBlock(omElement, factory);
+                    if (isFinalAddressingNamespace) {
+                        newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
+                                               Final.WSA_TYPE_ATTRIBUTE_VALUE,
+                                               addressingNamespaceObject);
+                    }
+                    addRoleToHeader(newElement);
+                    header.addChild(newElement);
+                }
+            }
+            // Now add reference parameters we found in the WSDL (if any)
+            AxisService service = messageContext.getAxisService();
+            if(service != null){
+            	AxisEndpoint endpoint = service.getEndpoint(service.getEndpointName());
+            	if(endpoint != null){
+            		ArrayList referenceparameters = (ArrayList) endpoint.getParameterValue(REFERENCE_PARAMETER_PARAMETER);
+            		if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+            			log.trace("processToEPRReferenceInformation: Reference Parameters from WSDL:" + referenceparameters);
+            		}
+            		if(referenceparameters!=null){
+            			Iterator iterator = referenceparameters.iterator();
+            			while (iterator.hasNext()) {
+            				OMElement omElement = (OMElement)iterator.next();
+                            // Only add the reference parameter from the WSDL if it does not already exist.
+                            // This allows clients to override the values before invoking the service.
+                            if (referenceInformation == null || !referenceInformation.containsKey(omElement.getQName())) {
+                                SOAPHeaderBlock newElement = ElementHelper.toSOAPHeaderBlock(omElement, factory);
+                                if (isFinalAddressingNamespace) {
+                                    newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
+                                                            Final.WSA_TYPE_ATTRIBUTE_VALUE,
+                                                            addressingNamespaceObject);
+                                }
+                                addRoleToHeader(newElement);
+                                header.addChild(newElement);
+                            } else {
+                                if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                                    log.trace("processToEPRReferenceInformation: Reference parameter already exists so ignoring value from WSDL: " + omElement);
+                                }
+                            }
+            			}
+            		}
+            	}
+            }
+            
+            if (log.isTraceEnabled()) {
+                log.trace("processToEPRReferenceInformation: Header after adding reference parameters: "+header);
+            }
+        }
+
+        /**
+         * This will check for the existence of message information headers already in the message.
+         * If there are already headers, then replacing them or not depends on the replaceHeaders
+         * property.
+         *
+         * @param name            - Name of the message information header
+         * @param multipleHeaders - determines whether to search for multiple headers, or not.
+         * @return false - if one can add new headers (always the case if multipleHeaders is true),
+         *         true - if new headers can't be added.
+         */
+        private boolean isAddressingHeaderAlreadyAvailable(String name, boolean multipleHeaders) {
+        	boolean status = false;
+
+        	if (multipleHeaders) {
+        		if (replaceHeaders) {
+        			QName qname = new QName(addressingNamespace, name, WSA_DEFAULT_PREFIX);
+        			Iterator iterator = header.getChildrenWithName(qname);
+        			while (iterator.hasNext()) {
+        				iterator.next();
+        				iterator.remove();
+        			}
+        		}
+        	} else {
+        		boolean exists = didAddressingHeaderExist(name);
+        		if (exists && replaceHeaders) {
+        			QName qname = new QName(addressingNamespace, name, WSA_DEFAULT_PREFIX);
+        			OMElement addressingHeader = header.getFirstChildWithName(qname);
+        			if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+        				log.trace("isAddressingHeaderAlreadyAvailable: Removing existing header:" +
+        						addressingHeader.getLocalName());
+        			}
+        			addressingHeader.detach();
+        		} else {
+        			status = exists;
+        		}
+        	}
+
+        	if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+        		log.trace("isAddressingHeaderAlreadyAvailable: name=" + name + " status=" + status);
+        	}
+        	return status;
+        }
+
+        private boolean didAddressingHeaderExist(String headerName){
+        	if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+        		log.trace("didAddressingHeaderExist: headerName=" + headerName);
+        	}
+        	boolean result = false;
+        	if(existingWSAHeaders != null){
+        		result = existingWSAHeaders.contains(headerName);
+        		if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+        			log.trace("didAddressingHeaderExist: existingWSAHeaders=" + existingWSAHeaders+" result="+result);
+        		}
+        	}
+        	return result;
+        }
+
+        /**
+         * Sets a mustUnderstand attribute on all headers that are found with the appropriate
+         * addressing namespace.
+         */
+        private void processMustUnderstandProperty() {
+            if (addMustUnderstandAttribute) {
+                List headers = header.getHeaderBlocksWithNSURI(addressingNamespace);
+
+                for (int i = 0, size = headers.size(); i < size; i++) {
+                    SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock)headers.get(i);
+                    soapHeaderBlock.setMustUnderstand(true);
+                    if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                        log.trace(
+                                "processMustUnderstandProperty: Setting mustUnderstand=true on: " +
+                                        soapHeaderBlock.getLocalName());
+                    }
+                }
+            }
+        }
+        
+        private void addRoleToHeader(SOAPHeaderBlock header){
+        	if(addressingRole == null || addressingRole.length()==0){
+        		return;
+        	}
+        	header.setRole(addressingRole);
+        }
+    }
+}
+

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java?rev=1150977&view=auto
==============================================================================
--- geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java (added)
+++ geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java Tue Jul 26 03:06:00 2011
@@ -0,0 +1,480 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.AddressingHelper;
+import org.apache.axis2.description.AxisEndpoint;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils;
+import org.apache.axis2.jaxws.binding.BindingUtils;
+import org.apache.axis2.jaxws.binding.SOAPBinding;
+import org.apache.axis2.jaxws.client.PropertyValidator;
+import org.apache.axis2.jaxws.core.InvocationContext;
+import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.jaxws.handler.HandlerResolverImpl;
+import org.apache.axis2.jaxws.i18n.Messages;
+import org.apache.axis2.jaxws.spi.ServiceDelegate;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.util.LoggingControl;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Binding;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.soap.AddressingFeature.Responses;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+
+public class BindingProvider implements org.apache.axis2.jaxws.spi.BindingProvider {
+    private static final Log log = LogFactory.getLog(BindingProvider.class);
+
+    protected Map<String, Object> requestContext;
+
+    protected Map<String, Object> responseContext;
+
+    protected EndpointDescription endpointDesc;
+
+    // NOTE this reference to the ServiceDelegate MUST be a strong reference to keep the delegate
+    // from being GC'd when the Service instance in the client goes out of scope but ports under
+    // that service are still in use.
+    protected ServiceDelegate serviceDelegate;
+
+    private org.apache.axis2.jaxws.spi.Binding binding;
+
+    public static final String BINDING_PROVIDER = "org.apache.axis2.jaxws.BindingProvider";
+    
+    public BindingProvider(ServiceDelegate svcDelegate,
+                           EndpointDescription epDesc,
+                           org.apache.axis2.addressing.EndpointReference epr,
+                           String addressingNamespace,
+                           WebServiceFeature... features) {
+        this.endpointDesc = epDesc;
+        this.serviceDelegate = svcDelegate;
+        
+        initialize(epr, addressingNamespace, features);
+    }
+
+    /*
+     * Initialize any objects needed by the BindingProvider
+     */
+    private void initialize(org.apache.axis2.addressing.EndpointReference epr,
+                            String addressingNamespace,
+                            WebServiceFeature... features) {
+        requestContext = new ValidatingClientContext();
+        responseContext = new ValidatingClientContext();
+        
+        // Setting standard property defaults for the request context
+        requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, Boolean.FALSE);
+        requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
+        
+        // Addressing is disabled by default unless it is turned on in the WSDL
+        String addressingFlagFromWSDL = AddressingHelper.getAddressingRequirementParemeterValue(endpointDesc.getAxisService());
+        if(AddressingConstants.ADDRESSING_UNSPECIFIED.equals(addressingFlagFromWSDL)){
+            requestContext.put(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
+        }
+        
+        // Set the endpoint address
+        String endpointAddress = (epr != null ) ? epr.getAddress() : endpointDesc.getEndpointAddress();        
+        if (endpointAddress != null && !"".equals(endpointAddress)) {
+            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);                
+        }
+        
+        // JAXWS 9.2.1.1 requires that we go ahead and create the binding object
+        // so we can also set the handlerchain
+        binding = (org.apache.axis2.jaxws.spi.Binding) BindingUtils.createBinding(endpointDesc);
+        if(log.isDebugEnabled()){
+            log.debug("Lookign for Handler Resolver");
+        }
+        // TODO should we allow the ServiceDelegate to figure out the default handlerresolver?  Probably yes, since a client app may look for one there.
+        HandlerResolver handlerResolver = null;
+        if(serviceDelegate.getHandlerResolver() != null){
+            if(log.isDebugEnabled()){
+                log.debug("Reading default Handler Resolver ");
+            }
+            handlerResolver = serviceDelegate.getHandlerResolver();
+        }
+        else{
+            handlerResolver = new HandlerResolverImpl(endpointDesc.getServiceDescription(), serviceDelegate);
+            if(log.isDebugEnabled()){
+                log.debug("Creating new Handler Resolver using HandlerResolverImpl");
+            }
+        }
+
+        // See if the metadata from creating the service indicates that MTOM, Addressing and/or RespectBinding should be enabled
+        if (binding instanceof SOAPBinding) {
+            configureBindingFromMetadata();
+        }
+                
+        // check for properties that need to be set on the BindingProvider
+        String seiName = null;
+        if(endpointDesc.getEndpointInterfaceDescription() != null 
+                &&
+                endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
+            seiName = endpointDesc.getEndpointInterfaceDescription().getSEIClass().getName();
+        }
+        String portQNameString = endpointDesc.getPortQName().toString();
+        String key = seiName + ":" + portQNameString;
+        Map<String, Object> bProps = endpointDesc.getServiceDescription().getBindingProperties(serviceDelegate, key);
+        if(bProps != null) {
+            if(log.isDebugEnabled()) {
+                log.debug("Setting binding props with size: " + bProps.size() + " on " +
+                "BindingProvider RequestContext");
+            }
+            requestContext.putAll(bProps);
+        }
+        
+        binding.setHandlerChain(handlerResolver.getHandlerChain(endpointDesc.getPortInfo()));
+        
+        //Set JAX-WS 2.1 related properties.
+        try {
+            binding.setAxis2EndpointReference(epr);
+            binding.setAddressingNamespace(addressingNamespace);
+            binding.setFeatures(features);
+        }
+        catch (Exception e) {
+            throw ExceptionFactory.makeWebServiceException(e);
+        }
+    }
+
+    /**
+     * Configure the binding from the Metadata for WebService Features.
+     */
+    private void configureBindingFromMetadata() {
+        // MTOM can be enabled either at the ServiceDescription level (via the WSDL binding type) or
+        // at the EndpointDescription level via the binding type used to create a Dispatch.
+        boolean enableMTOMFromMetadata = false;
+        int mtomThreshold = 0;
+        boolean isAddressingConfiguredViaMetadata = false;
+        boolean enableRespectBindingdFromMetadata = false;
+        boolean enableAddressingFromMetadata = false;
+        boolean requireAddressingFromMetadata = false;
+        Responses addressingResponses = null;
+        
+        // if we have an SEI for the port, then we'll use it in order to search for WebService Feature configuration
+        if(endpointDesc.getEndpointInterfaceDescription() != null
+                &&
+                endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
+            enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate, 
+                                                               endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+            mtomThreshold = getMTOMThreshold(endpointDesc.getServiceDescription(), serviceDelegate,
+                    endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+
+            enableRespectBindingdFromMetadata = isRespectBindingEnabled(endpointDesc.getServiceDescription(), serviceDelegate,
+                    endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+            
+            isAddressingConfiguredViaMetadata = isAddressingConfigured(endpointDesc.getServiceDescription(), serviceDelegate,
+                    endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+            if (isAddressingConfiguredViaMetadata) {
+                enableAddressingFromMetadata = isAddressingEnabled(endpointDesc.getServiceDescription(), serviceDelegate,
+                        endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+                requireAddressingFromMetadata = isAddressingRequired(endpointDesc.getServiceDescription(), serviceDelegate,
+                        endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+                addressingResponses = getAddressingResponses(endpointDesc.getServiceDescription(), serviceDelegate,
+                        endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+            }
+           
+            
+        }
+        else {
+            enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
+            // MTOM.Threshold, RespectBinding, and Addressing does not need to be set here based on the sparse composite 
+            // (i.e. depolyment descriptor) since it can only be applied to a port injection (i.e. an SEI) using a DD.
+        }
+        if (!enableMTOMFromMetadata) {
+            String bindingType = endpointDesc.getClientBindingID();
+            enableMTOMFromMetadata = (bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) || 
+                                      bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING));
+        }
+        
+        if (enableMTOMFromMetadata) {
+            ((SOAPBinding) binding).setMTOMEnabled(true);
+            ((SOAPBinding) binding).setMTOMThreshold(mtomThreshold);
+        }
+        
+        if (enableRespectBindingdFromMetadata) {
+            ((SOAPBinding) binding).setRespectBindingEnabled(true);
+        }
+        
+        if (isAddressingConfiguredViaMetadata) {
+            ((SOAPBinding) binding).setAddressingConfigured(true);
+            ((SOAPBinding) binding).setAddressingEnabled(enableAddressingFromMetadata);
+            ((SOAPBinding) binding).setAddressingRequired(requireAddressingFromMetadata);
+            ((SOAPBinding) binding).setAddressingResponses(addressingResponses);
+        }
+    }
+
+    private boolean isRespectBindingEnabled(ServiceDescription serviceDescription, ServiceDelegate serviceDelegateKey, 
+            Class seiClass) {
+        boolean isEnabled = serviceDescription.isRespectBindingEnabled(serviceDelegateKey, seiClass);
+        return isEnabled;
+    }
+
+    
+    /**
+     * Answer if addressing was explicitly configured via metadata.  Note that if Addressing was not explicitly configured,
+     * then the related methods will return default values.  If Addressing was explicitly configured, the related 
+     * methods will return values based on whatever configuration was specified.
+     * @see #isAddressingEnabled(ServiceDescription, ServiceDelegate, Class) 
+     * @see #isAddressingRequired(ServiceDescription, ServiceDelegate, Class)
+     * @see #getAddressingResponses(ServiceDescription, ServiceDelegate, Class)
+     * @param serviceDescription
+     * @param serviceDelegateKey
+     * @param seiClass
+     * @return true if addressing was explicitly configured via metadata, false otherwise.
+     */
+    private boolean isAddressingConfigured(ServiceDescription serviceDescription, ServiceDelegate serviceDelegateKey, 
+            Class seiClass) {
+        boolean isConfigured = serviceDescription.isAddressingConfigured(serviceDelegateKey, seiClass);
+        return isConfigured;
+    }
+    
+    private boolean isAddressingEnabled(ServiceDescription serviceDescription, ServiceDelegate serviceDelegateKey, 
+            Class seiClass) {
+        boolean isEnabled = serviceDescription.isAddressingEnabled(serviceDelegateKey, seiClass);
+        return isEnabled;
+    }
+
+    private boolean isAddressingRequired(ServiceDescription serviceDescription, ServiceDelegate serviceDelegateKey, 
+            Class seiClass) {
+        boolean isRequired = serviceDescription.isAddressingRequired(serviceDelegateKey, seiClass);
+        return isRequired;
+    }
+    private Responses getAddressingResponses(ServiceDescription serviceDescription, ServiceDelegate serviceDelegateKey, 
+            Class seiClass) {
+        Responses responses = serviceDescription.getAddressingResponses(serviceDelegateKey, seiClass);
+        return responses;
+    }
+
+    private int getMTOMThreshold(ServiceDescription serviceDescription, ServiceDelegate serviceDelegate, Class seiClass) {
+        int threshold = serviceDescription.getMTOMThreshold(serviceDelegate, seiClass);
+        
+        return threshold;
+    }
+
+    public ServiceDelegate getServiceDelegate() {
+        return serviceDelegate;
+    }
+
+    public EndpointDescription getEndpointDescription() {
+        return endpointDesc;
+    }
+
+    public Binding getBinding() {
+        return binding;
+    }
+
+    public Map<String, Object> getRequestContext() {
+        return requestContext;
+    }
+
+    public Map<String, Object> getResponseContext() {
+        return responseContext;
+    }
+
+    /**
+     * Check for maintain session state enablement either in the
+     * MessageContext.isMaintainSession() or in the ServiceContext properties.
+     * 
+     * @param mc
+     * @param ic
+     */
+    protected void checkMaintainSessionState(MessageContext mc, InvocationContext ic) {
+        Map<String, Object> properties = ic.getServiceClient().getServiceContext().getProperties();
+        boolean bValue = false;
+
+        if (properties != null
+            && properties
+                         .containsKey(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY)) {
+            bValue = (Boolean) properties
+                .get(javax.xml.ws.BindingProvider.SESSION_MAINTAIN_PROPERTY);
+        }
+        if (mc.isMaintainSession() || bValue == true) {
+            setupSessionContext(properties);
+        }
+    }
+
+    /*
+    * Ensure that the next request context contains the session value returned
+    * from previous request
+    */
+    protected void setupSessionContext(Map<String, Object> properties) {
+        String sessionKey = null;
+        Object sessionValue = null;
+
+        if (properties == null) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("NoMaintainSessionProperty"));
+        } else if (properties.containsKey(HTTPConstants.HEADER_LOCATION)) {
+            sessionKey = HTTPConstants.HEADER_LOCATION;
+            sessionValue = properties.get(sessionKey);
+            if (sessionValue != null && !"".equals(sessionValue)) {
+                requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, sessionValue);
+            }
+        } else if (properties.containsKey(HTTPConstants.HEADER_COOKIE)) {
+            sessionKey = HTTPConstants.HEADER_COOKIE;
+            sessionValue = properties.get(sessionKey);
+            if (sessionValue != null && !"".equals(sessionValue)) {
+                requestContext.put(HTTPConstants.COOKIE_STRING, sessionValue);
+            }
+        } else if (properties.containsKey(HTTPConstants.HEADER_COOKIE2)) {
+            sessionKey = HTTPConstants.HEADER_COOKIE2;
+            sessionValue = properties.get(sessionKey);
+            if (sessionValue != null && !"".equals(sessionValue)) {
+                requestContext.put(HTTPConstants.COOKIE_STRING, sessionValue);
+            }
+        } else {
+            throw ExceptionFactory
+                    .makeWebServiceException(Messages.getMessage("NoMaintainSessionProperty"));
+        }
+
+        if (sessionValue == null) {
+            throw ExceptionFactory.makeWebServiceException(
+                    Messages.getMessage("NullValueForMaintainSessionProperty", sessionKey));
+        }
+    }
+
+    /**
+     * Returns a boolean value representing whether or not a SOAPAction header should be sent with
+     * the request.
+     */
+    protected boolean useSoapAction() {
+        //TODO: Add some bit of validation for this property so that we know
+        // it is actually a Boolean and not a String.
+        Boolean use = (Boolean)requestContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
+        if (use != null) {
+            if (use.booleanValue()) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            // If the value is not set, then just default to sending a SOAPAction
+            return true;
+        }
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see javax.xml.ws.BindingProvider#getEndpointReference()
+     */
+    public EndpointReference getEndpointReference() {
+        return getEndpointReference(W3CEndpointReference.class);
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see javax.xml.ws.BindingProvider#getEndpointReference(java.lang.Class)
+     */
+    public <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+        EndpointReference jaxwsEPR = null;
+        String addressingNamespace = EndpointReferenceUtils.getAddressingNamespace(clazz);
+        
+        try {
+            org.apache.axis2.addressing.EndpointReference epr = binding.getAxis2EndpointReference();
+            
+            if (epr == null) {
+                String address =
+                    (String) requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+                if (address == null)
+                    address = endpointDesc.getEndpointAddress();
+                QName service = endpointDesc.getServiceQName();
+                QName port = endpointDesc.getPortQName();
+                String wsdlLocation = "?wsdl";  // let the webcontainer redirect us to the real WSDL URL; it knows where it is
+
+                epr = EndpointReferenceUtils.createAxis2EndpointReference(address, service, port, wsdlLocation, addressingNamespace);
+                
+                // Add reference parameters from WSDL to the EPR
+                AxisService axisService = endpointDesc.getAxisService();
+                if (axisService != null) {
+                    AxisEndpoint axisEndpoint = axisService.getEndpoint(axisService.getEndpointName());
+                    
+                    if(axisEndpoint != null){
+                        ArrayList referenceParameters = (ArrayList) axisEndpoint.getParameterValue(AddressingConstants.REFERENCE_PARAMETER_PARAMETER);
+                        if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
+                            log.trace("getEndpointReference: Adding reference parameters to EPR from WSDL: axisService = " + axisService + ", axisEndpoint = " + axisEndpoint.getName() + ", referenceParameters = " + referenceParameters);
+                        }
+                        if(referenceParameters!=null){
+                            Iterator iterator = referenceParameters.iterator();
+                            HashMap<QName, OMElement> refParamMap = new HashMap<QName, OMElement>();
+                            while (iterator.hasNext()) {
+                                OMElement omElement = (OMElement)iterator.next();
+                                refParamMap.put(omElement.getQName(), omElement);
+                            }
+                            epr.setReferenceParameters(refParamMap);
+                        }
+                    }
+                }
+            }
+            else if (!addressingNamespace.equals(binding.getAddressingNamespace())) {
+                throw ExceptionFactory.
+                   makeWebServiceException(Messages.getMessage("bindingProviderErr1",
+                                                               binding.getAddressingNamespace(),
+                                                               addressingNamespace));
+            }
+
+            jaxwsEPR = EndpointReferenceUtils.convertFromAxis2(epr, addressingNamespace);
+        } catch (UnsupportedOperationException e) {
+            throw e;
+        } catch (WebServiceException e) {
+            throw e;
+        } catch (Exception e) {
+            throw ExceptionFactory.
+                makeWebServiceException(Messages.getMessage("endpointRefConstructionFailure3", 
+                                                            e.toString()));
+        }
+        
+        return clazz.cast(jaxwsEPR);
+    }
+    
+    /*
+    * An inner class used to validate properties as they are set by the client.
+    */
+    class ValidatingClientContext extends Hashtable<String, Object> {
+        private static final long serialVersionUID = 3485112205801917858L;
+
+        @Override
+        public synchronized Object put(String key, Object value) {
+            // super.put rightly throws a NullPointerException if key or value is null, so don't continue if that's the case
+            if (value == null)
+                return null;
+            if (PropertyValidator.validate(key, value)) {
+                return super.put(key, value);
+            } else {
+                throw ExceptionFactory.makeWebServiceException(
+                        Messages.getMessage("invalidPropValue", key, value.getClass().getName(),
+                                            PropertyValidator.getExpectedValue(key).getName()));
+            }
+        }
+    }
+
+
+}

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/BindingProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java?rev=1150977&view=auto
==============================================================================
--- geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java (added)
+++ geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java Tue Jul 26 03:06:00 2011
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws;
+
+/**
+ * Constants that apply to the JAX-WS implementation.
+ *
+ */
+public interface Constants {
+    public static final String ENDPOINT_CONTEXT_MAP =
+        "org.apache.axis2.jaxws.addressing.util.EndpointContextMap";
+    
+    public static final String JAXWS_OUTBOUND_SOAP_HEADERS  = 
+        org.apache.axis2.Constants.JAXWS_OUTBOUND_SOAP_HEADERS;
+    public static final String JAXWS_INBOUND_SOAP_HEADERS   = 
+        org.apache.axis2.Constants.JAXWS_INBOUND_SOAP_HEADERS;
+    /**
+     * Value that can be set on a MessageContext.  The property value should be a Boolean()
+     * 
+     * If set to false, then JAXB streaming of the XML body is disabled.
+     * A value of false will result in slower performance for unmarshalling JAXB objects
+     * but is a loss-less transformation.  
+     *  
+     * A value of true will cause the JAXB objects to be created when the XML body is initially 
+     * parsed, which is more performant, but it may loose some information contained in the 
+     * original XML such as namespace prefixes if the XML stream is recreated from the JAXB 
+     * objects.
+     * 
+     * The default value is Boolean(true) if this property is not set.  
+     * @deprecated see JAXWS_PAYLOAD_HIGH_FIDELITY
+     */
+    public static final String JAXWS_ENABLE_JAXB_PAYLOAD_STREAMING = 
+        "org.apache.axis2.jaxws.enableJAXBPayloadStreaming";
+    
+    /**
+     * Context Property:
+     * Name: jaxws.payload.highFidelity
+     * Value: Boolean.TRUE or Boolean.FALSE
+     * Default: null, which is interpreted as FALSE....engine may set this to TRUE in some cases.
+     * 
+     * Configuration Parameter
+     * Name: jaxws.payload.highFidelity
+     * Value: String or Boolean representing true or false
+     * Default: null, which is interpreted as FALSE
+     * 
+     * Description:
+     * If the value is false, the jax-ws engine will transform the message in the most
+     * performant manner.  In some cases these transformations will cause the loss of some information.
+     * For example, JAX-B transformations are lossy.  
+     * 
+     * If the value is true, the jax-ws engine will transform the message in the most loss-less manner.
+     * In some cases this will result in slower performance.  The message in such cases is "high fidelity",
+     * which means that it is a close replica of the original message.
+     * 
+     * Customers should accept the default behavior (false), and only set the value to true if it is
+     * necessary for a SOAP Handler or other code requires a high fidelity message.
+     * 
+     * The engine will first examine the Context property.  If not set, the value of the Configuration
+     * property is used.
+     */
+    public static final String JAXWS_PAYLOAD_HIGH_FIDELITY =
+        "jaxws.payload.highFidelity";
+    
+    /**
+     * Context Property:
+     * Name: jaxws.provider.interpretNullAsOneway
+     * Value: Boolean.TRUE or Boolean.FALSE
+     * Default: TRUE.
+     * 
+     * Configuration Parameter
+     * Name: jaxws.provider.interpretNullAsOneway
+     * Value: String or Boolean representing true or false
+     * Default: true
+     * 
+     * Description:
+     * If the value is false, the jax-ws engine will interpret a null response from a provider as an empty
+     * response to a two-way operation.  As a result it will create a SOAPEnvelope with an empty SOAPBody and send that
+     * as a response.
+     * 
+     * If the value is true, the jax-ws engine will intrepret a null return value from a provider as an indication of 
+     * a one-way operation.  As a result, the engine will halt processing on the response.  Response handlers will not
+     * be invoked.  An HTTP acknowledgment will be sent back to the client.  No SOAPEnvelope will be sent.  You must use
+     * one-way client when invoking a Provider which returns null if this property is true.
+     * 
+     * This is only true for operations which are not defined in WSDL.  If the operation is defined in WSDL, the WSDL
+     * determine the response for a Provider that returns null.  If the WSDL defines a two-way operation, a null
+     * from a provider will continue to produce a SOAPEnvelope with and empty SOAPBody as the response.
+     * 
+     * The engine will first examine the Context property.  If not set, the value of the Configuration
+     * property is used.
+     */
+    public static final String JAXWS_PROVIDER_NULL_ONEWAY =
+        "jaxws.provider.interpretNullAsOneway";
+    
+    public static final String MEP_CONTEXT = 
+        "org.apache.axis2.jaxws.handler.MEPContext";
+    
+    /**
+     * If a checked exception is thrown by the webservice's webmethod, then
+     * the name of the checked exception is placed in the outbound response context.
+     */
+    public static final String CHECKED_EXCEPTION =
+        "org.apache.axis2.jaxws.checkedException";
+    
+    /**
+     * If an exception is thrown by the JAXWS webservice's webmethod, the 
+     * Throwable object is placed in the service outbound response context.
+     */
+    public static final String JAXWS_WEBMETHOD_EXCEPTION = 
+        org.apache.axis2.Constants.JAXWS_WEBMETHOD_EXCEPTION;
+    
+    /**
+     * This constant introduces an extension for @BindingType annotation.
+     * When the value of BindingType annotation is set to this constant,
+     * the javax.xml.ws.Provider java endpoints will cater to SOAP11 and SOAP12
+     * messages.
+     */
+    public static final String SOAP_HTTP_BINDING ="SOAP_HTTP_BINDING";
+    
+    /**
+     * This constant will be used to determine if a Exception will be throw by
+     * JAX-WS layer when a SOAP Fault is received on response. 
+     */
+    public static final String THROW_EXCEPTION_IF_SOAP_FAULT = "jaxws.response.throwExceptionIfSOAPFault";
+    
+    /** 
+     * Context Property:
+     * Name: jaxws.header.parameter.isNull.write.element.with.xsi.nil
+     * Value: Boolean.TRUE or Boolean.FALSE
+     * Default: null, which is interpretted as Boolean.TRUE
+     * 
+     * If the @WebParam indicates that the parameter is mapped to a header 
+     * and the argument for the parameter is null, this property is queried by the
+     * JAX-WS runtime to determine if 
+     *  a) TRUE: A SOAP header element is serialized with an xsi:nil="true" attribute
+     *  b) FALSE: No SOAP header element is serialized.
+     *  
+     *  The default is TRUE because the JAX-WS developers feel that this is a safer
+     *  approach.
+     * 
+     */
+    public static final String WRITE_HEADER_ELEMENT_IF_NULL = "jaxws.header.parameter.isNull.write.element.with.xsi.nil";
+    /**
+     * This constant will be used to store the location of JAX-WS generated artifacts cache.
+     */
+    public static final String WS_CACHE="wsCache";
+    
+    /**
+     * Context Property:
+     * Name: jaxws.jaxb.write.remove.illegal.chars
+     * Value: Boolean.TRUE or Boolean.FALSE
+     * Default: null, which is interpreted as FALSE.
+     * 
+     * Configuration Parameter
+     * Name: jaxws.jaxb.write.remove.illegal.chars
+     * Value: String or Boolean representing true or false
+     * Default: null, which is interpreted as FALSE
+     * 
+     * Description:
+     * If the value is true, the jax-ws engine will detect and remove
+     * illegal characters (characters not supported in xml) when writing
+     * a JAXB data bean associated with a jaxws web method
+     *  http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Char
+     * This extra filter may degrade performance.
+     * 
+     * Customers should accept the default behavior (false), and only set the value to true if the
+     * character data produced by their web service is invalid and cannot be filtered by some
+     * other mechanism.
+     * 
+     * The engine will first examine the Context property.  If not set, the value of the Configuration
+     * property is used.
+     */
+    public static final String JAXWS_JAXB_WRITE_REMOVE_ILLEGAL_CHARS = 
+        "jaxws.jaxb.write.remove.illegal.chars";
+    
+    /**
+     * javax.xml.ws.handler.MessageContext  Property:
+     * Name: jaxws.message.as.string
+     * Value: null or MessageAccessor
+     * 
+     * Description:
+     * A handler or resource injection @WebServiceContext may use
+     * this property to get access to a MessageAccessor object.
+     * The MessageAccessor contains methods to allow a user to 
+     * get additional attributes from the message (for example getMessageAsString)
+     */
+    public static final String JAXWS_MESSAGE_ACCESSOR = 
+        "jaxws.message.accessor";
+
+    /** 
+     * Context Property:
+     * Name: jaxws.dispatch.outbound.operation.resolution.enable
+     * Value: String "false" or "true"
+     * Default: null, which is interpreted as "true"
+     * Can be set on:
+     * - Axis Configuration, which affects operation resolution across all Dispatch<T> clients
+     * - Request message context, which affects only the Dispatch<T> client using that context.
+     *
+     * Indicates if a Dispatch<T> message should be parsed to determine the operation indicated in the
+     * message, and use that to determine the Action that should be placed in the outgoing message.  The
+     * Action would be placed in the SOAPAction HTTP header and any WS-Addressing Action headers if 
+     * WS-Addressing is enabled.  Prior to the introduction of this property and associated support, 
+     * for Dispatch<T> the client would have to set the Action on the Request Message context in order to 
+     * get a meaningful value set as the Action.
+     * 
+     * Note that parsing the outgoing message in order to determine the operation indicated in the
+     * message can be slow.  Therefore, this property is provided to disable that operation resolution.
+     * The default, however, is to do operation resolution.
+     * 
+     * Operation resolution will also be disabled on a Dispatch<T> client if an Action was set on the 
+     * request message context.  
+     * 
+     * @see javax.xml.ws.BindingProvider.SOAPACTION_USE_PROPERTY
+     * @see javax.xml.ws.BindingProvider.SOAPACTION_URI_PROPERTY
+     */
+    public static final String  DISPATCH_CLIENT_OUTBOUND_RESOLUTION = "jaxws.dispatch.outbound.operation.resolution.enable"; 
+
+    /** 
+     * Context Property:
+     * Name: jaxws.soapfault.local.exceptions.disable
+     * Value: String "false" or "true"
+     * Default: null, which is interpreted as "false"
+     * Can be set on:
+     * - Axis Configuration, which affects all jax-ws clients
+     *
+     * Indicates if local exceptions encountered by a JAX-WS client should be turned into a SOAPFaultException
+     * and then call the appropriate JAX-WS application handlers handleFault()methods with that SOAPFault
+     * in the message.  This is new behavior, which is the default behavior indicated by this property not being
+     * set or having a value of "false".
+     * 
+     * The previous behavior was for local exceptions to be turned into a WebServiceException that was set
+     * on an empty response message.  The appropriate JAX-WS application handers handleMessage() methods would be
+     * called with that empty message.  Setting this property to "true" will revert to this behavior.
+     */
+    public static final String  DISABLE_SOAPFAULT_FOR_LOCAL_EXCEPTION = "jaxws.soapfault.local.exceptions.disable"; 
+
+    /** 
+     * Context Property:
+     * Name: jaxws.endpoint.publish.disable
+     * Value: String "false" or "true"
+     * Default: null, which is interpreted as "false"
+     * Can be set on:
+     * - Axis Configuration, which affects all jax-ws endpoints
+     *
+     * Indicates if the javax.xml.ws.Endpoint.publish methods should be disabled, throwing an exception if
+     * they are called.  This may be necessary in a managed environment, since as noted in JSR-109 section
+     * 5.3.3 "Publishing Endpoints" using publish is non-portable in managed environments, and managed 
+     * environments may disallow publishing of endpoints dynamciall.
+     * 
+     * If this property is set, the Endpoint.publish methods will throw an UnsupportedOperationException.
+     */
+    public static final String  DISABLE_ENDPOINT_PUBLISH_METHODS = "jaxws.endpoint.publish.disable"; 
+}

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/jaxws/Constants.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message