axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/message SOAPHeader.java
Date Mon, 14 Jan 2002 19:45:06 GMT
gdaniels    02/01/14 11:45:06

  Modified:    java/src/org/apache/axis/message SOAPHeader.java
  Log:
  Fix logic for maintaining MustUnderstand attribute in sync with local value,
  and add logic to do the same for the actor attribute.
  
  Revision  Changes    Path
  1.30      +24 -3     xml-axis/java/src/org/apache/axis/message/SOAPHeader.java
  
  Index: SOAPHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPHeader.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- SOAPHeader.java	30 Oct 2001 14:19:29 -0000	1.29
  +++ SOAPHeader.java	14 Jan 2002 19:45:06 -0000	1.30
  @@ -127,18 +127,39 @@
               if (idx > -1) {
                   // Got it, so replace it's value.
                   attributes.setValue(idx, b ? "1" : "0");
  +                return;
               }
           } else {
               attributes = new AttributesImpl();
  -            addAttribute(Constants.URI_SOAP_ENV,
  -                         Constants.ATTR_MUST_UNDERSTAND,
  -                         b ? "1" : "0");
           }
  +        
  +        addAttribute(Constants.URI_SOAP_ENV,
  +                     Constants.ATTR_MUST_UNDERSTAND,
  +                     b ? "1" : "0");
       }
   
       public String getActor() { return( actor ); }
       public void setActor(String a) {
           actor = a ;
  +        if (attributes != null) {
  +            int idx = attributes.getIndex(Constants.URI_SOAP_ENV,
  +                                          Constants.ATTR_ACTOR);
  +            if (idx > -1) {
  +                // Got it, so replace it's value.
  +                if (a != null) {
  +                    attributes.setValue(idx, a);
  +                } else {
  +                    attributes.removeAttribute(idx);
  +                }
  +                return;
  +            }
  +        } else if (a != null) {
  +            attributes = new AttributesImpl();
  +        }
  +
  +        addAttribute(Constants.URI_SOAP_ENV,
  +                     Constants.ATTR_ACTOR,
  +                     a);
       }
   
       public void setProcessed(boolean value) {
  
  
  

Mime
View raw message