Discussion:
[jira] [Created] (AXIS2-5931) AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
Ralf Hauser (JIRA)
2018-09-11 14:42:00 UTC
Permalink
Ralf Hauser created AXIS2-5931:
----------------------------------

Summary: AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser


We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get

 

<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>

 

The third party server side is unchanged.

MTOM is not globally activated on the client-side, but we use

 

            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);

With 2-1.6.2. this was always set.

 

The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.

 

Adding:

myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");

 

doesn't help either.

 

Please document in

[MTOMBuilder|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder]{color:#000000}.processDocument({color}[InputStream|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82InputStream]{color:#000000} inputStream, {color}[String|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82String]{color:#000000}contentType, {color}[MessageContext|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82MessageContext]{color:#000000} messageContext)  {color}

that always throws this exception, how this can be avoided to ensure backward compatibility

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Ralf Hauser (JIRA)
2018-09-11 14:46:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Hauser updated AXIS2-5931:
-------------------------------
Description:
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get

 

<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>

 

The third party server side is unchanged.

MTOM is not globally activated on the client-side, but we use

 

            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);

With 2-1.6.2. this was always set.

 

The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.

 

Adding:

myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");

 

doesn't help either.

 

Please document in

MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault

that always throws this exception, how this can be avoided to ensure backward compatibility

 

was:
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get

 

<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>

 

The third party server side is unchanged.

MTOM is not globally activated on the client-side, but we use

 

            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);

With 2-1.6.2. this was always set.

 

The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.

 

Adding:

myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");

 

doesn't help either.

 

Please document in

[MTOMBuilder|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder]{color:#000000}.processDocument({color}[InputStream|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82InputStream]{color:#000000} inputStream, {color}[String|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82String]{color:#000000}contentType, {color}[MessageContext|eclipse-javadoc:%E2%98%82=%20/%3C%7BMTOMBuilder.java%E2%98%83MTOMBuilder~processDocument~QInputStream;~QString;~QMessageContext;%E2%98%82MessageContext]{color:#000000} messageContext)  {color}

that always throws this exception, how this can be avoided to ensure backward compatibility

 
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Ralf Hauser (JIRA)
2018-09-12 06:46:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16611675#comment-16611675 ]

Ralf Hauser commented on AXIS2-5931:
------------------------------------

Also, since MTOMBuilder.processDocument() is obviously not meant to be called often, I suggest

2) Read the first few KB of the InputStream such that in case of a server-side mis-configuration, at least the client programmer with putting a breakpoint before the "throw" clause can see what the server really sends

 

 
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Andreas Veithen (JIRA)
2018-09-14 20:56:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16615377#comment-16615377 ]

Andreas Veithen commented on AXIS2-5931:
----------------------------------------

Am I understanding this correctly: the server is actually returning a message that doesn't conform to SOAP or any related standard?
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Ralf Hauser (JIRA)
2018-09-15 06:07:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16615614#comment-16615614 ]

Ralf Hauser commented on AXIS2-5931:
------------------------------------

@ [~veithen] : Your hypothesis is most likely right - it is even imaginable that the imputstream is of size=0 altogether.

But I don't really know since exception is thrown before the inputStream is (partially) consumed
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Ralf Hauser (JIRA)
2018-09-25 13:37:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16627372#comment-16627372 ]

Ralf Hauser commented on AXIS2-5931:
------------------------------------

seems that the server is not compliant with

[https://wiki.apache.org/ws/FrontPage/Axis2/MTOM]

adding

serviceClient.getAxisConfiguration().addMessageBuilder("application/xop+xml", new SOAPBuilder());

seems to solve the problem (probably quite quick&dirty, but somehow as Axis2-1.6.2 did it

 
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org
Ralf Hauser (JIRA)
2018-09-25 13:38:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/AXIS2-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16627372#comment-16627372 ]

Ralf Hauser edited comment on AXIS2-5931 at 9/25/18 1:37 PM:
-------------------------------------------------------------

seems that the server is not compliant with

[https://wiki.apache.org/ws/FrontPage/Axis2/MTOM]

adding

serviceClient.getAxisConfiguration().addMessageBuilder("application/xop+xml", new SOAPBuilder());

seems to solve the problem (probably quite quick&dirty, but somehow as Axis2-1.6.2 did it before)

 


was (Author: ***@acm.org):
seems that the server is not compliant with

[https://wiki.apache.org/ws/FrontPage/Axis2/MTOM]

adding

serviceClient.getAxisConfiguration().addMessageBuilder("application/xop+xml", new SOAPBuilder());

seems to solve the problem (probably quite quick&dirty, but somehow as Axis2-1.6.2 did it

 
Post by Ralf Hauser (JIRA)
AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
------------------------------------------------------------------------------------------------------
Key: AXIS2-5931
URL: https://issues.apache.org/jira/browse/AXIS2-5931
Project: Axis2
Issue Type: Improvement
Components: transports
Affects Versions: 1.7.8
Reporter: Ralf Hauser
Priority: Major
We are just about to upgrade our axis client from v1.6.2 to v1.7.8 ,but we get
 
<<org.apache.axis2.AxisFault: A message with content type application/xop+xml can only appear in a MIME multipart message
    at org.apache.axis2.builder.MTOMBuilder.processDocument(MTOMBuilder.java:40)
    at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)>>
 
The third party server side is unchanged.
MTOM is not globally activated on the client-side, but we use
 
            options.setProperty(
                    org.apache.axis2.Constants.Configuration.ENABLE_MTOM,
                    org.apache.axis2.Constants.VALUE_TRUE);
With 2-1.6.2. this was always set.
 
The server offers multiple stubs and even on stubs that do not need MTOM if omit setting ENABLE_MTOM, this happens.
 
myConfigContext.getAxisConfiguration().addParameter(org.apache.axis2.Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER, "true");
 
doesn't help either.
 
Please document in
MTOMBuilder.processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault
that always throws this exception, how this can be avoided to ensure backward compatibility
 
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-***@axis.apache.org
For additional commands, e-mail: java-dev-***@axis.apache.org

Loading...