从WSO2 ESB调用外部Web服务

时间:2017-09-19 09:56:04

标签: wso2 wso2esb esb jboss-esb

我在一个内部网络中,我想创建一个服务(ESB)来调用外部获取服务。
例如,我的 ESB 服务路径:uri/esb/path/param1/param2
我的外部路径:external/path/param1/param2

这是我的条目

<?xml version="1.0" encoding="UTF-8"?>
<api context="/services/KRI-getIndividualVehicleFuelco2" name="KRI-getIndividualVehicleFuelco2" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence>
            <property name="renault_error_format" scope="default" type="STRING" value="json"/>
            <log level="custom">
                <property name="getIndividualVehicleFuelco2" value="********** begin **********"/>
                <property expression="get-property('RequestID')" name="RequestID"/>
            </log>
            <Delegation.DelegationIn>
                <Jboss-Endpoint-Key>KRI-customAddressingTransformation.xml</Jboss-Endpoint-Key>
                <Custom-Sequence-Header>KRI-commonsequences-processSpecialHeadersIn</Custom-Sequence-Header>
            </Delegation.DelegationIn>
            <loopback/>
        </inSequence>
        <outSequence>
            <sequence key="KRI-commonsequences-genericErrorHandling"/>
            <Delegation.DelegationOut>
                <Jboss-Endpoint-Key>KRI-customAddressingTransformation.xml</Jboss-Endpoint-Key>
                <Custom-Sequence-Header>KRI-commonsequences-processSpecialHeadersOut</Custom-Sequence-Header>
            </Delegation.DelegationOut>
            <log level="custom">
                <property name="getIndividualVehicleFuelco2" value="********** end **********"/>
                <property expression="get-property('RequestID')" name="RequestID"/>
            </log>
        </outSequence>
        <faultSequence>
            <loopback/>
        </faultSequence>
    </resource>
</api>


我用外部服务的基础uri创建了一个端点。

<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="KIS-fuelco-PPD" xmlns="http://ws.apache.org/ns/synapse">
    <address uri="http://kisre701.intra.com/kis/api/v2/individual-vehicle-fuelco2/"/>
</endpoint>


如何解析参数并将其发送到端点?

0 个答案:

没有答案
相关问题