我需要通过 HTTP POST 传输 XML 文件。可以配置 Mule 来执行此操作。我一直在尝试使用简单的入站文件 --> 出站 HTTP,但它不起作用。有没有人有这方面的经验?
<flow name="rpg_uploadFlow1" doc:name="rpg_uploadFlow1">
<file:inbound-endpoint path="C:\Users\Claes\Documents\CD-utveckling\paper-rpg\OUT" moveToDirectory="C:\Users\Claes\Documents\CD-utveckling\paper-rpg\sent" responseTimeout="10000" mimeType="text/xml" doc:name="File"/>
<http:outbound-endpoint exchange-pattern="one-way" host="http://XXXXXXXXXXX.ashx?SystemName=XXXX&UserName=XXXX&PassWord=XXXXX" port="80" disableTransportTransformer="true" doc:name="HTTP"/>
</flow>
错误;
ERROR 2013-05-17 17:24:49,208 [[rpg_upload].connector.http.mule.default.dispatcher.07] org.mule.exception.DefaultMessagingExceptionStrategy:
Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://http://xxxxxxxxxxxxxxxx/rpgtest/service.ashx? SystemName=xxxxxxxxxxxxxxxxx&UserName=xxxxxxxxxxxxxxx&PassWord=xxxxxxx, connector=HttpConnector
{
name=connector.http.mule.default
lifecycle=start
this=18b44ce0
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[http]
serviceOverrides=<none>
}
, name='endpoint.http.http.xxxxxxxxxxxxxxxx.service.ashx.SystemName.xxxxx.UserName.xxxxx.Pass Word.836749.80', mep=ONE_WAY, properties={PassWord=836749:80, SystemName=xxxxxx, UserName=xxxxxxxxx}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=true}. Message payload is of type: ReceiverFileInputStream
Code : MULE_ERROR-42999
--------------------------------------------------------------------------------
Exception stack is:
1. http (java.net.UnknownHostException)
java.net.AbstractPlainSocketImpl:-1 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://http://xxxxxxxxxx.ashx? SystemName=xxxxxxxxxxxx&UserName=xxxxxx&PassWord=836749:80, connector=HttpConnector
{
name=connector.http.mule.default
lifecycle=start
this=18b44ce0
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[http]
serviceOverrides=<none>
}
, name='endpoint.http.http.xxxx.ashx.SystemName.xxxxxxxx.UserName.xxxxx.PassWord.836749.80', mep=ONE_WAY, properties={PassWord=836749:80, SystemName=xxxxxxxxxx, UserName=xxxx}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=true}. Message payload is of type: ReceiverFileInputStream (org.mule.api.transport.DispatchException)
org.mule.transport.http.HttpClientMessageDispatcher:155 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchExceptio n.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.UnknownHostException: http
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)