Disable MTOM on SOAP WS response
up vote
0
down vote
favorite
I have a soap web service, developed in java, which returns a file inside a tag of the XML response. The tag is set to type="xsd:base64Binary". The same software is deployed to two different servers, one running a JBoss AS 7.1.1 and one running a JBoss EAP 7.0.0.
Inspecting the response (eg. with Soap UI), the AS returns a Base64 encode of the file, directly inside the tag:
<originalDocument>JVBERi0xLj...</originalDocument>
The EAP returns a binary file, with a reference inside the tag (MTOM):
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
....
<originalDocument>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org"/>
</originalDocument>
....
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org>
%PDF-1.4
...
Is this a configuration of the JBoss? Or maybe an Apache configuration? How can I force the AS to use Base64 encode?
Please note that I'm referring to the response of the endpoint, and not the request from client.
And please note also that the software is the same. I'd like to have a server configuration, not a software change.
Thank you.
soap jboss response mtom
add a comment |
up vote
0
down vote
favorite
I have a soap web service, developed in java, which returns a file inside a tag of the XML response. The tag is set to type="xsd:base64Binary". The same software is deployed to two different servers, one running a JBoss AS 7.1.1 and one running a JBoss EAP 7.0.0.
Inspecting the response (eg. with Soap UI), the AS returns a Base64 encode of the file, directly inside the tag:
<originalDocument>JVBERi0xLj...</originalDocument>
The EAP returns a binary file, with a reference inside the tag (MTOM):
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
....
<originalDocument>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org"/>
</originalDocument>
....
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org>
%PDF-1.4
...
Is this a configuration of the JBoss? Or maybe an Apache configuration? How can I force the AS to use Base64 encode?
Please note that I'm referring to the response of the endpoint, and not the request from client.
And please note also that the software is the same. I'd like to have a server configuration, not a software change.
Thank you.
soap jboss response mtom
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a soap web service, developed in java, which returns a file inside a tag of the XML response. The tag is set to type="xsd:base64Binary". The same software is deployed to two different servers, one running a JBoss AS 7.1.1 and one running a JBoss EAP 7.0.0.
Inspecting the response (eg. with Soap UI), the AS returns a Base64 encode of the file, directly inside the tag:
<originalDocument>JVBERi0xLj...</originalDocument>
The EAP returns a binary file, with a reference inside the tag (MTOM):
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
....
<originalDocument>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org"/>
</originalDocument>
....
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org>
%PDF-1.4
...
Is this a configuration of the JBoss? Or maybe an Apache configuration? How can I force the AS to use Base64 encode?
Please note that I'm referring to the response of the endpoint, and not the request from client.
And please note also that the software is the same. I'd like to have a server configuration, not a software change.
Thank you.
soap jboss response mtom
I have a soap web service, developed in java, which returns a file inside a tag of the XML response. The tag is set to type="xsd:base64Binary". The same software is deployed to two different servers, one running a JBoss AS 7.1.1 and one running a JBoss EAP 7.0.0.
Inspecting the response (eg. with Soap UI), the AS returns a Base64 encode of the file, directly inside the tag:
<originalDocument>JVBERi0xLj...</originalDocument>
The EAP returns a binary file, with a reference inside the tag (MTOM):
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
....
<originalDocument>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org"/>
</originalDocument>
....
--uuid:6ec7448a-58a6-4045-9faf-2b8469edf8b5
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <84d45c72-2b46-4d8c-9a4d-8bcc0c9206b5-13@cxf.apache.org>
%PDF-1.4
...
Is this a configuration of the JBoss? Or maybe an Apache configuration? How can I force the AS to use Base64 encode?
Please note that I'm referring to the response of the endpoint, and not the request from client.
And please note also that the software is the same. I'd like to have a server configuration, not a software change.
Thank you.
soap jboss response mtom
soap jboss response mtom
asked Nov 22 at 16:44
Sebastian Ikaros Rizzo
14611
14611
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
I found a solution that works for me. Annotation the corresponding fields in my response type with @XmlInlineBinaryData forces the response to be inline:
public class MyResponseType {
@XmlElement(required = true)
protected String systemLink;
protected Long fileSize;
@XmlInlineBinaryData
protected byte md5Hash;
My response now looks like that:
<ns3:MyResponse>
<systemLink>system://40278824</systemLink>
<fileSize>3537</fileSize>
<md5Hash>oY6Mq54Zgo76VYtxHeVH6w==</md5Hash>
....
New contributor
add a comment |
up vote
0
down vote
accepted
My solution was to remove xmime:expectedContentTypes="application/octet-stream"
from the XSD node, and to remove the @MTOM
annotation. This way the output is always base64. I still did not understand why on the old application server the output was base64, even with @MTOM annotation.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435281%2fdisable-mtom-on-soap-ws-response%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I found a solution that works for me. Annotation the corresponding fields in my response type with @XmlInlineBinaryData forces the response to be inline:
public class MyResponseType {
@XmlElement(required = true)
protected String systemLink;
protected Long fileSize;
@XmlInlineBinaryData
protected byte md5Hash;
My response now looks like that:
<ns3:MyResponse>
<systemLink>system://40278824</systemLink>
<fileSize>3537</fileSize>
<md5Hash>oY6Mq54Zgo76VYtxHeVH6w==</md5Hash>
....
New contributor
add a comment |
up vote
1
down vote
I found a solution that works for me. Annotation the corresponding fields in my response type with @XmlInlineBinaryData forces the response to be inline:
public class MyResponseType {
@XmlElement(required = true)
protected String systemLink;
protected Long fileSize;
@XmlInlineBinaryData
protected byte md5Hash;
My response now looks like that:
<ns3:MyResponse>
<systemLink>system://40278824</systemLink>
<fileSize>3537</fileSize>
<md5Hash>oY6Mq54Zgo76VYtxHeVH6w==</md5Hash>
....
New contributor
add a comment |
up vote
1
down vote
up vote
1
down vote
I found a solution that works for me. Annotation the corresponding fields in my response type with @XmlInlineBinaryData forces the response to be inline:
public class MyResponseType {
@XmlElement(required = true)
protected String systemLink;
protected Long fileSize;
@XmlInlineBinaryData
protected byte md5Hash;
My response now looks like that:
<ns3:MyResponse>
<systemLink>system://40278824</systemLink>
<fileSize>3537</fileSize>
<md5Hash>oY6Mq54Zgo76VYtxHeVH6w==</md5Hash>
....
New contributor
I found a solution that works for me. Annotation the corresponding fields in my response type with @XmlInlineBinaryData forces the response to be inline:
public class MyResponseType {
@XmlElement(required = true)
protected String systemLink;
protected Long fileSize;
@XmlInlineBinaryData
protected byte md5Hash;
My response now looks like that:
<ns3:MyResponse>
<systemLink>system://40278824</systemLink>
<fileSize>3537</fileSize>
<md5Hash>oY6Mq54Zgo76VYtxHeVH6w==</md5Hash>
....
New contributor
edited 2 days ago
desertnaut
16k63465
16k63465
New contributor
answered Dec 10 at 7:54
Benjamin K.
113
113
New contributor
New contributor
add a comment |
add a comment |
up vote
0
down vote
accepted
My solution was to remove xmime:expectedContentTypes="application/octet-stream"
from the XSD node, and to remove the @MTOM
annotation. This way the output is always base64. I still did not understand why on the old application server the output was base64, even with @MTOM annotation.
add a comment |
up vote
0
down vote
accepted
My solution was to remove xmime:expectedContentTypes="application/octet-stream"
from the XSD node, and to remove the @MTOM
annotation. This way the output is always base64. I still did not understand why on the old application server the output was base64, even with @MTOM annotation.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
My solution was to remove xmime:expectedContentTypes="application/octet-stream"
from the XSD node, and to remove the @MTOM
annotation. This way the output is always base64. I still did not understand why on the old application server the output was base64, even with @MTOM annotation.
My solution was to remove xmime:expectedContentTypes="application/octet-stream"
from the XSD node, and to remove the @MTOM
annotation. This way the output is always base64. I still did not understand why on the old application server the output was base64, even with @MTOM annotation.
answered 21 hours ago
Sebastian Ikaros Rizzo
14611
14611
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435281%2fdisable-mtom-on-soap-ws-response%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown