我正在尝试使用不同的testdata组合以编程方式测试Web服务端点。我用SAAJ完成了这个(如下面的代码片段)。但是,当我尝试使用SoapUI API执行相同操作时,我找不到任何方法直接命中端点而不导入WSDL。如何使用SoapUI API?
SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection = soapConnectionFactory.createConnection();
SOAPMessage message = getSoapMessageFromString(strRequest);
SOAPMessage soapResponse = soapConnection.call(message, strURL);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
soapResponse.writeTo(stream);
String resp = new String(stream.toByteArray(), "utf-8");
soapConnection.close();