2017-08-31 103 views
0

嗨我试图使用(Mule 3.6.1)https出站端点以获得响应。有了这个条件,我无法做出任何回应。但是,但是,如果我使用 骡3.4.0 depreated http出站(这是评论在下面的XML文件)我可以得到一个回应。是否有任何可能的方式通过使用Mule 3.6.1 https出站端点来获得“https://httpbin.org/ip”的响应。Mule 3.6.1 HTTPS ountbound GET/POST

<?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

它正常工作,当我改变了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配置要求配置。

希望这会有所帮助。

+0

那是因为http://httpbin.org/ip还有一个http服务。 而我的问题是如何从Mule 3.6.1 HTTPS URL获取来自HTTPS URL的响应出站端口。 –

+0

对于使用HTTPS url,您必须使用TLS配置和请求配置。 – AnupamBhusari

+0

你能指导我如何做到这一点?任何资源? –

0

我找到了解决方案。

我们需要从位于/Eclipse/plugins/org.mule.tooling.server.3.8.1_6.0.0.201612271237/mule/lib/user文件夹中的CE运行时移除名为async-http-client的jar。

重新启动骡子,它会正常工作。