com.smartbear.soapui.spring.boot.handler.def.SoapResponseArrayHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-soapui Show documentation
Show all versions of spring-boot-starter-soapui Show documentation
Spring Boot Starter For Soapui
package com.smartbear.soapui.spring.boot.handler.def;
import org.apache.xmlbeans.XmlException;
import com.eviware.soapui.impl.wsdl.WsdlOperation;
import com.eviware.soapui.impl.wsdl.support.soap.SoapUtils;
import com.eviware.soapui.impl.wsdl.support.soap.SoapVersion;
import com.eviware.soapui.model.iface.Response;
import com.eviware.soapui.support.SoapUIException;
import com.smartbear.soapui.spring.boot.handler.SoapResponseHandler;
import com.smartbear.soapui.spring.boot.utils.SoapuiResponseUtils;
/**
* 请求响应处理:返回String对象
* @author : vindell
*/
public class SoapResponseArrayHandler implements SoapResponseHandler {
@Override
public String[] handleResponse(WsdlOperation operationInst, Response response) throws SoapUIException {
// 响应内容
String responseContent = response.getContentAsString();
try {
if(SoapUtils.isSoapFault(responseContent)) {
}
} catch (XmlException e) {
e.printStackTrace();
}
SoapVersion soapVersion = operationInst.getInterface().getSoapVersion();
return SoapuiResponseUtils.parseResponseToArray(responseContent, soapVersion);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy