MTOM 请求/非 MTOM 响应
我们有一个非常简单的 WS,使用注释实现。我们希望能够从支持 MTOM/XOP 和不支持 MTOM/XOP 的客户端调用此函数。 现在,它被简单地注释为@MTOM。
它接受包含(其中包括)base64Binary 元素的请求,并提供包含单个布尔元素的响应。
调用它是没有问题的,无论是在没有 MTOM 的情况下 - 它都可以工作。只是,响应即使不包含任何 MTOM:able 元素,也具有声明其为 MTOM 消息的标头,这会阻塞非 MTOM 客户端。
<tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tran:user-header name="X-Powered-By" value="Servlet/2.5 JSP/2.1"/>
<http:Content-Type>
multipart/related;start="<rootpart*[email protected]>";type="application/xop+xml";boundary="uuid:c3e56707-113c-47f9-b02c-2a3234766dc4";start-info="text/xml"
</http:Content-Type>
<http:Date>Tue, 11 May 2010 07:27:51 GMT</http:Date>
<http:Transfer-Encoding>chunked</http:Transfer-Encoding>
</tran:headers>
有谁知道如何让服务始终以非 MTOM 响应进行响应,同时仍然接受 MTOM 和非 MTOM 请求?
该服务在 WebLogic 10.3 服务器上运行...
亲切的问候, 拉尔斯
We have a pretty simple WS, implemented using annotations. We would like to be able to call this from clients both supporting MTOM/XOP and not.
Right now, it is annotated simply @MTOM.
It takes a request containing (amongst others) a base64Binary element, and serves a response containing a single boolean element.
Calling it is no problem, either with our without MTOM - it works. Only, the response, even though it doesn't contain any MTOM:able elements has headers declaring it a MTOM message, which chokes the non-MTOM client.
<tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tran:user-header name="X-Powered-By" value="Servlet/2.5 JSP/2.1"/>
<http:Content-Type>
multipart/related;start="<rootpart*[email protected]>";type="application/xop+xml";boundary="uuid:c3e56707-113c-47f9-b02c-2a3234766dc4";start-info="text/xml"
</http:Content-Type>
<http:Date>Tue, 11 May 2010 07:27:51 GMT</http:Date>
<http:Transfer-Encoding>chunked</http:Transfer-Encoding>
</tran:headers>
Does anyone know how to get the service to always respond with a non-MTOM response while still accepting both MTOM and non-MTOM requests?
The service runs on a WebLogic 10.3 server...
Kind regards,
Lars
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,我发现奇怪的是,如果我不放置
@MTOM
,结果消息永远不会返回多部分消息。但是,Web 服务仍然接受 WebSphere 中的 MTOM 数据。Actually what I found odd was if I don't put an
@MTOM
the resulting message never returns a mutli-part message. However, the web service still accepts the MTOM data in WebSphere.