axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils resources.properties
Date Thu, 14 Mar 2002 17:26:26 GMT
glyn        02/03/14 09:26:26

  Modified:    java/src/org/apache/axis/message MessageElement.java
                        SOAPHeader.java
               java/src/org/apache/axis/utils resources.properties
  Log:
  Improve constructor signatures and improve policing in setObjectValue.
  
  Revision  Changes    Path
  1.85      +14 -3     xml-axis/java/src/org/apache/axis/message/MessageElement.java
  
  Index: MessageElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- MessageElement.java	14 Mar 2002 17:01:13 -0000	1.84
  +++ MessageElement.java	14 Mar 2002 17:26:26 -0000	1.85
  @@ -145,6 +145,12 @@
           name = localPart;
       }
   
  +    MessageElement(String namespace, String localPart, Object value)
  +    {
  +        this(namespace, localPart);
  +        objectValue = value;
  +    }
  +
       MessageElement(Element elem)
       {
           elementRep = elem;
  @@ -409,13 +415,18 @@
        * A serializer needs to be registered for this object class for proper
        * operation.
        * <p>
  -     * Note that this method will log and error and no-op if there are
  -     * any children in the MessageElement.
  +     * Note that this method will log an error and no-op if there are
  +     * any children in the MessageElement or if the MessageElement was
  +     * constructed from XML.
        * @param newValue node's value or null.
        */
       public void setObjectValue(Object newValue){
  -        if (children != null) {
  +        if (children != null && !children.isEmpty()) {
               log.error(JavaUtils.getMessage("childPresent"));
  +            return;
  +        }
  +        if (elementRep != null) {
  +            log.error(JavaUtils.getMessage("xmlPresent"));
               return;
           }
           this.objectValue = newValue;
  
  
  
  1.35      +3 -5      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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- SOAPHeader.java	14 Mar 2002 17:01:13 -0000	1.34
  +++ SOAPHeader.java	14 Mar 2002 17:26:26 -0000	1.35
  @@ -76,19 +76,17 @@
       protected boolean   mustUnderstand = false;
   
       public SOAPHeader() {
  +        super();
       }
   
       public SOAPHeader(String namespace, String localPart)
       {
  -        setNamespaceURI(namespace);
  -        setName(localPart);
  +        super(namespace, localPart);
       }
   
       public SOAPHeader(String namespace, String localPart, Object value)
       {
  -        setNamespaceURI(namespace);
  -        setName(localPart);
  -        setObjectValue(value);
  +        super(namespace, localPart, value);
       }
   
       public SOAPHeader(Element elem)
  
  
  
  1.70      +3 -1      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- resources.properties	14 Mar 2002 17:01:13 -0000	1.69
  +++ resources.properties	14 Mar 2002 17:26:26 -0000	1.70
  @@ -695,4 +695,6 @@
   
   timedOut=WSDL2Java emitter timed out (this often means the WSDL at the specified URL is
inaccessible)!
   
  -valuePresent=MessageElement.addChild called when an object value is present
  \ No newline at end of file
  +valuePresent=MessageElement.addChild called when an object value is present
  +
  +xmlPresent=MessageElement.setObjectValue called on an instance which was constructed using
XML
  
  
  

Mime
View raw message