Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Templates Wso2 Esb序列模板调用端点模板_Templates_Wso2_Wso2esb_Esb_Endpoint - Fatal编程技术网

Templates Wso2 Esb序列模板调用端点模板

Templates Wso2 Esb序列模板调用端点模板,templates,wso2,wso2esb,esb,endpoint,Templates,Wso2,Wso2esb,Esb,Endpoint,我试图实现一个序列模板,该模板利用参数调用端点模板。 我的代码如下: 序列- <sequence xmlns="http://ws.apache.org/ns/synapse" name="aFileWriteSequence" trace="disable"> <log level="custom"> <property name="sequence" value="aFileWriteSequence"></property>

我试图实现一个序列模板,该模板利用参数调用端点模板。 我的代码如下:

序列-

<sequence xmlns="http://ws.apache.org/ns/synapse" name="aFileWriteSequence" trace="disable">
   <log level="custom">
      <property name="sequence" value="aFileWriteSequence"></property>
   </log>
   <property xmlns:ns="http://org.apache.synapse/xsd" name="filename" expression="get-property('transport', 'FILE_NAME')" scope="default" type="STRING"></property>
   <call-template target="FileWriteTemplate">
      <with-param name="targetFileName" value="A_TITLE"></with-param>
      <with-param name="addressUri" value="vfs:file:///var/process/ren/rrout"></with-param>
   </call-template>
</sequence>
如果有人建议配置此线路,我将不胜感激:

<endpoint name="ep" template="FileOutEndpointTemplate" uri="$func:addressUri">


特别是如何编码从我的序列中的序列模板调用传入的参数addressUri

地址端点不支持动态端点。因此,您不能将动态值(
$func:addressUri
是动态的)传递给模板端点的
uri
参数。因此,如果您想要有一个动态端点,那么您可以使用一个默认端点和一个可以动态设置的“to”头。以下是对工件的更改

  • 不更改您的序列
  • 使用序列模板中的header mediator,在send mediator之前将
    设置为
    header,如下所示
  • 
    更多细节


    地址终结点不支持动态终结点。因此,您不能将动态值(
    $func:addressUri
    是动态的)传递给模板端点的
    uri
    参数。因此,如果您想要有一个动态端点,那么您可以使用一个默认端点和一个可以动态设置的“to”头。以下是对工件的更改

  • 不更改您的序列
  • 使用序列模板中的header mediator,在send mediator之前将
    设置为
    header,如下所示
  • 
    更多细节


    地址终结点不支持动态终结点。因此,您不能将动态值(
    $func:addressUri
    是动态的)传递给模板端点的
    uri
    参数。因此,如果您想要有一个动态端点,那么您可以使用一个默认端点和一个可以动态设置的“to”头。以下是对工件的更改

  • 不更改您的序列
  • 使用序列模板中的header mediator,在send mediator之前将
    设置为
    header,如下所示
  • 
    更多细节


    地址终结点不支持动态终结点。因此,您不能将动态值(
    $func:addressUri
    是动态的)传递给模板端点的
    uri
    参数。因此,如果您想要有一个动态端点,那么您可以使用一个默认端点和一个可以动态设置的“to”头。以下是对工件的更改

  • 不更改您的序列
  • 使用序列模板中的header mediator,在send mediator之前将
    设置为
    header,如下所示
  • 
    更多细节


    感谢您提供的信息和推荐Rajkumar!我已经实施了你的建议,效果很好。再次感谢!感谢您提供的信息和推荐Rajkumar!我已经实施了你的建议,效果很好。再次感谢!感谢您提供的信息和推荐Rajkumar!我已经实施了你的建议,效果很好。再次感谢!感谢您提供的信息和推荐Rajkumar!我已经实施了你的建议,效果很好。再次感谢!
    <template xmlns="http://ws.apache.org/ns/synapse" name="FileOutEndpointTemplate">
       <axis2ns131:parameter xmlns:axis2ns131="http://ws.apache.org/ns/synapse" name="codes"></axis2ns131:parameter>
       <axis2ns132:parameter xmlns:axis2ns132="http://ws.apache.org/ns/synapse" name="factor"></axis2ns132:parameter>
       <axis2ns133:parameter xmlns:axis2ns133="http://ws.apache.org/ns/synapse" name="retries"></axis2ns133:parameter>
       <endpoint name="$name">
          <address uri="$uri">
             <suspendOnFailure>
                <errorCodes>$codes</errorCodes>
                <progressionFactor>$factor</progressionFactor>
             </suspendOnFailure>
             <markForSuspension>
                <retriesBeforeSuspension>$retries</retriesBeforeSuspension>
                <retryDelay>0</retryDelay>
             </markForSuspension>
          </address>
       </endpoint>
    </template>
    
    2015-09-17 16:23:31,026 [-] [SynapseWorker-19] ERROR ClientUtils The system cannot infer the transport information from the $func:addressUri URL.
    2015-09-17 16:23:31,026 [-] [SynapseWorker-19] ERROR Axis2Sender Unexpected error during sending message out
    org.apache.axis2.AxisFault: The system cannot infer the transport information from the $func:addressUri URL.
    
    <endpoint name="ep" template="FileOutEndpointTemplate" uri="$func:addressUri">