【发布时间】:2013-07-31 00:14:25
【问题描述】:
我正在尝试使用@attachment http 属性
我在一个这样调用的流程中有一个名为 validate 的 devkit 方法
<http:connector name="httpConnector" doc:name="HTTP\HTTPS">
<service-overrides
messageFactory="org.mule.transport.http.HttpMultipartMuleMessageFactory" />
</http:connector>
<flow name="AttachmentTestFlow1" doc:name="AttachmentTestFlow1">
<http:inbound-endpoint connector-ref="httpConnector" doc:name="HTTP" exchange-pattern="request-response" host="localhost" port="8100"/>
<Foo:validate config-ref="TestMessageSizeHappy" />
</flow>
在 Devkit 中:
@Processor
public Object validate(@Payload InputStream in
,@InboundAttachments("*") Map<String, DataHandler> inboundAttachments
,@OutboundAttachments Map<String, DataHandler> outboundAttachments
) {
但是在运行我的 mule 应用程序时会抛出此错误:
错误 2013-07-30 09:06:39,225 [主要] org.mule.module.launcher.application.DefaultMuleApplication:空 org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: 的内容 元素“xmlthreatprotection:validate”不完整。之一 '{"http://www.mulesoft.org/schema/mule/core":注解, "http://www.mulesoft.org/schema/mule/xmlthreatprotection":inbound-attachments}' 是期待。在 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(未知 来源)
在我看来,mule 希望附件以某种方式作为属性放入! 当我删除 @attachment 的东西时,我在运行时不会出错。
【问题讨论】: