您好我正在尝试使用(Mule 3.6.1)https出站端点以获得响应。有了这个条件,我无法做出任何回应。但是,如果我使用 Mule 3.4.0描述了http outbound(在下面的xml文件中注释)我可以得到响应。有没有办法通过使用Mule 3.6.1 https出站端点从“https://httpbin.org/ip”获得响应。
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:https="http://www.mulesoft.org/schema/mule/https"
xmlns:http="http://www.mulesoft.org/schema/mule/http" 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.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" basePath="miraj" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" protocol="HTTPS" host="httpbin.org" port="443" doc:name="HTTP Request Configuration"/>
<!-- <https:connector name="HTTPS_Connector" cookieSpec="netscape" validateConnections="false" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" sendTcpNoDelay="true" clientSoTimeout="40000" serverSoTimeout="40000" socketSoLinger="0" doc:name="HTTP\HTTPS">
</https:connector> -->
<flow name="testmulehttpsFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="hamid" doc:name="HTTP"/>
<logger message="Hiiiii" level="INFO" doc:name="Logger"/>
<http:request config-ref="HTTP_Request_Configuration" path="ip" method="GET" doc:name="HTTPS"/>
<!--<https:outbound-endpoint exchange-pattern="request-response" method="GET" connector-ref="HTTPS_Connector" address="https://httpbin.org/ip" doc:name="HTTPS" contentType="application/xml">
</https:outbound-endpoint> -->
</flow>
</mule>
答案 0 :(得分:1)
我找到了解决方案。
我们需要从位于/Eclipse/plugins/org.mule.tooling.server.3.8.1_6.0.0.201612271237/mule/lib/user文件夹的CE运行时中删除名为async-http-client的jar。 / p>
重启mule,它会正常工作。
答案 1 :(得分:0)
当我将http请求配置更改为HTTP而不是HTTPS
时,它工作正常<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" basePath="miraj" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" host="httpbin.org" port="80" doc:name="HTTP Request Configuration"/>
<flow name="testmulehttpsFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="hamid" doc:name="HTTP"/>
<logger message="Hiiiii" level="INFO" doc:name="Logger"/>
<http:request config-ref="HTTP_Request_Configuration" path="ip" method="GET" doc:name="HTTPS"/>
</flow>
对于HTTPS,尝试添加TLS配置以请求配置。
希望这有帮助。