Mule:连接到HTTPS站点并提取文件

时间:2014-12-03 17:07:24

标签: https mule

我正在尝试设置Quartz以启动处理,该处理将连接到HTTPS端点以从目录中提取文件。 HTTPS端点将尝试重定向以进行身份​​验证,因此我尝试为此进行设置。我有一个HTTPS连接器的自签名密钥库。

目前正在部署,但我不确定这是否是正确的方法,如果是,那么如何从端点提取文件。

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:json="http://www.mulesoft.org/schema/mule/json"
    xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
    xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:http="http://www.mulesoft.org/schema/mule/http"
    xmlns:file="http://www.mulesoft.org/schema/mule/file"
    xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd
http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd">
    <quartz:connector name="myConnector" validateConnections="true" doc:name="Quartz">
        <receiver-threading-profile maxThreadsActive="1"/>
    </quartz:connector>
    <https:connector name="HTTP_HTTPS" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" doc:name="HTTP-HTTPS">
        <https:tls-key-store path="keystore.jks" keyPassword="password" storePassword="password"/>
    </https:connector>
    <https:connector name="HTTP_HTTPS1" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" doc:name="HTTP-HTTPS">
        <https:tls-key-store path="kaystore.jks" keyPassword="password" storePassword="password"/>
    </https:connector>
    <https:endpoint exchange-pattern="request-response" host="SITE" port="443" path="PATH" method="POST" connector-ref="HTTP_HTTPS1" name="HTTP" doc:name="HTTP"/>
    <flow name="Flow1" doc:name="Flow1">
        <quartz:inbound-endpoint jobName="runJob" repeatInterval="60000" startDelay="100" responseTimeout="10000" doc:name="Quartz" connector-ref="myConnector">
            <quartz:event-generator-job/>
        </quartz:inbound-endpoint>
        <logger message="Starting + #[message.payload]" level="INFO" doc:name="Logger"/>
        <https:outbound-endpoint exchange-pattern="request-response"   path="PATH" connector-ref="HTTP_HTTPS" method="GET" doc:name="HTTP" password="Password" user="USER" followRedirects="true" ref="HTTP"/>
        <logger message="Ending + #[message.payload]" level="INFO" doc:name="Logger"/>
    </flow>
</mule>

0 个答案:

没有答案
相关问题