This is an automated email from the ASF dual-hosted git repository. billblough pushed a commit to branch 1_5 in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit a41bfca7ba683c6944f9b92fe75a97d450ca534e Author: Andreas Veithen <veit...@apache.org> AuthorDate: Tue Mar 13 21:33:29 2012 +0000 Merged r1300358 to the 1.5 branch. --- .../src/org/apache/axis2/saaj/MessageFactoryImpl.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/saaj/src/org/apache/axis2/saaj/MessageFactoryImpl.java b/modules/saaj/src/org/apache/axis2/saaj/MessageFactoryImpl.java index 19365a8..6722ca0 100644 --- a/modules/saaj/src/org/apache/axis2/saaj/MessageFactoryImpl.java +++ b/modules/saaj/src/org/apache/axis2/saaj/MessageFactoryImpl.java @@ -96,21 +96,20 @@ public class MessageFactoryImpl extends MessageFactory { * protocol of this MessageFactory instance is DYNAMIC_SOAP_PROTOCOL */ public SOAPMessage createMessage() throws SOAPException { - SOAPEnvelopeImpl soapEnvelope; + org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl soapEnvelope; if (soapVersion.equals(SOAPConstants.SOAP_1_2_PROTOCOL)) { - soapEnvelope = - new SOAPEnvelopeImpl((org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl) - new SOAP12Factory().getDefaultEnvelope()); + soapEnvelope = (org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl) + new SOAP12Factory().getDefaultEnvelope(); } else if (soapVersion.equals(SOAPConstants.DYNAMIC_SOAP_PROTOCOL)) { throw new UnsupportedOperationException("createMessage() is not supported for " + "DYNAMIC_SOAP_PROTOCOL"); } else { //SOAP 1.1 - soapEnvelope = - new SOAPEnvelopeImpl((org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl) - new SOAP11Factory().getDefaultEnvelope()); + soapEnvelope = (org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl) + new SOAP11Factory().getDefaultEnvelope(); } - SOAPMessageImpl soapMessage = new SOAPMessageImpl(soapEnvelope); + soapEnvelope.getOwnerDocument().appendChild(soapEnvelope); + SOAPMessageImpl soapMessage = new SOAPMessageImpl(new SOAPEnvelopeImpl(soapEnvelope)); soapMessage.setSaveRequired(); return soapMessage; }