我正在尝试使用开源 api,将响应代码 404 映射为失败。
<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" protocol="HTTPS" host="api.taxjar.com" port="443" basePath="v2/taxes" doc:name="HTTP Request Configuration"/>
<flow name="postTaxCollectionFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/taxcollection" allowedMethods="POST" doc:name="HTTP"/>
<dw:transform-message doc:name="Transform Message" metadata:id="2789cbd2-5ca6-46c2-856f-67ba2bdfa6dd">
<dw:input-payload mimeType="application/json"/>
<dw:set-payload>
<![CDATA[%dw 1.0
%output application/json
---
payload
]]></dw:set-payload>
</dw:transform-message>
<http:request config-ref="HTTP_Request_Configuration" path="https://api.taxjar.com/v2/taxes" method="POST" doc:name="Web Service">
<http:request-builder>
<http:query-param paramName="Authorization" value="Token token="8dbc821e651fe0672c4032e65209b37c""/>
<http:query-param paramName="Content-Type" value="application/json"/>
</http:request-builder>
</http:request>
<byte-array-to-object-transformer doc:name="Byte Array to Object"/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
错误信息是
响应代码 404 映射为失败。有效负载:org.glassfish.grizzly.utils.BufferInputStream@12c30f42 元素:/postTaxCollectionFlow/processors/1 @ taxcollection_apisero:taxcollection_apisero.xml:23(Web 服务)元素 XML:http:request-builder
请帮我配置它