using System;
using System.Net;
using System.Text.RegularExpressions;
namespace Program
{
class Program
{
static void Main(string[] args)
{
string url = "http://10.162.4.245/OA30FFKIWCF.svc?wsdl";
string soapRequest = @"<soap:Envelope xmlns:soap=""http://www.w3.org/2003/05/soap-envelope"" xmlns:tem=""http://tempuri.org/"">
<soap:Header xmlns:wsa=""http://www.w3.org/2005/08/addressing""> <wsa:To>http://10.162.4.245/OA30FFKIWCF.svc</wsa:To>
<wsa:Action>http://tempuri.org/IOA30FFKIWCF/GetDPKStatusByWIP_SN</wsa:Action> </soap:Header>
<soap:Body> <tem:GetDPKStatusByWIP_SN> <!--Optional:--> <tem:WIP_SN>4003189900003</tem:WIP_SN> </tem:GetDPKStatusByWIP_SN>
</soap:Body></soap:Envelope>";
WebClient webClient
= new WebClient
();
webClient.Headers.Add("Content-Type", "application/soap+xml;charset=UTF-8;action=\"http://tempuri.org/IOA30FFKIWCF/GetDPKStatusByWIP_SN\"");
try
{
// Call the SOAP API and get the response
string soapResult = webClient.UploadString(url, soapRequest);
// Parse the SOAP response and get the query
Regex ER
= new Regex
(@"\<b:ProductKeyStateID>.*</b:ProductKeyStateID>", RegexOptions
.None);
var match = "";
if (ER.IsMatch(soapResult))
{
match = ER.Match(soapResult).Value.ToString();
}
var result = Regex.Match(match, @"[\d]").Value;
return result;
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}