Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Api ESB Mule—如何查看用于在HTTP组件中命中的动态URL_Api_Mule_Esb_Middleware - Fatal编程技术网

Api ESB Mule—如何查看用于在HTTP组件中命中的动态URL

Api ESB Mule—如何查看用于在HTTP组件中命中的动态URL,api,mule,esb,middleware,Api,Mule,Esb,Middleware,我不熟悉mule ESB 我设计了如下的流程 我喜欢看到动态构建请求URL以命中RESTAPI。我已尝试调试一个流。我在“Call\uHTTPS\uREST\uAPI”http组件上设置了一个断点。在那里我可以看到有效载荷。但我看不到任何地方 请帮我找到用于点击服务的动态URL 注意-我已尝试使用system.out.println打印变量(dynamicEndpoint)。虽然我喜欢看到用来点击服务的url 请查找流配置xml <?xml version="1.0" encod

我不熟悉mule ESB

我设计了如下的流程

我喜欢看到动态构建请求URL以命中RESTAPI。我已尝试调试一个流。我在“Call\uHTTPS\uREST\uAPI”http组件上设置了一个断点。在那里我可以看到有效载荷。但我看不到任何地方

请帮我找到用于点击服务的动态URL

注意-我已尝试使用system.out.println打印变量(dynamicEndpoint)。虽然我喜欢看到用来点击服务的url

请查找流配置xml

    <?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:wmq="http://www.mulesoft.org/schema/mule/ee/wmq" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" 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://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/current/mule-wmq-ee.xsd">

<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8085" basePath="/mule" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" host="#[dynamicEndpoint]" port="443" doc:name="HTTP Request Configuration" protocol="HTTPS" >
    </http:request-config>
<flow name="secondflowFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <custom-transformer class="com.mule.URLBuilding.BuildURL" doc:name="Java"/>
<http:request config-ref="HTTP_Request_Configuration" method="POST" path="/" doc:name="Call_HTTPS_REST_API">
<http:success-status-code-validator values="0..599"/>
</http:request>
</flow>
</mule>

只需添加一个记录器和日志#[dynamicEndpoint]

<logger message="#[dynamicEndpoint]" level="INFO" doc:name="Logger"/>


如果您创建了一个变量,您应该在“变量”选项卡上的调试器中看到它,此时您可能没有变量,或者您可能在Java代码中创建了变量。否则,创建一个值为#[dynamicEndpoint]

Hi Joost D的flowVars,非常感谢您的回复。是的,这对我有用。是否有其他方法可以查看用于命中http请求的所有http头和请求负载?可以通过可视化调试器查看:您可以将它们视为入站属性。当这解决了您的问题时,您能将您的问题标记为已回答吗?
<logger message="#[dynamicEndpoint]" level="INFO" doc:name="Logger"/>