Thursday, February 26, 2015

Making external webservice call in C# rule

In a C# rule, you can also make external web service call. Before doing this first we have to make some configuration settings (like security and adding reference). If the security configuration is left as default you probably are going to get "System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission'" error.

Wednesday, February 25, 2015

Adding .Net Reference

You can write complicated C# codes in SV Designer. By default only System and System.Code references can be used while wirting your C# methods. Since you are mostly working with XML objects you are going to have to use System.Xml.XmlDocument reference.

When you add using System.Xml; line at the top of your code you are going to get "Xml does not exist in the namespace 'System'" error.

Enabling scripted rules

Because of heavy business schedule I wasn't able to submit new posts. Meanwhile I was mostly working on UFT and HP's Service Virtualization (SV). After the business hours it would be better for me to write some posts before forgetting what I learned. I am going to describe how to enable scripted rules in SV.