0
我在SoapUI中创建了一个Soap Service模拟器来运行一些集成测试。我也放了一个groovy脚本来验证其中的一些字段。Soapui maven插件无法解析XmlHolder
import java.math.BigDecimal;
def holder = new com.eviware.soapui.support.XmlHolder(mockRequest.requestContent)
def lineItemId1 = holder["//*:QuotationRequest/*:LineItem[1]/@lineItemId[1]"]
当我运行我的测试呼叫通过Eclipse的JUnit的插件模拟,并启动了SoapUI模拟手动一切顺利,但是当我运行MVN测试的测试 - 采用的soapUI - Maven的插件 - 我例外:
10:17:55,056 ERROR [SoapUI] An error occurred java.lang.ClassCastException:
org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath cannot be cast to
org.apache.xmlbeans.impl.store.SaxonXBeansDelegate$SelectPathInterface], see error log for details
java.lang.RuntimeException: java.lang.ClassCastException:
org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath cannot be cast to
org.apache.xmlbeans.impl.store.SaxonXBeansDelegate$SelectPathInterface
2016-07-14 10:17:55,180 WARN PhaseInterceptorChain:449 - Interceptor for
{http://www.vertexinc.com/oseries/services/CalculateTax60}CalculateTaxWSService60#{http://www.vertexinc.com/oseries/services/CalculateTax60}calculateTax60
has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.
Incoming portion of HTML stream:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>?</faultcode>
<faultstring>?</faultstring>
</soapenv:Fault>
</soapenv:Body>
这似乎是此行我收到提示:
holder["//*:QuotationRequest/*:LineItem[1]/@lineItemId[1]"]
将帖子 更多信息: 片断我的pom.xml
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.3</version>
<executions>
<execution>
<id>Vertex</id>
<phase>test-compile</phase>
<goals>
<goal>mock</goal>
</goals>
<configuration>
<projectFile>${pom.basedir}/../core/Vertex-soapui-project.xml</projectFile>
<noBlock>true</noBlock>
<port>8284</port>
</configuration>
</execution>
</executions>
</plugin>
的这是我试图嘲弄
http://vha0230.vertexinc.com/vertex-ws/services/CalculateTax60?WSDL
你能帮助我的服务?
感谢
听起来像是依赖版本的问题。我不明白:“当我通过Eclipse JUnit插件运行时,但是当我运行使用soapui-maven-plugin时” - 这是两个完全不同的框架。你应该添加信息如何运行你的东西在一个,然后另一个。我们需要重现的步骤,否则它不会发生! – SiKing
@SiKing感谢您的反馈。编辑的问题。你认为这里需要更多信息吗? –
错误日志是否有更多信息。发布您的pom的相关部分。我仍然只是在猜测事情,因为我还没有看到重现的步骤。 – SiKing