Folks,
here is my technical issue. Let me know if you have some solution.
The problem is: it is not possible to do POST with JSONP. Since there is bowser URL restriction with using GET with JSONP, we actually wanted to go for POST with JSONP. There are some complex solutions mentioned in Internet, but i am not sure if they are recommended. For example, I want to have following web method as POST method (instead of GET method) since otherwise it exceeds URL limit of 2000 chars in IE. Note that this method is made small by allowing it to contain only few arguments.
[OperationContract]
[Description("Accepts input profile values and returns back insert status as true or false.")]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped, Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "InsertProfileDetails")]
bool InsertProfileDetails(string AuthToken,
int Caste_Id, Boolean IsCasteNoBar, char Gender, int Age, int Height, string Complexion, string Marital_Status, int Religion_Id, int MotherTongue_Id, string Profile_Description,
string Education_Level,
DateTime Dob,
string Profile_FirstName, string Profile_LastName, string Address_Line1, string City, string State, int Country_Id, string ContactEmail, string CellPhonePrimary, string HomePhoneSecondary, string WorkPhoneOptional,
string EmploymentSector, string Profession,
int Min_Age, int Max_Age, int Min_Height, int Max_Height, string Religion_Ids, string Caste_Ids, string MotherTongue_Ids, string Education_Levels
);
The only option l could think of, considering the limitations, is to have small form submissions (multiple forms in case of 'create profile' user scenario) which in turn call smaller GET web methods. And on server side commit the forms data to database only after receiving all small forms data. we should associate all small forms of user on server-side by using some Guid sent from client during each form request.
Let me know your thoughts. Appreciate your time reading my post.
Thanks, Pullet