[ https://issues.apache.org/jira/browse/WSCOMMONS-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844662#action_12844662 ]
Andreas Veithen commented on WSCOMMONS-526: ------------------------------------------- Martin, Can you produce a test case that provides evidence for this issue? > SOAPEnvelope toString() behavior inconsistant dependent on content > ------------------------------------------------------------------ > > Key: WSCOMMONS-526 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-526 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Affects Versions: Axiom 1.2.8 > Environment: llom, Java 5, Windows > Reporter: Martin > Priority: Minor > > Using llom 12, SOAPEnvelope.toString() works on empty SOAPEnvelope, > SOAPEnvelope's with a SOAPBody, SOAPEnvelope's with a SOAPheader and > SoapBofy, but fails on SOAPEnvelope's with only a SOAPHEader with an > exception. This behavior is inconsistent. > Should toString validate the envelope? Should an empty envelope also throw an > error? > IMO, the envelope should be serializable with the header only. > The exception: > Exception in thread "1" org.apache.axiom.om.OMException: SOAPEnvelope must > contain a body element which is either first or second child element of the > SOAPEnvelope. > at > org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.java:177) > at > org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:224) > at > org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:937) > at > org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:387) > at > org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:1106) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.