TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Thakerng Kruabkonto
NA
91
1.6k
How to calling webmethod by conventional javascript?
Aug 5 2019 11:28 AM
I have modified c# .net code like this.
1.a webmothod in some_name.asmx
[WebMethod]
public string WsGetBasicPremiumStandard(
string sGACode, string sVehicleType, string sInsurePlan, string sCC, string sKilo, string sSeat,
string sMake, string sModel, string sCarAge, string sIsCombine, string sEffDate, string sExpDate,
string sMakeModelCount, string userid, string channel, string sOwnDamage, string sDeduct,
string sTypeOfDriver, string sIsAccessory, string sSpecialPlan, string sDeductPD, string YearReg,
string policyType, string sInsureType, string sGroupOfPlan, string agentCode, string MLM_MemberNO,
string sBatchType, string registerNo, string chassisNo, string planVAO, string replacePolicy,
bool PhotoFeeFlag, bool violenceFlag, bool cctvFlag, string coverageRY,string Pr)
{
...
..
}
I modified this method by add "string Pr" parameter.
2.I have called this webmethod from CallService.js as below.
some_name.WsGetBasicPremiumStandard(
sGACode, sVehicleType, sPackage, sCC, sKilo, sSeat, sMake, sModel, sCarAge, sIsCombine,
sEffDate, sExpDate, sMakeModelCount, userid, channel, OwnDamage, Deduct, TypeOfDriver,
sIsAccessory, sSpecialPlan, sDeductPD, sYearReg, sProductType, sInsureType, sGroupOfPlan,
agentCode, MLM_MemberNO, sBatchType, registerNo, chassisNo, planVAO, replacePolicy,
PhotoFeeFlag, violenceFlag, cctvFlag, coverageRY, "N",
onLoadSuccess, onLoadError)
I pass value "N" for "Pr" parameter but i get error
Sys.Net.WebServiceFailedException: The server method 'WsGetBasicPremiumStandard' failed with the following error: System.InvalidOperationException-- Invalid web service call, missing value for parameter: 'Pr'.
anybody help me?
thank forward.
Thakerng.
Reply
Answers (
1
)
Unable to get the response from the GetDataSetResultAsync
Implement basic authentication in Swagger