Hi everyone, i'm currently work on a custom workflow. In this custom workflow, i must connect external web service, send it a data and take new data back. I'm little bit confused. How can i call external web service in my workflow here is the my code;
GetCustomerInfoService.TransactionServiceClient client = null;
try
{
client = new GetCustomerInfoService.TransactionServiceClient();
GetCustomerInfoService.TransactionRequest request = new GetCustomerInfoService.TransactionRequest();
#region authentication
GetCustomerInfoService.AuthenticationData auth = new GetCustomerInfoService.AuthenticationData();
auth.UserName = "username";
auth.Password = "password";
request.AuthenticationData = auth;
#endregion
Guid id = Guid.NewGuid(); //create random guid
request.RequestId = id.ToString();
request.OrderNumber = "W162299784";
GetCustomerInfoService.TransactionResponse response = client.GetTransactionByOrderNumber(request);
tmpContact = ContactHandler.GetContactViaCustomerCode(organizationServiceContext, response.Transaction.CustomerId.ToString());
if (tmpContact != null) // Null Check
{
tmpIncident.CustomerId = new EntityReference("Contact", tmpContact.ContactId.Value);
}
this.updateChanges(organizationServiceContext, tmpIncident);
*This post is locked for comments
I have the same question (0)