PDA

View Full Version : Webtrader Login program



gld1881
10-21-2015, 05:52 AM
I try to use webtrader login program provided at http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1949.

it working good while using hybrid-solutions webservice (http://74.54.46.178/vertexweb10/WebService.svc)

But when i change the webservice to http://159.253.137.74/galaxydiamonds/WebService.svc it not working and giving message "Service call faild : 200 success"

when is the problem?

Rawan-HS
10-21-2015, 07:48 AM
Dear NBH

can tell me what exactly you do to get this message .??

we are created demo account on galaxy dimands and every things was fine

check this link (http://159.253.137.74/galaxydiamonds/WebService.svc/login?username=%22USER7973%22&password=%22J31E%22)

gld1881
10-21-2015, 08:07 AM
Dear Rawan,

when i use direct link (http://159.253.137.74/galaxydiamonds/WebService.svc/login?username=rajeev0161&password=1234) i am also getting success string, but through the program mentioned above giving message "Service call faild : 200 success".

you can try on http://www.galaxydiamonds.ae/webtrader-login.php with you id and password it will not work. in this page i am using same program given on http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1949 except webservice link that is http://159.253.137.74/galaxydiamonds/WebService.svc.

even i try with your user id and password but same problem.

{"d":"{\"sessionid\":\"upuim1whvarl0g011gicpm3t\",\"VersionInfo\":{\"Rel\":0,\"Ver\":0,\"Patch\":0,\"ForceUpdate\":0,\"UpdateType\":0,\"Globals\":{\"MultiSessionsAllowed\":true,\"CommCalcType\":1,\"PriceChangedTimer\":10,\"ValidLotsLocation\":3,\"CustumizeTradeMsg\":false,\"FirstWhiteLabeledOffice\":null,\"DealerTreePriv\":0,\"ClientConnectTimer\":200,\"ClientTimeoutTimer\":500,\"DefaultLots\":0.001,\"WebSecurityID\":\"SDJ634KJFFFI\",\"ServerGMT\":4}},\"SystemLockInfo\":{\"MinutesRemaining\":0,\"HoursRemaining\":0,\"DaysRemaining\":0,\"Maintanance\":0,\"WillBeLocked\":1},\"FirstWhiteLabel\":\"Galaxy Diamonds DMCC\",\"WLID\":\"2099\",\"CheckWhiteLabel\":true,\"Password\":\"1234\",\"Username\":\"rajeev0161\",\"LastTickTime\":\"\\\/Date(1445413794900)\\\/\",\"SelectedAccount\":1001824,\"Name\":0,\"ServicePath\":null,\"GWSessionID\":\"70990\",\"IP\":\"Web (87.200.6.38)\",\"SessionDateStart\":\"21\/10\/2015 11:49:54\",\"CompanyName\":\"Galaxy Diamonds DMCC\",\"UserId\":2236,\"DemoClient\":\"1\",\"FName\":\"Rajeev\",\"SName\":\"\",\"TName\":\"\",\"LName\":\"Verma\",\"Sms\":null,\"isReadOnly\":\"0\",\"SchSms\":\"0\",\"AlertSms\":\"0\",\"Temp\":null,\"GMTOffset\":\"-4\",\"SvrGMT\":\"4\",\"ClientType\":null,\"EnableNews\":\"0\",\"PublicSlideNews\":\"Welcome to NBH platform, Your National Bullion House ## We are glad to inform you that NBH A-Trader Application has been published, you can find the application using the following Keywords: NBH aTrader or NBH\",\"PrivateSlideNews\":\"Thanks for using our platform##We will inform you here with any private news\",\"DealerTreePriv\":1}"}

Rawan-HS
10-21-2015, 08:27 AM
Dear

the problem probably is from your code , if JSON object return as a success result so there no problem on it so check your login code .

gld1881
10-21-2015, 08:45 AM
ok lets check my program and guide me


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">


<head>


<title>Login</title>


<script src="http://code.jquery.com/jquery-latest.js"></script>


</head>


<script >


$(document).ready(function () {


var urlStr = "http://159.253.137.74/galaxydiamonds/WebService.svc";


jQuery.support.cors = true;


$("#progress").ajaxStart(function () { $(this).css("display", "block"); });


$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });


function onSuccessResult(response) {


response = eval('(' + response + ')')


if (response.UserId == -1 || response.UserId == -207) {


$("#resultData").html("Invalid username or password");


}


else if (response.UserId == -231) {


$("#resultData").html("You must have at least one account");


}


else if (response == null || response == "" || response.UserId < 0) {


$("#resultData").html("Error while login.Please try later");


}


else {


var resultStr = "SuccessResult ... UserId is :" + response.UserId + "<br/>";


resultStr += "DemoClient :" + response.DemoClient + " (if ClientType=0 then the Client Type is real . else if ClientType=1 then the Client Type is Demo) " + "<br/>"


resultStr += "IsReadOnly :" + response.isReadOnly + "<br/>"


resultStr += "Second Name :" + response.SName + "<br/>"


resultStr += "Third Name :" + response.TName + "<br/>"


$("#resultData").html(resultStr);


}


}


function onErrorResult(result) {


alert('Service call faild : ' + result.status + ' ' + result.statusText);


}


$("#btnLogin").click(function () {


$.ajax({


url: urlStr + "/Login",


data: { "username": $("#txtusername").val(), "password": $("#txtpassword").val() },


traditional: true,


crossDomain: true,


dataType: "jsonp",


success: onSuccessResult,


error: onErrorResult


});


});


});


</script>


<body >


<table border="1px">


<tbody>


<tr>


<td>


username: <input type="text" id="txtusername" value="support"/>


password: <input type="text" id="txtpassword" value="support"/>


<button id="btnLogin"> Login </button>


</td>


</tr>


</tbody>


</table>


<div id="resultData"> </div>


<div id="resultAction"> </div>


<div style="display:none" id="progress">Loading ... </div>


</body>


</html>

Hassan-HS
10-21-2015, 02:20 PM
Hello :)

I will check this issue and then i will update you.

Hassan-HS
10-22-2015, 01:58 PM
Hello :)


The samples on our knowledge-base is only working on VFX 10.5 system, so i write to you a sample using vb.net you can find it on the attachments.

gld1881
10-28-2015, 07:12 AM
The website is using php. this program can not be used in website.

Hassan-HS
10-29-2015, 06:34 AM
hello gld :)

we will update you soon please standby