wso2 esb twitter连接器未调用twitter api

wso2 esb twitter连接器未调用twitter api,wso2,wso2esb,Wso2,Wso2esb,我正在代理服务中使用WSO2 ESB Twitter连接器操作。代理配置如下所示 <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="twitter_test_proxy" transports="http https" startOnLoad="true" trace="disable"> <target>

我正在代理服务中使用WSO2 ESB Twitter连接器操作。代理配置如下所示

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="twitter_test_proxy" transports="http https" startOnLoad="true" trace="disable">
    <target>
        <inSequence>
            <twitter.init configKey="twitter_init"/>
            <twitter.getTopTrendPlaces configKey="twitter_init">
                <id>23424975</id>
            </twitter.getTopTrendPlaces>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
</proxy>

23424975
我将twitter连接器导入esb并启用它。然后,所有工件(代理服务和twitter_init local entry)都部署在ESB中。调用代理服务后,我注意到twitter连接器没有调用预期的后端twitter API。我已经启用了wire调试和调试日志,如下所示。原因是什么?我正在使用WSO2 ESB 4.8.1。我按照创建配置时给出的说明进行操作

[2014-11-12 20:07:47,785] DEBUG - header >> "POST /services/twitter_test_proxy.twitter_test_proxyHttpSoap12Endpoint HTTP/1.1[\r][\n]"
[2014-11-12 20:07:47,793] DEBUG - header >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:mediate"[\r][\n]"
[2014-11-12 20:07:47,793] DEBUG - header >> "Cookie: menuPanel=visible; menuPanelType=main; wso2.carbon.rememberme=admin-60c7726f-6e4b-462c-88c2-13753ab95974; JSESSIONID=6297A74817478FFE0F4B6EB392022E29; requestedURI="../../carbon/service-mgt/index.jsp?region=region1&item=services_list_menu"; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG14156327996440.7180992366157122=true; MSG14156330072650.6915075827877599=true; current-breadcrumb=manage_menu%2Cservices_menu%2Cservices_list_menu%23proxyservices+index.jsp*+index.jsp*; MSG14157205387400.9361328898335365=true; MSG14157205491900.33127844546453067=true; MSG14157205807580.7846254111223301=true; MSG14157216353420.11143615454004241=true[\r][\n]"
[2014-11-12 20:07:47,793] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
[2014-11-12 20:07:47,793] DEBUG - header >> "Host: asanka-virtual-machine:8280[\r][\n]"
[2014-11-12 20:07:47,794] DEBUG - header >> "Transfer-Encoding: chunked[\r][\n]"
[2014-11-12 20:07:47,794] DEBUG - header >> "[\r][\n]"
[2014-11-12 20:07:47,794] DEBUG - content >> "a0[\r][\n]"
[2014-11-12 20:07:47,794] DEBUG - content >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body></soapenv:Body></soapenv:Envelope>"
[2014-11-12 20:07:47,795] DEBUG - content >> "[\r][\n]"
[2014-11-12 20:07:47,796] DEBUG - content >> "0"
[2014-11-12 20:07:47,796] DEBUG - content >> "[\r][\n]"
[2014-11-12 20:07:47,797] DEBUG - content >> "[\r][\n]"
[2014-11-12 20:07:47785]调试-标题>>“POST/services/twitter\u test\u proxy.twitter\u test\u proxyHttpSoap12Endpoint HTTP/1.1[\r][\n]”
[2014-11-12 20:07:47793]调试-标题>>“内容类型:应用程序/soap+xml;字符集=UTF-8;操作=“urn:mediate”[\r][\n]”
[2014-11-12 20:07:47793]调试-标题>>“Cookie:menuPanel=visible;menuPanelType=main;wso2.carbon.rememberme=admin-60c7726f-6e4b-462c-88c2-13753ab95974;jsSessionID=6297A74817478FFE0F4B6EB392022E29;requestedURI=“../carbon/service mgt/index.jsp?region=region1&item=services\u list\u菜单"; 区域1\u配置\u菜单=无;region3\u注册表\u菜单=无;区域4\u监视器\u菜单=无;区域5工具菜单=无;MSG14156327996440.7180992366157122=真;MSG14156330072650.6915075827877599=真;当前面包屑=manage_menu%2Cservices_menu%2Cservices_list_menu%23proxyservices+index.jsp*+index.jsp*;MSG14157205387400.9361328898335365=真;MSG14157205491900.33127844546453067=真;MSG14157205807580.784625111223301=真;MSG14157216353420.11143615454004241=真[\r][\n]“
[2014-11-12 20:07:47793]调试-标题>>“用户代理:Axis2[\r][\n]”
[2014-11-12 20:07:47793]调试-标题>>“主机:asanka虚拟机:8280[\r][\n]”
[2014-11-12 20:07:47794]调试-标题>>“传输编码:分块[\r][\n]”
[2014-11-12 20:07:47794]调试-标题>>“[\r][\n]”
[2014-11-12 20:07:47794]调试-内容>>“a0[\r][\n]”
[2014-11-12 20:07:47794]调试-内容>>“”
[2014-11-12 20:07:47795]调试-内容>>“[\r][\n]”
[2014-11-12 20:07:47796]调试-内容>>“0”
[2014-11-12 20:07:47796]调试-内容>>“[\r][\n]”
[2014-11-12 20:07:47797]调试-内容>>“[\r][\n]”

我只需对代理稍加修改就可以解决上述问题。我添加了respond mediator并获得了预期结果。工作代理如下所示

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="twitter-connector-proxy" transports="http https" startOnLoad="true" trace="disable">
    <target>
        <inSequence>
            <log level="full">
                <property name="INIT" value="##### Call to the Proxy #####"/>
            </log>
            <twitter.init/>
            <twitter.search configKey="twitter_init">
                <search>cricket</search>
            </twitter.search>
            <log level="full">
                <property name="RESULT" value="#### Twitter Search Result ####"/>
            </log>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
</proxy>

板球