-
-
Save distributedlife/7447419 to your computer and use it in GitHub Desktop.
distributedlife.com blog code samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void ConfigureMethod (const char* const Method) | |
| { | |
| lr_save_string (Method, "Method") ; | |
| lr_save_string(lr_eval_string ("{Method}Response"), "Response"); | |
| lr_save_string(lr_eval_string ("{Method}Result"), "Result"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web_service_call | |
| ( | |
| "StepName=GetDataUsingDataContract_102", | |
| "SOAPMethod=Service1|WSHttpBinding_IService1|GetDataUsingDataContract", | |
| "ResponseParam=response", | |
| "Service=Service1", | |
| "ExpectedResponse=SoapResult", | |
| BEGIN_ARGUMENTS, | |
| "xml:composite=" | |
| "<composite>" | |
| "<BoolValue>true</BoolValue>" | |
| "<StringValue>abcde</StringValue>" | |
| "</composite>", | |
| END_ARGUMENTS, | |
| BEGIN_RESULT, | |
| END_RESULT, | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web_service_call | |
| ( | |
| "StepName=Service}::{Method}", | |
| "SOAPMethod={Service}|{Binding}|{Method}", | |
| "ResponseParam=response", | |
| "Service={Service}", | |
| "ExpectedResponse=SoapResult", | |
| BEGIN_ARGUMENTS, | |
| "xml:composite=" | |
| "<composite>" | |
| "<BoolValue>true</BoolValue>" | |
| "<StringValue>The quick brown fox jumps over the lazy dog</StringValue>" | |
| "</composite>", | |
| END_ARGUMENTS, | |
| BEGIN_RESULT, | |
| END_RESULT, | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void SetDefaultParameters (void) | |
| { | |
| lr_set ("true", "BoolValue") ; | |
| lr_set ("The quick brown fox jumps over the lazy dog", "StringValue") ; | |
| } | |
| vuser_init() | |
| { | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SetDefaultParameters () ; | |
| web_service_call | |
| ( | |
| "StepName=Service}::{Method}", | |
| "SOAPMethod={Service}|{Binding}|{Method}", | |
| "ResponseParam=response", | |
| "Service={Service}", | |
| "ExpectedResponse=SoapResult", | |
| BEGIN_ARGUMENTS, | |
| "xml:composite=" | |
| "<composite>" | |
| "<BoolValue>{BoolValue}</BoolValue>" | |
| "<StringValue>{StringValue}</StringValue>" | |
| "</composite>", | |
| END_ARGUMENTS, | |
| BEGIN_RESULT, | |
| END_RESULT, | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SetDefaultParameters () ; | |
| lr_set ("false", "BoolValue") ; | |
| web_service_call | |
| ( | |
| "StepName=Service}::{Method}", | |
| "SOAPMethod={Service}|{Binding}|{Method}", | |
| "ResponseParam=response", | |
| "Service={Service}", | |
| "ExpectedResponse=SoapResult", | |
| BEGIN_ARGUMENTS, | |
| "xml:composite=" | |
| "<composite>" | |
| "<BoolValue>{BoolValue}</BoolValue>" | |
| "<StringValue>{StringValue}</StringValue>" | |
| "</composite>", | |
| END_ARGUMENTS, | |
| BEGIN_RESULT, | |
| END_RESULT, | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ConfigureMethod ("GetDataUsingDataContract") ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lr_save_string(lr_eval_string ("{Method}Response"), "Response"); | |
| lr_save_string(lr_eval_string ("{Method}Result"), "Result"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lr_xml_extract | |
| ( | |
| "XML={response}", | |
| "FastQuery=Envelope/Body/GetDataUsingDataContractResponse/GetDataUsingDataContractResult/BoolValue", | |
| "XMLFragmentParam=BoolValue", | |
| LAST | |
| ); | |
| lr_xml_extract | |
| ( | |
| "XML={response}", | |
| "FastQuery=Envelope/Body/GetDataUsingDataContractResponse/GetDataUsingDataContractResult/StringValue", | |
| "XMLFragmentParam=StringValue", | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lr_xml_extract | |
| ( | |
| "XML={response}", | |
| "FastQuery=Envelope/Body/{Response}/{Result}/BoolValue", | |
| "XMLFragmentParam=BoolValue", | |
| LAST | |
| ); | |
| lr_xml_extract | |
| ( | |
| "XML={response}", | |
| "FastQuery=Envelope/Body/{Response}/{Result}/StringValue", | |
| "XMLFragmentParam=StringValue", | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void ConfigureMyTestingService (void) | |
| { | |
| lr_set("Service1", "Service"); | |
| lr_set("WSHttpBinding_IService1", "Binding") ; | |
| lr_set("Distributedlife.MyService.Service.xml", "TempFile") ; | |
| lr_set(GetHostIpAddress (), "HostIpAddress") ; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lr_set("Service1", "Service"); | |
| lr_set("WSHttpBinding_IService1", "Binding") ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web_service_call | |
| ( | |
| "StepName=GetDataUsingDataContract_102", | |
| "SOAPMethod=Service1|WSHttpBinding_IService1|GetDataUsingDataContract", | |
| "ResponseParam=response", | |
| "Service=Service1", | |
| "ExpectedResponse=SoapResult", | |
| BEGIN_ARGUMENTS, | |
| END_ARGUMENTS, | |
| BEGIN_RESULT, | |
| END_RESULT, | |
| LAST | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "SOAPMethod=Service1|WSHttpBinding_IService1|GetDataUsingDataContract", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment