2017-02-17 1 views
0

노새 프로젝트에서 간단한 Restful 웹 서비스를 만들었습니다. 평안한 WS의Mule : HTTP 요청 아웃 바운드 끝점에서 RESTFul 웹 서비스 (HTTP Listener)에 요청을 보낼 수 없습니다.

XML 구성 파일 : -

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

<mule 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.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="American_HTTP_Listener_Configuration" host="0.0.0.0" port="8181" doc:name="HTTP Listener Configuration"/> 
    <flow name="americanFlow"> 
     <http:listener config-ref="American_HTTP_Listener_Configuration" path="/api/flights" doc:name="HTTP" allowedMethods="GET"/> 
     <set-payload value="[{&quot;ID&quot;:1, &quot;code&quot;: &quot;ER38sd&quot;,&quot;price&quot;: 400, &quot;departureDate&quot;: &quot;2016/03/20&quot;, &quot;origin&quot;: &quot;MUA&quot;, &quot;destination&quot;: &quot;SFO&quot;, &quot;emptySeats&quot;: 0, &quot;plane&quot;: {&quot;type&quot;: &quot;Boeing 737&quot;, &quot;totalSeats&quot;: 150}}, {&quot;ID&quot;:2,&quot;code&quot;: &quot;ER45if&quot;, &quot;price&quot;: 345.99, &quot;departureDate&quot;: &quot;2016/02/11&quot;, &quot;origin&quot;: &quot;MUA&quot;, &quot;destination&quot;: &quot;LAX&quot;, &quot;emptySeats&quot;: 52, &quot;plane&quot;: {&quot;type&quot;: &quot;Boeing 777&quot;, &quot;totalSeats&quot;: 300}}]" mimeType="application/json" doc:name="Set Payload"/> 
    </flow> 
</mule> 

그리고 같은 프로젝트에 난 그냥 평안한 WS 위를 호출하는 또 다른 웹 서비스를 생성. 다음은

는 호출 WS에 대한 XML 설정 파일입니다 : - 여기

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:context="http://www.springframework.org/schema/context" 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.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> 
    <context:property-placeholder location="flights-${env}.properties"/> 
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> 
    <http:request-config name="American_HTTP_Request_Configuration" protocol="HTTPS" host="localhost" port="8181" responseTimeout="300000" doc:name="HTTP Request Configuration"/> 
    <flow name="implemantationFlow"> 
     <http:listener config-ref="HTTP_Listener_Configuration" path="/american" allowedMethods="GET" doc:name="HTTP"/> 
     <flow-ref name="setAirportCodeSubFlow" doc:name="setAirportCodeSubFlow"/> 
     <http:request config-ref="American_HTTP_Request_Configuration" path="/api/flights" method="GET" doc:name="American REST Request"/> 
     <logger level="INFO" doc:name="Logger"/> 
    </flow> 
</mule> 

가 우선이 기본 응답 시간을 가진 코드를 확인하지만, 오류가 오류가 HTTP 요청을 보내 "와 같은 발생한다 ". 나중에 기본 응답 시간을 30 초에서 300 초로 변경했지만 동일한 오류가 계속 발생합니다. 아무도이 문제가 어떻게 해결되는지 말해 줄 수 있습니까? 비슷한 게시물을 많이 읽었지만 모든 게시물에서 응답 시간을 늘리고 확인하는 중입니다. 하지만 응답 시간을 늘리면이 문제를 해결할 수 없습니다.

EDIT : - 또한 내 Anypoint Studio에 프록시를 설정했습니다. 귀하의 요청에 설정에서

답변

0

HTTPS

<http:request-config name="American_HTTP_Request_Configuration" protocol="HTTP" host="localhost" port="8181" responseTimeout="300000" doc:name="HTTP Request Configuration"/> 
대신 protocol="HTTP"를 넣어
관련 문제