src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 48,63 ****
boolean acceptFastInfoset) throws SOAPException
{
return new Message1_2Impl(isFastInfoset, acceptFastInfoset);
}
! public SOAPMessage createMessage(MimeHeaders headers, InputStream in)
! throws IOException, SOAPExceptionImpl {
! if ((headers == null) || (getContentType(headers) == null)) {
headers = new MimeHeaders();
headers.setHeader("Content-Type", SOAPConstants.SOAP_1_2_CONTENT_TYPE);
}
MessageImpl msg = new Message1_2Impl(headers, in);
msg.setLazyAttachments(lazyAttachments);
return msg;
}
}
--- 48,67 ----
boolean acceptFastInfoset) throws SOAPException
{
return new Message1_2Impl(isFastInfoset, acceptFastInfoset);
}
! public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPExceptionImpl {
!
! if (headers == null) {
headers = new MimeHeaders();
+ }
+
+ if (getContentType(headers) == null) {
headers.setHeader("Content-Type", SOAPConstants.SOAP_1_2_CONTENT_TYPE);
}
+
MessageImpl msg = new Message1_2Impl(headers, in);
msg.setLazyAttachments(lazyAttachments);
return msg;
}
}