All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.smartbear.soapui.spring.boot.handler.def.SoapResponseArrayHandler Maven / Gradle / Ivy

There is a newer version: 1.0.3.RELEASE
Show newest version
 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