[
https://issues.apache.org/jira/browse/WSCOMMONS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rich Scheuerle reopened WSCOMMONS-154:
--------------------------------------
A similar change is needed in the Axis2 Builder code.
Here is the suggested change from Gordon Kuo ...see the <----- lines
public static StAXBuilder getAttachmentsBuilder(MessageContext msgContext,
InputStream inStream, String contentTypeString, boolean
isSOAP)
throws OMException, XMLStreamException,
FactoryConfigurationError {
StAXBuilder builder = null;
XMLStreamReader streamReader;
Attachments attachments = createAttachment(msgContext, inStream,
contentTypeString);
String charSetEncoding =
getCharSetEncoding(attachments.getSOAPPartContentType());
if ((charSetEncoding == null)
|| "null".equalsIgnoreCase(charSetEncoding)) {
charSetEncoding = MessageContext.UTF_8;
}
msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
charSetEncoding);
try {
streamReader =
StAXUtils.createXMLStreamReader(getReader(
attachments.getSOAPPartInputStream(),
charSetEncoding));
} catch (IOException e) {
throw new XMLStreamException(e);
}
// Put a reference to Attachments Map in to the message
context For
// backword compatibility with Axis2 1.0
msgContext.setProperty(MTOMConstants.ATTACHMENTS, attachments);
// Setting the Attachments map to new SwA API
msgContext.setAttachmentMap(attachments);
String soapEnvelopeNamespaceURI =
getEnvelopeNamespace(contentTypeString);
if (isSOAP) {
if (attachments.getAttachmentSpecType().equals(
MTOMConstants.MTOM_TYPE)) {
//Creates the MTOM specific
MTOMStAXSOAPModelBuilder
builder = new
MTOMStAXSOAPModelBuilder(streamReader,
attachments,
soapEnvelopeNamespaceURI);
msgContext.setDoingMTOM(true);
} else if (attachments.getAttachmentSpecType().equals(
MTOMConstants.SWA_TYPE)) {
builder = new StAXSOAPModelBuilder(streamReader,
soapEnvelopeNamespaceURI);
--> } else if (attachments.getAttachmentSpecType().equals(
--> MTOMConstants.SWA_TYPE_12) ) {
--> builder = new StAXSOAPModelBuilder(streamReader,
--> soapEnvelopeNamespaceURI);
---> }
}
// To handle REST XOP case
else {
if (attachments.getAttachmentSpecType().equals(
MTOMConstants.MTOM_TYPE)) {
XOPAwareStAXOMBuilder stAXOMBuilder = new
XOPAwareStAXOMBuilder(
streamReader, attachments);
builder = stAXOMBuilder;
} else if (attachments.getAttachmentSpecType().equals(
MTOMConstants.SWA_TYPE)) {
builder = new StAXOMBuilder(streamReader);
--> } else if (attachments.getAttachmentSpecType().equals(
--> MTOMConstants.SWA_TYPE_12) ) {
--> builder = new StAXOMBuilder(streamReader);
--> }
}
return builder;
}
> A SOAP 1.2 SWARef Message is denied
> -----------------------------------
>
> Key: WSCOMMONS-154
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-154
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assigned To: Rich Scheuerle
> Attachments: patch.txt
>
>
> A SOAP 1.2 Message with a SWARef attachment is denied.
> I have a patch to accept the SOAP 1.2 content-type "application/soap+xml"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]