0
我有如下簡單的流程。當我們點擊一個流程時,它會觸發另一個流程並獲取http.status 302和Location,這意味着它必須重定向到Location頭域中的位置。但它是拋出異常。我越來越mule 3.5遵循出站端點的重定向
<flow name="httpconnectorFlowRedirection">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="9876" path="redirect" connector-ref="NoSessionEncodingConnector" doc:name="HTTP"/>
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="9876" method="POST" doc:name="HTTP" path="temp" connector-ref="NoSessionEncodingConnector" contentType="text/plain"
followRedirects="true" />
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
<flow name="temp_flow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="9876" path="temp" connector-ref="NoSessionEncodingConnector" doc:name="HTTP" />
<logger message="in temp flow" level="INFO" doc:name="Logger"/>
<set-property propertyName="http.status" value="307" doc:name="Property" />
<set-property propertyName="Location" value="http://localhost:9876/samplehttp" doc:name="Property" />
</flow>
錯誤如下
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:9876/temp, connector=HttpConnector
{
name=NoSessionEncodingConnector
lifecycle=start
this=14c5f0c
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[http]
serviceOverrides=
session.handler=org.mule.session.NullSessionHandler
}
, name='endpoint.http.localhost.9876.temp', mep=REQUEST_RESPONSE, properties={exceptionOnMessageError=true, http.method=POST, followRedirects=true, Content-Type=text/plain}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Type : org.mule.api.transport.DispatchException
Code : MULE_ERROR--2
JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/Dispat chException.html
Payload : [email protected]
********************************************************************************
我收到此錯誤,只有當後續
我使用的騾子3.5重定向設置爲true出站端點。