简体   繁体   English

WSO2 ESB-如何使用SoapUI测试介体

[英]WSO2 ESB - how to test Mediator with SoapUI


I'm new to WSO2 and ESB topic in general. 我是WSO2和ESB主题的新手。 I'm trying to make a simple example with content based routing mediator. 我正在尝试使用基于内容的路由介体做一个简单的例子。 In particular this is the sequence XML: 具体来说,这是序列XML:

<sequence xmlns="http://ws.apache.org/ns/synapse" name="CBRSimple">
    <in>
        <log category="INFO" level="full" separator=",">
            <property name="message" value="SOAP Message received on ESB"/>
        </log>
        <filter regex=".*/VISA.*" source="get-property('To')">
            <then>
                <send>
                    <endpoint key="VISAEndpoint"/>
                </send>
            </then>
            <else>
                <send>
                    <endpoint key="AMEXEndpoint"/>
                </send>
            </else>
        </filter>
    </in>
</sequence>

I would like to check if the destination of the request contains the word VISA and redirect the message to VISAEndpoint (a Web service deployed on WSO2 AS at localhost:9763/services/VisaProcessingService ) 我想检查请求的目的地是否包含单词VISA并将消息重定向到VISAEndpoint(部署在WSO2 AS上的Web服务,位于localhost:9763 / services / VisaProcessingService

ESB is deployed and listening on the following ports: 已部署ESB并在以下端口上侦听:
HTTP: 8281 HTTP:8281
HTTPS: 8244 HTTPS:8244

Then I created a SOAP UI Test with a sample SOAP MEssage based on VISAEndpoint Wsdl and I sent the SOAP request to the following url: 然后,我基于VISAEndpoint Wsdl创建了一个带有示例SOAP消息的SOAP UI测试,并将SOAP请求发送到以下URL:
localhost:8281/services/VISAProcessingService 本地主机:8281 /服务/ VISAProcessingService
ESB logs shows that a soap message is received because soap header is printed out, but then the request is not redirected. ESB日志显示接收到一条肥皂消息,因为已打印出肥皂标头,但随后该请求未重定向。 If I check esb logs, i don't find any errors, but it seems that soap message doesn't pass through the esb sequence. 如果我检查esb日志,则没有发现任何错误,但是soap消息似乎没有通过esb序列。

My question is : 我的问题是:
1)Is this the correct way to test with soap UI the esb sequence? 1)这是用soap UI测试esb序列的正确方法吗?
2)If yes, could someone help me to figure out the reason of the test not working? 2)如果是,有人可以帮助我找出测试不起作用的原因吗?
If no, could you suggest the right approach to test this sample? 如果没有,您是否可以建议测试此样本的正确方法?

Thank you very much in advance, 预先非常感谢您,
Regards 问候

Giovanni 乔瓦尼

There is a mistake in your regular expression, you should replace .*/VISA.* with .*/Visa.* 正则表达式有误,应将.*/VISA.*替换为.*/Visa.*

Property 'To' contains : /services/VisaProcessingService 属性“ To”包含: / services / VisaProcessingService

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM