0% found this document useful (0 votes)
29 views6 pages

Sample

Uploaded by

testeuuuu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views6 pages

Sample

Uploaded by

testeuuuu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Sample Code

The WSDL structure links are available when you open the Web Service in a browser

[Link]

Sample code for order entry in .NET

For the Method name getPassword in addition to the password an random alphanumeric passkey is sent
using the getPassword input so that the response will contain the encrypted password to be used in all
subsequent messages.

After the login request to get encrypted password use the encrypted password in subsequent Orders.

Sample String Passed for Order Entry

[Link]("NEW", "00100120160129030807", "", "1000001",


"10000","001001", "GFG-HDFC", "R", "FRESH", "P", "5000", "", "N", "234323456", "", "Y", "", "", E123456, "Y",
"N", "N", "",
"5lEPKDkD6y/4uOciwnsBCajFaAZldwax/ltyIaMAJV7Rap7DmqL8x5gWg2dp5XA7zxdCGZj1u8I=",
"abcdef1234567890", "", "", "")

Example Code for Order Entry

namespace BSEStarMFClientApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{
[Link] webOrderEntryClient = new
[Link]();
string passkey = "E23456789D";
string password = [Link]("111101", "xyza2000#$", passkey);
string [] bsePassArray = [Link]('|');

string response = [Link]("NEW","000008", "", "111101", "1111",


"10001", "02-DP", "P", "FRESH", "PHYSICAL", "100000", "", "N", "", "", "Y", "", "", "E123456", "Y", "N", "N", "",
bsePassArray[1], passkey, "", "", "");
[Link](response);
}
}
}
Sample XML for UCC Upload

XML Request for UCC Upload:

<?xml version='1.0' encoding='utf-8'?>

<soap-env:Envelope xmlns:ns1="[Link] xmlns:soap-


env="[Link]

<soap-env:Header>

<ns3:Action
xmlns:ns3="[Link]
s3:Action>

<ns4:To
xmlns:ns4="[Link]
ervice/[Link]/Basic</ns4:To>

</soap-env:Header>

<soap-env:Body>

<ns1:MFAPI>

<ns1:Flag>02</ns1:Flag>

<ns1:UserId>1000001</ns1:UserId>

<ns1:EncryptedPassword>/OEBxWPm/KPU0j7y04lJ8RpiFrn++A8Jb2sJymYtb5lI5eNyUWCrYA==</ns1:
EncryptedPassword> <ns1:param>4|SI|01|01|Demo|||05/08/1982|M||ABCDE0000A||||P||||||SB|
50100000000000|400000006|HDFC0000001|Y||||||||||||||||||||||702, Tower, Society, Area,
|City||City|MA|400001|India|||||demo@[Link]|E|02|||||||||||||||9000000001</ns1:param>

</ns1:MFAPI>

</soap-env:Body>

</soap-env:Envelope>
XML Response for UCC Upload:

<s:Envelope xmlns:s="[Link]
xmlns:a="[Link]
s:mustUnderstand="1">[Link]
s:Body><MFAPIResponse xmlns="[Link] INSERTED
SUCCESSFULLY</MFAPIResult></MFAPIResponse></s:Body></s:Envelope>
Sample code for Image Upload

string result = "";


try
{
PasswordRequest obj = new PasswordRequest();

[Link] = [Link];
[Link] = [Link];
[Link] = [Link];

string url1 =
"[Link]
tPassword";
var httpWebRequest = (HttpWebRequest)[Link](url1);
[Link] = "POST";
[Link] = "text/json";

[Link] = [Link];

string json = [Link](obj);

using (var streamWriter = new


StreamWriter([Link]()))
{
[Link](json);
[Link]();
[Link]();
}

var httpResponse = (HttpWebResponse)[Link]();

using (var streamReader = new StreamReader([Link]()))


{
result = [Link]();
}

Response1 Response = new


JavaScriptSerializer().Deserialize<Response1>(result);

if ([Link] == "100")
{
FileData1 Data = new FileData1();

[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];

WebClient client = new WebClient();


[Link]["Content-type"] = "application/json";

MemoryStream stream = new MemoryStream();


DataContractJsonSerializer serializer = new
DataContractJsonSerializer(typeof(FileData1));
[Link](stream, Data);

byte[] data1 =
[Link]("[Link]
[Link]/UploadFile", "POST", [Link]());

string Result = [Link](data1);

Response1 response1 = new


JavaScriptSerializer().Deserialize<Response1>(Result);

[Link] = [Link];
}
}
catch (Exception ex)
{
throw ex;
}

You might also like