Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.2.8
-
None
-
None
-
llom, Java 5, Windows
Description
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)