You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ji...@apache.org on 2004/04/06 10:02:43 UTC

[jira] Created: (AXIS-1286) Minor SOAPHeader/SOAPBody issues

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1286

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1286
    Summary: Minor SOAPHeader/SOAPBody issues
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: Axis
 Components: 
             Basic Architecture

   Assignee: 
   Reporter: Jarek Gawor

    Created: Tue, 6 Apr 2004 1:01 AM
    Updated: Tue, 6 Apr 2004 1:01 AM

Description:
1) 
In SOAPHeader:

    public SOAPElement addChildElement(SOAPElement element) 
      throws SOAPException
    {
      if (!(element instanceof javax.xml.soap.SOAPHeaderElement)) {
        throw new SOAPException(Messages.getMessage("badSOAPHeader00"));
      } 
      return super.addChildElement(element);
    }

"child.setEnvelope(getEnvelope());" is not set as in other addChildElement() methods. That causes the following error sometimes:

        {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
        at org.apache.axis.message.SOAPHeaderElement.outputImpl(SOAPHeaderElemen
t.java:224)
        at org.apache.axis.message.MessageElement.output(MessageElement.java:111

2) 

findElement() function is replicated in SOAPBody.java and SOAPHeader.java. So is removeChild(MessageElement) in SOAPBody, SOAPHeader and in MessageElement.java

3) 

The check:

 if (!(element instanceof javax.xml.soap.SOAPHeaderElement)) {
        throw new SOAPException(Messages.getMessage("badSOAPHeader00"));
      } 

in SOAPHeader.addChildElement(SOAPElement) should probably move to addChild(MessageElement). Otherwise ClassCastException might occur if addChild(MessageElement) is used. And the check should probably be for the Axis version of SOAPHeaderElement. 



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXIS-1286) Minor SOAPHeader/SOAPBody issues

Posted by ji...@apache.org.
Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Tue, 6 Apr 2004 8:03 AM

Fixed. (Except for the removeChild as it does different things in different classes)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1286

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1286
    Summary: Minor SOAPHeader/SOAPBody issues
       Type: Bug

     Status: Closed
   Priority: Minor
 Resolution: FIXED

    Project: Axis
 Components: 
             Basic Architecture

   Assignee: 
   Reporter: Jarek Gawor

    Created: Tue, 6 Apr 2004 1:01 AM
    Updated: Tue, 6 Apr 2004 8:03 AM

Description:
1) 
In SOAPHeader:

    public SOAPElement addChildElement(SOAPElement element) 
      throws SOAPException
    {
      if (!(element instanceof javax.xml.soap.SOAPHeaderElement)) {
        throw new SOAPException(Messages.getMessage("badSOAPHeader00"));
      } 
      return super.addChildElement(element);
    }

"child.setEnvelope(getEnvelope());" is not set as in other addChildElement() methods. That causes the following error sometimes:

        {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
        at org.apache.axis.message.SOAPHeaderElement.outputImpl(SOAPHeaderElemen
t.java:224)
        at org.apache.axis.message.MessageElement.output(MessageElement.java:111

2) 

findElement() function is replicated in SOAPBody.java and SOAPHeader.java. So is removeChild(MessageElement) in SOAPBody, SOAPHeader and in MessageElement.java

3) 

The check:

 if (!(element instanceof javax.xml.soap.SOAPHeaderElement)) {
        throw new SOAPException(Messages.getMessage("badSOAPHeader00"));
      } 

in SOAPHeader.addChildElement(SOAPElement) should probably move to addChild(MessageElement). Otherwise ClassCastException might occur if addChild(MessageElement) is used. And the check should probably be for the Axis version of SOAPHeaderElement. 



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira