Click here to Skip to main content
15,886,060 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Operation method for post method (Expense item is class) :

VB
WebInvoke(Method:="POST", UriTemplate:="CreateExpenseItem", RequestFormat:=WebMessageFormat.Json, ResponseFormat:=WebMessageFormat.Json, BodyStyle:=WebMessageBodyStyle.Bare) _
Function CreateExpenseItem(ByVal objExpense As ExpenseItem) As Integer

Implementation method :
VB
Public Function CreateExpenseItem(ByVal objExpense As ExpenseItem) As Integer Implements IHrmsService.CreateExpenseItem
        Dim Output As Integer
        Output = objEmployee.SaveExpenseDetails _
                                       ( _
                                               objExpense.ExpensemasterID,objExpense.ExpenseID, 
                                               objExpense.Expensename, _
                                               objExpense.ExpenseDate, _
                                               objExpense.Amount, objExpense.Description, _
                                               objExpense.EmpID _
                                       )
      Return Output
 End Function

It is throwing 400 error while using through url in code but Im able to use Get methods :

http://116.145.199.252/ServiceHRMS/HrmsService.svc/web/CreateExpenseItem

Please can anyone help me ..

What Im I doing wrong ?
Posted
Updated 2-May-14 1:49am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900