非mtom请求/ mtom响应(无法获取mtom附件)

时间:2016-01-18 15:55:13

标签: wcf mtom

我是Mtom话题的新手。当我的请求是字符串时,我尝试构建一个带有附件的Mtom消息。我用SOAPUI测试它,但resnpose不是Mtom格式,就像内联消息:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetMaintenanceProtocolPdfAttachmentResponse  xmlns="http://schemafileaddress">
<GetMaintenanceProtocolPdfAttachmentResult>
</GetMaintenanceProtocolPdfAttachmentResponse>
</s:Body>
<a:Titles>MAI_PRINT_164341883_1.pdf</a:Titles>
<a:file>JVBERi0xLjQNCiXi48/TDQoxIDAg</a:file>
</s:Envelope>

SOAPUI响应的原始视图如下:

TTP/1.1 200 OK
Cache-Control: private
Content-Length: 1265591
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=435hj33ut2nusjpt1rjtrg5c; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 19 Jan 2016 10:26:06 GMT


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetMaintenanceProtocolPdfAttachmentResponse xmlns="http://schemaAddres">
<GetMaintenanceProtocolPdfAttachmentResult  xmlns:a="http://schemaAddres" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Titles>MAI_PRINT_112605460_1.pdf</a:Titles>
<a:file>JVBERi0xLjQNCiXi48</a:file>

我尝试ObjectOutputStream但无法获得所需的结果。如果有人能帮我解决问题,我将不胜感激。

0 个答案:

没有答案