Directory:
- Creating a WebService interface to impersonate a server
- Download Soapui
- New mathutil.wsdl file
- Create a SOAP Project
- Interface emulates server-side configuration and startup
"Elaboration": first should encounter a common problem, after JMeter3.2 there is no WebService (SOAP) request, later through the query online data learned can actually use HTTP request to operate, the result is the same.
Specific information you can refer to the original "Jmeter Test SOAP Protocol (Jmeter 3.3)" Thank stone9159
"Steps":
First, create the WebService interface simulation service side
If everyone has the interface address is the best, but I because there is no interface address, so I have to manually simulate the creation of the WebService interface simulation service side.
Reference: "SoapUI5.0 Create WebService Interface simulation Server" Thank Sean-zou
1, first, need to download SOAPUI: official: https://www.soapui.org/downloads/latest-release.html
After downloading, always click Next to install it, there is no need to state.
2, use SOAPUI to create WebService interface simulation Server needs interface description file
New file: mathutil.wsdl
<?XML version= "1.0" encoding= "UTF-8"?><wsdl:definitionstargetnamespace= "Http://sean.com"Xmlns:apachesoap= "Http://xml.apache.org/xml-soap"Xmlns:impl= "Http://sean.com"xmlns:intf= "Http://sean.com"xmlns:wsdl= "http://schemas.xmlsoap.org/wsdl/"Xmlns:wsdlsoap= "http://schemas.xmlsoap.org/wsdl/soap/"xmlns:xsd= "Http://www.w3.org/2001/XMLSchema"> <Wsdl:types> <SchemaelementFormDefault= "qualified"targetnamespace= "Http://sean.com"xmlns= "Http://www.w3.org/2001/XMLSchema"> <elementname= "Add"> <ComplexType> <sequence> <elementname= "X"type= "Xsd:int"/> <elementname= "Y"type= "Xsd:int"/> </sequence> </ComplexType> </element> <elementname= "Addresponse"> <ComplexType> <sequence> <elementname= "Addreturn"type= "Xsd:int"/> </sequence> </ComplexType> </element> </Schema> </Wsdl:types> <Wsdl:messagename= "Addresponse"> <Wsdl:partelement= "Impl:addresponse"name= "Parameters"> </Wsdl:part> </Wsdl:message> <Wsdl:messagename= "Addrequest"> <Wsdl:partelement= "Impl:add"name= "Parameters"> </Wsdl:part> </Wsdl:message> <Wsdl:porttypename= "Mathutil"> <wsdl:operationname= "Add"> <Wsdl:inputmessage= "Impl:addrequest"name= "Addrequest"> </Wsdl:input> <Wsdl:outputmessage= "Impl:addresponse"name= "Addresponse"> </Wsdl:output> </wsdl:operation> </Wsdl:porttype> <wsdl:bindingname= "Mathutilsoapbinding"type= "Impl:mathutil"> <wsdlsoap:bindingstyle= "Document"Transport= "Http://schemas.xmlsoap.org/soap/http"/> <wsdl:operationname= "Add"> <wsdlsoap:operationSOAPAction=""/> <Wsdl:inputname= "Addrequest"> <Wsdlsoap:body Use= "literal"/> </Wsdl:input> <Wsdl:outputname= "Addresponse"> <Wsdlsoap:body Use= "literal"/> </Wsdl:output> </wsdl:operation> </wsdl:binding> <Wsdl:servicename= "Mathutilservice"> <Wsdl:portbinding= "Impl:mathutilsoapbinding"name= "Mathutil"> <wsdlsoap:address Location= "Http://localhost:8080/webservice_create/services/MathUtil"/> </Wsdl:port> </Wsdl:service></wsdl:definitions>
3. Open Soapui and create a SOAP project in SOAPUI through the mathutil.wsdl file:
After confirmation, the impersonated client is automatically generated under the newly created SOAP project
Create an interface to impersonate a server (mock service) on the basis of a simulated client:
When you are sure, double-click "Response1"
The return value defaults to "?" and must be modified, otherwise an error will be made when calling the interface.
4, interface simulation server configuration and start-up
Double-click the created interface to impersonate the server:
"JMeter4.0 Learning (iii)" SOAPUI Creating WebService Interface Simulation Server and JMeter Testing SOAP protocol performance test script development