首页 文章

如何配置WSO2 ESB(如Gateway)从WSO2 API Manager发布?

提问于
浏览
2

在WSO2 API Manager中,我想在本地使用WSO2 ESB实例来发布API . 我的意思是,我在/repository/conf/api-manager.xml中配置一个像Gateway这样的ESB实例,如下所示:

<APIGateway>
<Environments>
    <Environment type="hybrid" api-console="true">
        <Name>Production and Sandbox</Name>
        <Description> Description of environment</Description>

        <!--ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/</ServerURL-->
        <ServerURL>https://localhost:8243/services/</ServerURL>

        <!--Username>${admin.username}</Username-->
        <Username>admin</Username>

        <!--Password>${admin.password}</Password-->
        <Password>admin</Password>

        <!--GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint-->
        <GatewayEndpoint>http://localhost:8280,https://localhost:8243</GatewayEndpoint>
    </Environment>
</Environments>
<EnableGatewayKeyCache>true</EnableGatewayKeyCache>
<EnableGatewayResourceCache>true</EnableGatewayResourceCache>
<ClientDomainHeader>referer</ClientDomainHeader>
</APIGateway>

我按照这篇文章https://docs.wso2.com/display/AM190/Publish+through+Multiple+API+Gateways,我只是根据我的ESB实例更改了配置 .

问题出在API发布者,当我想发布新的API时,我得到以下错误:

Failed to change the life cycle status : Invoking lifecycle action "Publish" failed

注意:我将serviceURL的端口从9443更改为8243,因为我无法在浏览器中显示ESB的服务列表,而使用8243我可以看到它 .

1 回答

  • 0

    你在ESB上安装了功能吗?

    默认情况下,WSO2 ESB不包含在此方案中用作网关所需的某些功能 . 如果没有安装功能,则无法在此处使用ESB .

    因此,我们建议您使用WSO2 API Manager本身的实例作为网关 .

    网关的 HTTPS servlet transport port 需要作为网关的 <serverURL> 给出 .

相关问题