axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r446667 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ kernel/src/org/apache/axis2/util/
Date Fri, 15 Sep 2006 18:00:25 GMT
Author: davidillsley
Date: Fri Sep 15 11:00:24 2006
New Revision: 446667

URL: http://svn.apache.org/viewvc?view=rev&rev=446667
Log:
Fix thread safety issue with AddressingOutHandler
Remove unused method from Utils class (now in FinalFaultsHandler)
Commented out wsaw:Anonymous check as the spec is in flux until 
the spec is complete or 1.1 is released

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingHandler.java?view=diff&rev=446667&r1=446666&r2=446667
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingHandler.java
Fri Sep 15 11:00:24 2006
@@ -29,9 +29,6 @@
 
     protected String addressingNamespace = Final.WSA_NAMESPACE;  // defaulting to final version
     protected String addressingVersion = null;
-    protected String anonymousURI = Final.WSA_ANONYMOUS_URL;   // defaulting to final version
-    protected String relationshipType = Final.WSA_DEFAULT_RELATIONSHIP_TYPE; // defaulting
to final version
-
 
     protected static final Log log = LogFactory.getLog(AddressingHandler.class);
 

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=446667&r1=446666&r2=446667
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Fri Sep 15 11:00:24 2006
@@ -90,8 +90,8 @@
         }
         addressingNamespaceObject = factory.createOMNamespace(
                 namespace, WSA_DEFAULT_PREFIX);
-        anonymousURI = namespace.equals(Final.WSA_NAMESPACE) ? Final.WSA_ANONYMOUS_URL :
Submission.WSA_ANONYMOUS_URL;
-        relationshipType = namespace.equals(Final.WSA_NAMESPACE) ? Final.WSA_DEFAULT_RELATIONSHIP_TYPE
: Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE;
+        String anonymousURI = namespace.equals(Final.WSA_NAMESPACE) ? Final.WSA_ANONYMOUS_URL
: Submission.WSA_ANONYMOUS_URL;
+        String relationshipType = namespace.equals(Final.WSA_NAMESPACE) ? Final.WSA_DEFAULT_RELATIONSHIP_TYPE
: Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE;
 
 
         Options messageContextOptions = msgContext.getOptions();
@@ -123,7 +123,7 @@
         processToEPR(messageContextOptions, envelope, addressingNamespaceObject, namespace,
replaceHeaders);
 
         // processing WSA replyTo
-        processReplyTo(envelope, messageContextOptions, msgContext, addressingNamespaceObject,
namespace, replaceHeaders);
+        processReplyTo(envelope, messageContextOptions, msgContext, addressingNamespaceObject,
namespace, anonymousURI, replaceHeaders);
 
         // processing WSA From
         processFromEPR(messageContextOptions, envelope, addressingNamespaceObject, namespace,
replaceHeaders);
@@ -141,7 +141,7 @@
         processWSAAction(messageContextOptions, envelope, msgContext, addressingNamespaceObject,
replaceHeaders);
 
         // processing WSA RelatesTo
-        processRelatesTo(envelope, messageContextOptions, addressingNamespaceObject, replaceHeaders);
+        processRelatesTo(envelope, messageContextOptions, addressingNamespaceObject, relationshipType,
replaceHeaders);
 
         // process fault headers, if present
         processFaultsInfoIfPresent(envelope, msgContext, addressingNamespaceObject, replaceHeaders);
@@ -181,7 +181,7 @@
         }
     }
 
-    private void processRelatesTo(SOAPEnvelope envelope, Options messageContextOptions, OMNamespace
addressingNamespaceObject, boolean replaceHeaders) {
+    private void processRelatesTo(SOAPEnvelope envelope, Options messageContextOptions, OMNamespace
addressingNamespaceObject, String replyRelationshipType, boolean replaceHeaders) {
         if (!isAddressingHeaderAlreadyAvailable(WSA_RELATES_TO, envelope, addressingNamespaceObject,replaceHeaders))
         {
             RelatesTo[] relatesTo = messageContextOptions.getRelationships();
@@ -198,7 +198,7 @@
                     if (relatesToHeader != null) {
                         if (Final.WSA_DEFAULT_RELATIONSHIP_TYPE.equals(relationshipType)
|| "".equals(relationshipType)) {
                             relatesToHeader.addAttribute(WSA_RELATES_TO_RELATIONSHIP_TYPE,
-                                    this.relationshipType,
+                                    replyRelationshipType,
                                     addressingNamespaceObject);
                         } else {
                             relatesToHeader.addAttribute(WSA_RELATES_TO_RELATIONSHIP_TYPE,
@@ -227,7 +227,7 @@
         }
     }
 
-    private void processReplyTo(SOAPEnvelope envelope, Options messageContextOptions, MessageContext
msgContext, OMNamespace addressingNamespaceObject, String namespace, boolean replaceHeaders)
{
+    private void processReplyTo(SOAPEnvelope envelope, Options messageContextOptions, MessageContext
msgContext, OMNamespace addressingNamespaceObject, String namespace, String anonymousURI,
boolean replaceHeaders) {
         EndpointReference epr = null;
         if (!isAddressingHeaderAlreadyAvailable(WSA_REPLY_TO, envelope, addressingNamespaceObject,
replaceHeaders))
         {

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java?view=diff&rev=446667&r1=446666&r2=446667
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
Fri Sep 15 11:00:24 2006
@@ -40,7 +40,7 @@
         // Check that if wsaddressing=required that addressing headers were found inbound
         checkUsingAddressing(msgContext);
         // Check that if anonymous flag is in effect that the replyto and faultto are valid
-        checkAnonymous(msgContext);
+        //checkAnonymous(msgContext);
     }
     
     /**

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java?view=diff&rev=446667&r1=446666&r2=446667
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java Fri Sep
15 11:00:24 2006
@@ -378,22 +378,6 @@
         }
     }
 
-    public static void setFaultCode(MessageContext messageContext, String faultCode, String
faultSubCode) {
-        SOAPFactory soapFac = OMAbstractFactory.getSOAP12Factory();
-        SOAPFaultCode soapFaultCode = soapFac.createSOAPFaultCode();
-        SOAPFaultValue soapFaultValue = soapFac.createSOAPFaultValue(soapFaultCode);
-        soapFaultValue.setText(SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX + ":" + SOAP12Constants.FAULT_CODE_SENDER);
-        SOAPFaultSubCode soapFaultSubCode = soapFac.createSOAPFaultSubCode(soapFaultCode);
-        SOAPFaultValue soapFaultSubcodeValue = soapFac.createSOAPFaultValue(soapFaultSubCode);
-        soapFaultSubcodeValue.setText(AddressingConstants.WSA_DEFAULT_PREFIX + ":" + faultCode);
-        if (faultSubCode != null) {
-            SOAPFaultSubCode soapFaultSubCode2 = soapFac.createSOAPFaultSubCode(soapFaultSubCode);
-            SOAPFaultValue soapFaultSubcodeValue2 = soapFac.createSOAPFaultValue(soapFaultSubCode2);
-            soapFaultSubcodeValue2.setText(AddressingConstants.WSA_DEFAULT_PREFIX + ":" +
faultSubCode);
-        }
-        messageContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, soapFaultCode);
-    }
-
     public static boolean isExplicitlyTrue(MessageContext messageContext, String propertyName)
{
         Object flag = messageContext.getProperty(propertyName);
         return JavaUtils.isTrueExplicitly(flag);



---------------------------------------------------------------------
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