1、新建项目
File-->New SOAP Project-->Project Name:填入项目名 Initial WSDL:填入项目的 web Services
2、添加WSDL
Project-->Add WSDL
3、传递xml参数
使用soapUI对webservice接口进行测试的时候传递的参数是xml,需要把传递的参数放在转意符中。<![CDATA[ ]]>
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<Report>
<orderNumber>gg456</orderNumber>
<groupItemNumber>测试</groupItemNumber>
<groupItemName>测试</groupItemName>
<description>bug</description>
<reason>新特性</reason>
<processor>不改了</processor>
</Report>
]]>
否则会报错:org.apache.cxf.interceptor.Fault: Unmarshalling Error: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
原因是soapUI会把<?xml version="1.0 "encoding="UTF-8"?>这个头忽略。