Попытка отправить https запрос в муле.
Я сгенерировал keystore.jks для сервера и truststore.ts для клиента, я поместил их в папку ресурсов, как показано на рисунке ниже:
вот поток мула:
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:tls="http://www.mulesoft.org/schema/mule/tls" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/current/mule-tls.xsd"> <http:listener-config name="HTTPS_8082_OneWaySSL" host="localhost" port="8044" doc:name="HTTP Listener Configuration" protocol="HTTPS"> <tls:context> <tls:key-store type="jks" path="keystore.jks" alias="pcl123" keyPassword="pcl123" password="pcl123"/> </tls:context> </http:listener-config> <http:request-config name="HTTPS_Request_Configuration" protocol="HTTPS" host="localhost" port="8044" doc:name="HTTP Request Configuration"> <tls:context> <tls:trust-store path="truststore.ts" password="pcl123" type="jks" insecure="true"/> </tls:context> </http:request-config> <http:listener-config name="HTTP_8083" host="localhost" port="8045" doc:name="HTTP Listener Configuration"/> <http:listener-config name="HTTP_8081" host="localhost" port="8041" doc:name="HTTP Listener Configuration"/> <flow name="HTTPS_Client_OneWaySSL"> <http:listener config-ref="HTTP_8081" path="/app/*" doc:name="HTTP"/> <logger level="INFO" doc:name="Logger"/> <http:request config-ref="HTTPS_Request_Configuration" path="/server/*" method="GET" doc:name="Call HTTPS server"/> <set-payload value="#[payload]" doc:name="Set Payload"/> </flow> <flow name="HTTPS_Server_OneWaySSL"> <http:listener config-ref="HTTPS_8082_OneWaySSL" path="/server/*" doc:name="HTTPS"/> <logger level="INFO" doc:name="Logger"/> <set-payload value="#['Hey there. You have accessed HTTPS service']" doc:name="Set Payload"/> </flow> </mule>
Я успешно создал проект мула, но его развертывание не удалось, как показано ниже:
org.mule.module.launcher.DeploymentInitException: InitialisationException: хранилище ключей должно быть настроено для SSL на стороне сервера