如何在 WSO2 ESB 中接收 HTML 附件

How to receive an HTML attachment in WSO2 ESB

我需要从 WSO2 ESB 调用 jasperreports 服务器来生成 PDF。 Jasperserver 的 REST API 将其作为 HTTP 响应中的附件发回。

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: private
Expires: Thu, 01 Jan 1970 01:00:00 CET
P3P: CP="ALL"
Content-Disposition: attachment; filename="Report.pdf"
output-final: true
Content-Type: application/pdf
Content-Length: 12060
Date: Tue, 22 Sep 2015 15:22:50 GMT

%PDF-1.4

WSO2 ESB 无法解析这个 - 我怎样才能让它工作,以便我可以处理生成的 PDF?

ESB 错误:

TID: [0] [ESB] [2015-09-22 17:13:16,326] ERROR {org.apache.synapse.transport.passthru.util.RelayUtils} 
-  Error while building Passthrough stream {org.apache.synapse.transport.passthru.util.RelayUtils} 
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.

您是否尝试配置二进制继电器? 也许下面的link可以帮到你:docs.wso2.com/display/ESB481/Configuring+Message+Relay