Ext.: http://blog.csdn.net/liu870915/article/details/52066517
Method One: The soil approach is to use the LR comes with the WebService protocol, follow the wizard prompts: Import WSDL, choose a service name, form a script framework, read and set parameter values, reference log return information, Debug script, very simple, here is not much to say ...
Method Two: Use the LR Web (http/html) protocol to bring the Web_custom_request () function to the specified URL address to post the corresponding SOAP protocol HTTP message, LR function reference to Web_ The explanation and example of the Custom_request () function is simply tragic, the following first gives a method for generating a SOAP message based on a WSDL file, and then gives an example of the function:
The SOAP protocol itself, which is not cumbersome here, generates SOAP messages based on a WSDL file with tools such as tool XMLSpy, which creates a SOAP request for the corresponding service by importing a WSDL file, as in the following example:
http://schemas.xmlsoap.org/soap/envelope/"xmlns:soap-enc=" http://schemas.xmlsoap.org/soap/encoding/"xmlns: Xsi= "Http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "Http://www.w3.org/2001/XMLSchema" >
<SOAP-ENV:Body>
<m:r11orderreq xmlns:m= "HTTP://SERVICE.INTF.VSOP.BSS" >
<m:in0>String</m:in0>
</m:r11OrderReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The following is an example of a function:
Http://133.37.51.126:7010/xxxxxx/xxxxxx/xxxxxx "," service ");//LC
Lr_start_transaction ("xxxxxxx");
"Url={service}",
"Method=post",
"Resource=0",
"Reccontenttype=text/xml",
"Referer=",
"Snapshot=t1.inf",
"Mode=html",
"Enctype=text/xml;charset=utf-8",
"Body=<soap-env:envelope xmlns:soap-env=\" http://schemas.xmlsoap.org/soap/envelope/\ "xmlns:SOAP-ENC=\" http:/ /schemas.xmlsoap.org/soap/encoding/\ "xmlns:xsi=\" http://www.w3.org/2001/xmlschema-instance\ "xmlns:xsd=\" < Cdata>10000000000172010-4-13 ' >http://service.intf.vsop.bss\ ' ><m:in0><! [cdata[<worklistfktovsopreq><streamingno>1000000000017</streamingno><timestamp> 2010-4-1314:00:01</timestamp><orderid>1200000000000017</orderid><systemid>fk</ Systemid><actiontype>0</actiontype><prodspeccode>cdma</prodspeccode><productno >18982765613</productno><userstate>1</userstate></worklistfktovsopreq>]]></m: In0></m:r11orderreq></soap-env:body></soap-env:envelope> ",
last);
if (strcmp (lr_eval_string ("{Rspcode}"), "0")) {
Lr_error_message ("xxxxxxx Fail:%s", Lr_eval_string ("{Rspcode}"));
Lr_error_message ("xxxxxxx Fail");
}
PS: In <! Under the [cdata]> tag, all tags, entity references are ignored and treated as character data by an XML handler.
LoadRunner Test WebService interface