axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r475277 - in /webservices/axis2/branches/java/new-trunk/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test-resources/ addressing/test/org/apache/axis2/handlers/addressing/ kernel/src/org/apache/axis2/addressing/
Date Wed, 15 Nov 2006 15:55:57 GMT
Author: dims
Date: Wed Nov 15 07:55:56 2006
New Revision: 475277

URL: http://svn.apache.org/viewvc?view=rev&rev=475277
Log:
port addressing module changes

Modified:
    webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
    webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/axis2.xml
    webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/eprTest.xml
    webservices/axis2/branches/java/new-trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
    webservices/axis2/branches/java/new-trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
Wed Nov 15 07:55:56 2006
@@ -1,6 +1,7 @@
 package org.apache.axis2.handlers.addressing;
 
 import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axis2.AxisFault;
@@ -47,10 +48,16 @@
     protected void extractToEprReferenceParameters(EndpointReference toEPR, SOAPHeader header,
String namespace) {
         Iterator headerBlocks = header.getChildElements();
         while (headerBlocks.hasNext()) {
-            SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) headerBlocks.next();
-            OMAttribute isRefParamAttr = soapHeaderBlock.getAttribute(new QName(namespace,
"IsReferenceParameter"));
+            OMElement headerElement = (OMElement) headerBlocks.next();
+            OMAttribute isRefParamAttr = headerElement.getAttribute(new QName(namespace,
"IsReferenceParameter"));
+            if (log.isTraceEnabled()){
+                log.trace("extractToEprReferenceParameters: Checking header: "+headerElement.getQName());
+            }
             if (isRefParamAttr != null && "true".equals(isRefParamAttr.getAttributeValue()))
{
-                toEPR.addReferenceParameter(soapHeaderBlock.getQName(), soapHeaderBlock.getText());
+                toEPR.addReferenceParameter(headerElement.getQName(), headerElement.getText());
+                if (log.isTraceEnabled()){
+                    log.trace("extractToEprReferenceParameters: Header: "+headerElement.getQName()+"
has IsReferenceParameter attribute. Adding to toEPR.");
+                }
             }
         }
     }

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
Wed Nov 15 07:55:56 2006
@@ -52,7 +52,7 @@
                 log.debug("Another handler has processed the addressing headers. Nothing
to do here.");
             }
 
-            return InvocationResponse.CONTINUE;        
+            return InvocationResponse.CONTINUE;
         }
         
         // check whether someone has explicitly set which addressing handler should run.
@@ -65,7 +65,7 @@
                 log.debug("This addressing handler does not match the specified namespace,
" + namespace);
             }
 
-            return InvocationResponse.CONTINUE;        
+            return InvocationResponse.CONTINUE;
         }
 
         SOAPHeader header = null;
@@ -76,7 +76,7 @@
         // if there are not headers put a flag to disable addressing temporary
         if (header == null) {
             msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
-            return InvocationResponse.CONTINUE;        
+            return InvocationResponse.CONTINUE;
         }
 
 		if(log.isDebugEnabled()) {
@@ -100,7 +100,8 @@
 				log.debug("No Headers present corresponding to " + addressingVersion);
 			}
         }
-        return InvocationResponse.CONTINUE;        
+        
+        return InvocationResponse.CONTINUE;
     }
 
     protected Options extractAddressingInformation(SOAPHeader header, MessageContext messageContext,
@@ -192,6 +193,11 @@
     	}else{
     		checkedHeaderNames.add(addressingHeaderName);
     	}
+        
+        if(log.isTraceEnabled()){
+            log.trace("checkDuplicateHeaders: addressingHeaderName="+addressingHeaderName+"
isDuplicate="+shouldIgnore);
+        }
+        
     	return shouldIgnore;
     }
 
@@ -200,20 +206,32 @@
 
     private void extractRelatesToInformation(SOAPHeaderBlock soapHeaderBlock, String addressingNamespace,
Options messageContextOptions) {
         String address = soapHeaderBlock.getText();
+        
+        // Extract the RelationshipType attribute if it exists
         OMAttribute relationshipType =
                 soapHeaderBlock.getAttribute(
                         new QName(AddressingConstants.WSA_RELATES_TO_RELATIONSHIP_TYPE));
-        String relationshipTypeDefaultValue =
+        
+        String relationshipTypeString = null;
+        
+        // If an attribute was found, use the value from it 
+        if(relationshipType!=null){
+            relationshipTypeString = relationshipType.getAttributeValue();
+        }else{ // Else use the appropriate default (depends on namespace in use)
+            relationshipTypeString =
                 Submission.WSA_NAMESPACE.equals(addressingNamespace)
                         ? Submission.WSA_DEFAULT_RELATIONSHIP_TYPE
                         : Final.WSA_DEFAULT_RELATIONSHIP_TYPE;
-        RelatesTo relatesTo =
-                new RelatesTo(
-                        address,
-                        relationshipType == null
-                                ? relationshipTypeDefaultValue
-                                : relationshipType.getAttributeValue());
+        }
+        
+        if(log.isTraceEnabled()){
+            log.trace("extractRelatesToInformation: Extracted Relationship. Value="+address+"
RelationshipType="+relationshipTypeString);
+        }
+        
+        RelatesTo relatesTo = new RelatesTo(address, relationshipTypeString);
         messageContextOptions.addRelatesTo(relatesTo);
+        
+        // Completed processing of this header
         soapHeaderBlock.setProcessed();
     }
 
@@ -225,6 +243,9 @@
             messageContextOptions.setFaultTo(epr);
         }
         extractEPRInformation(soapHeaderBlock, epr, addressingNamespace, messageContext);
+        if(log.isTraceEnabled()){
+            log.trace("extractFaultToEPRInformation: Extracted FaultTo EPR: "+epr);
+        }
         soapHeaderBlock.setProcessed();
     }
 
@@ -236,6 +257,9 @@
             messageContextOptions.setReplyTo(epr);
         }
         extractEPRInformation(soapHeaderBlock, epr, addressingNamespace, messageContext);
+        if(log.isTraceEnabled()){
+            log.trace("extractReplyToEPRInformation: Extracted ReplyTo EPR: "+epr);
+        }
         soapHeaderBlock.setProcessed();
     }
 
@@ -248,6 +272,9 @@
             messageContextOptions.setFrom(epr);
         }
         extractEPRInformation(soapHeaderBlock, epr, addressingNamespace, messageContext);
+        if(log.isTraceEnabled()){
+            log.trace("extractFromEPRInformation: Extracted From EPR: "+epr);
+        }
         soapHeaderBlock.setProcessed();
     }
 
@@ -262,6 +289,9 @@
         extractToEprReferenceParameters(epr, header, namespace);
         soapHeaderBlock.setProcessed();
 
+        if(log.isTraceEnabled()){
+            log.trace("extractToEPRInformation: Extracted To EPR: "+epr);
+        }
     }
     
     //We assume that any action that already exists in the message context must be the
@@ -270,14 +300,19 @@
     private void extractActionInformation(SOAPHeaderBlock soapHeaderBlock, String addressingNamespace,
MessageContext messageContext) throws AxisFault {
         Options messageContextOptions = messageContext.getOptions();
         String soapAction = messageContextOptions.getAction();
+        String wsaAction = soapHeaderBlock.getText();
+        
+        if(log.isTraceEnabled()){
+            log.trace("extractActionInformation: soapAction='"+soapAction+"' wsa:Action='"+wsaAction+"'");
+        }
         
         if (soapAction != null && !"".equals(soapAction)) {
-            if (!soapAction.equals(soapHeaderBlock.getText())) {
+            if (!soapAction.equals(wsaAction)) {
                 AddressingFaultsHelper.triggerActionMismatchFault(messageContext);
             }
         }
         else {
-            messageContextOptions.setAction(soapHeaderBlock.getText());            
+            messageContextOptions.setAction(wsaAction);            
         }
         
         soapHeaderBlock.setProcessed();        
@@ -293,8 +328,10 @@
     private void extractEPRInformation(SOAPHeaderBlock headerBlock, EndpointReference epr,
String addressingNamespace, MessageContext messageContext) throws AxisFault {
         try {
             EndpointReferenceHelper.fromOM(epr, headerBlock, addressingNamespace);
-        }
-        catch (AxisFault af) {
+        }catch (AxisFault af) {
+            if(log.isTraceEnabled()){
+                log.trace("extractEPRInformation: Exception occurred deserialising an EndpointReference.",af);
+            }
             AddressingFaultsHelper.triggerMissingAddressInEPRFault(messageContext, headerBlock.getLocalName());
         }
     }

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Wed Nov 15 07:55:56 2006
@@ -19,7 +19,6 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.util.ElementHelper;
-import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
@@ -34,6 +33,7 @@
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.util.JavaUtils;
+import org.apache.axis2.util.Utils;
 
 import javax.xml.namespace.QName;
 
@@ -48,7 +48,7 @@
         Object property = msgContext.getProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
         if (property != null && JavaUtils.isTrueExplicitly(property)) {
             log.debug("Addressing is disabled .....");
-            return InvocationResponse.CONTINUE;        
+            return InvocationResponse.CONTINUE;
         }
 
         Object addressingVersionFromCurrentMsgCtxt = msgContext.getProperty(WS_ADDRESSING_VERSION);
@@ -117,29 +117,56 @@
         
         // process mustUnderstand attribute, if required.
         processMustUnderstandProperty(envelope, msgContext, addressingNamespaceObject);
-
-        return InvocationResponse.CONTINUE;        
+        
+        return InvocationResponse.CONTINUE;
     }
 
     private void processWSAAction(Options messageContextOptions, SOAPEnvelope envelope,
-                                  MessageContext msgCtxt, OMNamespace addressingNamespaceObject,
boolean replaceHeaders, boolean isFinalAddressingNamespace) {
+                                  MessageContext msgCtxt, OMNamespace addressingNamespaceObject,
boolean replaceHeaders, boolean isFinalAddressingNamespace) throws AxisFault {
         String action = messageContextOptions.getAction();
+        
+        if(log.isTraceEnabled()){
+            log.trace("processWSAAction: action from messageContext: "+action);
+        }
         if(action == null || "".equals(action)){
             if(msgCtxt.getAxisOperation()!=null){
                 action = msgCtxt.getAxisOperation().getOutputAction();
+                if(log.isTraceEnabled()){
+                    log.trace("processWSAAction: action from AxisOperation: "+action);
+                }
             }
         }
         
+        // Use the correct fault action for the selected namespace
         if (Final.WSA_FAULT_ACTION.equals(action) || Submission.WSA_FAULT_ACTION.equals(action))
{
             action = isFinalAddressingNamespace ? Final.WSA_FAULT_ACTION : Submission.WSA_FAULT_ACTION;
         }
-        else if (Final.WSA_SOAP_FAULT_ACTION.equals(action) && !isFinalAddressingNamespace)
{
+        else if (!isFinalAddressingNamespace && Final.WSA_SOAP_FAULT_ACTION.equals(action))
{
             action = Submission.WSA_FAULT_ACTION;
         }
-        
-        if (action != null && !isAddressingHeaderAlreadyAvailable(WSA_ACTION, envelope,
-                addressingNamespaceObject, replaceHeaders)) {
-            processStringInfo(action, WSA_ACTION, envelope, addressingNamespaceObject);
+
+        // If we need to add a wsa:Action header
+        if(!isAddressingHeaderAlreadyAvailable(WSA_ACTION, envelope,
+                addressingNamespaceObject, replaceHeaders)){
+            if(log.isTraceEnabled()){
+                log.trace("processWSAAction: No existing wsa:Action header found");
+            }
+            // If we don't have an action to add,
+            if(action == null || "".equals(action)){
+                if(log.isTraceEnabled()){
+                    log.trace("processWSAAction: No action to add to header");
+                }
+                // Fault unless validation has been explictily turned off
+                if(!Utils.isExplicitlyTrue(msgCtxt, AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION)){
+                    throw new AxisFault("Unable to determine wsa:Action for outbound message");
+                }
+            }else{
+                if(log.isTraceEnabled()){
+                    log.trace("processWSAAction: Adding action to header: "+action);
+                }
+                // Otherwise just add the header
+                processStringInfo(action, WSA_ACTION, envelope, addressingNamespaceObject);
+            }
         }
     }
 
@@ -147,18 +174,18 @@
         OMElement detailElement = AddressingFaultsHelper.getDetailElementForAddressingFault(msgContext,
addressingNamespaceObject);
         if(detailElement != null){
             //The difference between SOAP 1.1 and SOAP 1.2 fault messages is explained in
the WS-Addressing Specs.
-            if(msgContext.isSOAP11() && isFinalAddressingNamespace){
+            if(isFinalAddressingNamespace && msgContext.isSOAP11()){
                 // Add detail as a wsa:FaultDetail header
                 if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, envelope,
addressingNamespaceObject, replaceHeaders)) {
                     SOAPHeaderBlock faultDetail = envelope.getHeader().addHeaderBlock(Final.FAULT_HEADER_DETAIL,
addressingNamespaceObject);
-                    faultDetail.addChild(detailElement);
+                    faultDetail.addChild(ElementHelper.importOMElement(detailElement, envelope.getOMFactory()));
                 }
             }
             else if (!msgContext.isSOAP11()) {
                 // Add detail to the Fault in the SOAP Body
                 SOAPFault fault = envelope.getBody().getFault();
                 if (fault != null && fault.getDetail() != null) {
-                    fault.getDetail().addDetailEntry(detailElement);
+                    fault.getDetail().addDetailEntry(ElementHelper.importOMElement(detailElement,
envelope.getOMFactory()));
                 }
             }
         }
@@ -176,6 +203,9 @@
                     String relationshipType = relatesTo[i].getRelationshipType();
 
                     if (relatesToHeader != null) {
+                        
+                        // I think that if it's one of these two constants we can just not
add the attribute
+                        // which would save some small amount of bandwidth and processing.
                         if (Final.WSA_DEFAULT_RELATIONSHIP_TYPE.equals(relationshipType)
||
                             Submission.WSA_DEFAULT_RELATIONSHIP_TYPE.equals(relationshipType))
{
                             relationshipType = isFinalAddressingNamespace ?
@@ -262,7 +292,7 @@
         if (epr == null) {
             epr = new EndpointReference(anonymous);
         }
-        else if (epr.hasNoneAddress() && !isFinalAddressingNamespace) {
+        else if (!isFinalAddressingNamespace && epr.hasNoneAddress()) {
             return; //Omit the header.
         }
         else if (epr.hasAnonymousAddress()) {
@@ -329,22 +359,10 @@
         Object flag = msgContext.getProperty(AddressingConstants.ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS);
         if (JavaUtils.isTrueExplicitly(flag)) {
             List headers = envelope.getHeader().getHeaderBlocksWithNSURI(addressingNamespaceObject.getNamespaceURI());
-            Iterator iterator = headers.iterator();
 
-            while (iterator.hasNext()) {
-                OMElement elem = (OMElement)iterator.next();
-                if(elem instanceof SOAPHeaderBlock) {
-                    SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) elem;
-                    soapHeaderBlock.setMustUnderstand(true);  
-                } else {
-//                  Temp workaround to aviod hitting -  https://issues.apache.org/jira/browse/WSCOMMONS-103

-//                  since Axis2 next release (1.1) will be based on Axiom 1.1 
-//                  We can get rid of this fix with the Axiom SNAPSHOT
-                    elem.addAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND,
-                             "1",
-                            envelope.getNamespace());
-                }
-                
+            for (int i = 0, size = headers.size(); i < size; i++) {
+                SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) headers.get(i);
+                soapHeaderBlock.setMustUnderstand(true);  
             }
         }
     }

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/axis2.xml?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/axis2.xml
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/axis2.xml
Wed Nov 15 07:55:56 2006
@@ -18,6 +18,10 @@
                      class="org.apache.axis2.engine.AddressingBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.engine.RequestURIOperationDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
 
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.engine.RequestURIBasedDispatcher">

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/eprTest.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/eprTest.xml?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/eprTest.xml
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/test-resources/eprTest.xml
Wed Nov 15 07:55:56 2006
@@ -1,15 +1,17 @@
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-    <soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
-        <wsa:Reference4>Value 400</wsa:Reference4>
-        <wsa:Reference1>Value 100</wsa:Reference1>
-        <wsa:Reference0>Value 0</wsa:Reference0>
-        <wsa:Reference2>Value 200</wsa:Reference2>
-        <wsa:Reference3>Value 300</wsa:Reference3>
-        <wsa:To>http://www.to.org/service/</wsa:To>
-        <wsa:ReplyTo>
-            <wsa:Address>
-                http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
-        </wsa:ReplyTo>
-    </soapenv:Header>
-    <soapenv:Body></soapenv:Body>
+	<soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
+		<wsa:Reference4>Value 400</wsa:Reference4>
+		<wsa:Reference1>Value 100</wsa:Reference1>
+		<wsa:Reference0>Value 0</wsa:Reference0>
+		<wsa:Reference2>Value 200</wsa:Reference2>
+		<wsa:Reference3>Value 300</wsa:Reference3>
+		<wsa:To>http://www.to.org/service/</wsa:To>
+		<wsa:ReplyTo>
+			<wsa:Address>
+				http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
+			</wsa:Address>
+		</wsa:ReplyTo>
+		<wsa:Action>http://www.actions.org/action</wsa:Action>
+	</soapenv:Header>
+	<soapenv:Body />
 </soapenv:Envelope>

Modified: webservices/axis2/branches/java/new-trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingOutHandlerTest.java
Wed Nov 15 07:55:56 2006
@@ -67,6 +67,7 @@
         msgCtxt.setTo(epr);
         msgCtxt.setReplyTo(replyTo);
         msgCtxt.setEnvelope(defaultEnvelope);
+        msgCtxt.setWSAAction("http://www.actions.org/action");
         outHandler.invoke(msgCtxt);
 
         StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder("eprTest.xml");
@@ -98,8 +99,7 @@
         msgCtxt.setTo(epr);
         msgCtxt.setProperty(WS_ADDRESSING_VERSION, Submission.WSA_NAMESPACE);
 
-        epr =
-                new EndpointReference("http://www.replyTo.org/service/");
+        epr = new EndpointReference("http://www.replyTo.org/service/");
         msgCtxt.setReplyTo(epr);
 
         msgCtxt.setMessageID("123456-7890");
@@ -141,8 +141,7 @@
         msgCtxt.setTo(epr);
         msgCtxt.setProperty(WS_ADDRESSING_VERSION, Submission.WSA_NAMESPACE);
 
-        epr =
-                new EndpointReference("http://www.replyTo.org/service/");
+        epr = new EndpointReference("http://www.replyTo.org/service/");
         msgCtxt.setReplyTo(epr);
 
         msgCtxt.setMessageID("123456-7890");
@@ -174,6 +173,7 @@
         msgCtxt.setEnvelope(defaultEnvelope);
 
         msgCtxt.setTo(eprOne);
+        msgCtxt.setWSAAction("http://www.actions.org/action");
         outHandler.invoke(msgCtxt);
 
         // now the soap message within the msgCtxt must have a to header.
@@ -201,6 +201,7 @@
 
         msgCtxt.setProperty(REPLACE_ADDRESSING_HEADERS, Boolean.TRUE);
         msgCtxt.setTo(eprOne);
+        msgCtxt.setWSAAction("http://www.actions.org/action");
         outHandler.invoke(msgCtxt);
 
         assertTrue("http://whatever.org".equals(defaultEnvelope.getHeader().getFirstChildWithName(new
QName(WSA_TO)).getText()));
@@ -223,6 +224,7 @@
 
         msgCtxt.setProperty(REPLACE_ADDRESSING_HEADERS, Boolean.FALSE);
         msgCtxt.setTo(eprOne);
+        msgCtxt.setWSAAction("http://www.actions.org/action");
         outHandler.invoke(msgCtxt);
 
         assertTrue("http://oldEPR.org".equals(defaultEnvelope.getHeader().getFirstChildWithName(new
QName(WSA_TO)).getText()));

Modified: webservices/axis2/branches/java/new-trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/new-trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java?view=diff&rev=475277&r1=475276&r2=475277
==============================================================================
--- webservices/axis2/branches/java/new-trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
(original)
+++ webservices/axis2/branches/java/new-trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
Wed Nov 15 07:55:56 2006
@@ -70,6 +70,15 @@
     public static final String DISABLE_ADDRESSING_FOR_OUT_MESSAGES = "disableAddressingForOutMessages";
     
     public static final String ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS = "addMustUnderstandToAddressingHeaders";
+    
+    /**
+     * This property, if set to Boolean.TRUE, will mean that the addressing handler allows
partially
+     * ws-addressed messages to be sent even if they are then invalid rather than throwing
a fault.
+     * 
+     * It is not clear how necessary this property is and it may be removed before the next
release if
+     * it is not seen to be necessary - davidillsley@apache.org
+     */
+    public static final String DISABLE_OUTBOUND_ADDRESSING_VALIDATION = "disableAddressingOutboundValidation";
 
     public static final String WSAW_ANONYMOUS_PARAMETER_NAME = "wsawAnonymous";
     



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


Mime
View raw message