显示标签为“Web Services”的博文。显示所有博文
显示标签为“Web Services”的博文。显示所有博文

Using Groovy Script to Generate and Validate Data in soapUI

soapUI is the leading tool for Web Service Testing, it provides extensive options for scripting to do more flexible testing, e.g. generate test data and validate it.

Let's assume a scenario, we receive a Web Services which contains id and name information, and save them to database table named 'a_table'.

1. Add following script to 'Setup Script' in TestCase:

2. Add Properties

3. Modify Test Request

4. Add Script Assertion for validation

Using Dynamic Endpoint in soapUI

1. Create a file named soapui.properties, put it into your soapUI home/bin directory.

soapui.properties Sample:



2. Open your TestCase and set the endpoint to your endpoint property name, e.g. ${##serviceA.endpoint}

3. Run your TestCase, the endpoint will be replaced successfully.

Axis2 Basic Authentication

Axis2官方文档的Basic Authentication代码有点问题,并不会在Http Header里放入Authorization信息。

经过反复试验,发现加入preemptiveAuthentication属性改为true即可。

最终代码如下:



对应的Spring Bean XML为:

Let soapUI 'Deploy As War' Supports Multi Projects

soapUI的Deploy As War can deploy MockServices as a WAR,but only supports one project, if you want to use multi projects, you need to deploy corresponding multi WARs. Can I make it easier?

After reading MockAsWarServlet source code, I found when init Servlet, it will read projectFile param, and load project file to start MockServices in this project.

So we can make a little change, add a parameter called projectPath, located all of projects file. It will scan all of projects file in that directory at Servlet init step, and start corresponding MockService one by one.

Download jar



web.xml:

在WebLogic 9.2上部署CXF的解决方案

当你用CXF开发完Web Services后发现在tomcat上运行正常的包,一部署在WebLogic上立马一大堆错误向你涌来,那真是非常头痛的一件事情,好在前人已经有了完美解决方案供我们参考,官方推荐的是打成ear包,Glen Mazza还提供了详细的步骤来说明,非常具有参考价值啊~~~~

My Favorites