«Как сделать вызов REST в муле» - PullRequest
0 голосов
/ 22 мая 2019

Я получаю ошибку при выполнении запроса REST.REST api- http://apdev -accounts-ws.cloudhub.io: 80 / api / accounts? Type = personal

Ошибка: код ответа 400 отображается как сбой.

Я добавил свой код.Пожалуйста, сообщите мне, если что-то не так.

   <?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="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
       <http:request-config name="HTTP_Request_Configuration" host="apdev-accounts-ws.cloudhub.io" port="80" doc:name="HTTP Request Configuration"/>
      <flow name="accounts-api-mod8Flow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/accountTrans" allowedMethods="GET" doc:name="HTTP"/>
    <http:request config-ref="HTTP_Request_Configuration" path="api/accounts?type=personal" method="GET" doc:name="HTTP Requester"/>
</flow>

...