Skip to content

Instantly share code, notes, and snippets.

@distributedlife
Last active December 28, 2015 05:09
Show Gist options
  • Select an option

  • Save distributedlife/7447486 to your computer and use it in GitHub Desktop.

Select an option

Save distributedlife/7447486 to your computer and use it in GitHub Desktop.
distributedlife.com blog code samples
NoDataChanges () ;
web_service_call
(
"StepName={Service}::{Method}",
"SOAPMethod={Service}|{Binding}|{Method}",
"ResponseParam=response",
"Service={Service}",
"ExpectedResponse=AnySoap",
BEGIN_ARGUMENTS,
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST
);
#define lr_get lr_eval_string
#define lr_set lr_save_string
void ConfigureMethod (const char* Method)
{
lr_set (Method, "Method") ;
lr_set (lr_get ("{Method}Response"), "Response");
lr_set (lr_get ("{Method}"), "HPResponse");
lr_set (lr_get ("{Method}Result"), "Result");
}
const char* GetYesterdaysDate (void)
{
lr_save_datetime ("%Y-%m-%dT00:00:00", DATE_NOW - ONE_DAY, "__GetYesterdaysDate") ;
return lr_eval_string ("{__GetYesterdaysDate}") ;
}
void CheckRegistryValueNotFound (const char* const Server, const char* const SubKey, const char* const Property)
{
lr_save_string (Server, "__CheckRegistryValueNotFound_Server") ;
lr_save_string (SubKey, "__CheckRegistryValueNotFound_SubKey") ;
lr_save_string (Property, "__CheckRegistryValueNotFound_Property") ;
//more code
}
AlteredTable (Add, "ADDRESSES") ;
CheckDataIntegrity () ;
EnableCheckForExceptions (0) ;
ExceptionValidation.Enable () ;
enum EnabledOptions {No, Yes} ;
void EnableCheckForExceptions (enum EnabledOptions ExceptionValidationEnabled)
{
//...
}
web_service_call
(
"StepName=Do something",
"SOAPMethod=MyService|MyServiceBinding|MyOperationName",
"ResponseParam=response",
"Service=MyService",
"ExpectedResponse=AnySoap",
BEGIN_ARGUMENTS,
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST
);
lr_save_string (“MyService”, “Service”) ;
lr_save_string (“MyServiceBinding”, “Binding”) ;
lr_save_string (“MyOperationName”, “Method”) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment