[ 
https://issues.apache.org/jira/browse/AXIS2-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030587#comment-13030587
 ] 

Ivan edited comment on AXIS2-5001 at 5/9/11 2:48 AM:
-----------------------------------------------------

I also checked all SAAJ, JAX-WS and even SOAP spec in the past, and did not 
find any word about requiring an empty header in the SOAP message
One of the case is that, it uses a handler to check whether no addressing 
related elements in the response message if addressing feature is disabled. In 
the validation codes, I saw there is a try-catch block for the SOAPException, 
seems that TCK case allow that exception while getSOAPHeader() is called. 
Generally speaking, to make those cases pass, one way is to make the Axis2 SAAJ 
complies with the SAAJ spec and throw SOAPException if no header exists in the 
message. Or, always added an empty header for the SOAP message,and leave the 
current behavior there, which is to return null if no header exists in the 
message (That is what RI does now, I think). Personally, the first way is bette 
on the condition of no empty header required for the SOAP message in any spec.
If any further information is required, please comment it freely. Thanks.


      was (Author: xuhaihong):
    I also checked all SAAJ, JAX-WS and even SOAP spec in the past, and did not 
find any word about requiring an empty header in the SOAP message
One of the case is that, it uses a handler to check whether non-addressing 
related elements in the response message if addressing feature is disabled. In 
the validation codes, I saw there is a try-catch block for the SOAPException, 
seems that TCK case allow that exception while getSOAPHeader() is called. 
Generally speaking, to make those cases pass, one way is to make the Axis2 SAAJ 
complies with the SAAJ spec and throw SOAPException if no header exists in the 
message. Or, always added an empty header for the SOAP message,and leave the 
current behavior there, which means to return null if no header exists in the 
message (That is what RI does now, I think). Personally, the first way is 
better, based on the condition, which no empty header is required for the SOAP 
message.
If any further information is required, please comment it freely. Thanks.

  
> SOAPMessage.getSOAPHeaders() return null while no headers in the soap envelope
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-5001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5001
>             Project: Axis2
>          Issue Type: Bug
>          Components: saaj
>    Affects Versions: 1.5.4
>            Reporter: Ivan
>
> Per Java doc, SOAPMessage.getSOAPHeaders() should throw SOAPException while 
> no header exists in the soap message, while it returns null in current 
> axis2-saaj implementation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to