Consume Web Service

Published on July 2016 | Categories: Documents | Downloads: 24 | Comments: 0 | Views: 131
of 3
Download PDF   Embed   Report

Comments

Content

How to consume Web-Service in ASP.NET ? 1. Host Web-Service on Server. 2. Right-Click on your web project and then right click on references and select “Add service Reference”. 3. Then click on “Advanced” button. 4. After that click on “Add Web Reference ”. 5. After that browse your webservice with availabel options : a. Web services in this solution : i. Select if your web service reside in web project solution. b. Web services on the local machine : i. Select if your web service reside outside web project solution. When click on above options , it will automatically find your web service from your system. 6. 7. 8. 9. After click on above option , you will get service(s) availabel in web service. You will also find URL property to consume web service. Now you are ready to work with Web Service. Open web service in URL and consume it.

WebService contains 3 methods: 1. GetVolunteerByCompany : This method will provide Company Volunteer Data by passing companyID, startDate, endDate. Parameters : companyID : CompanyID of company whose volunteer data you want. startDate : Start Date Range endDate: End Date Range 2. GetVolunteerByLogin : This method will provide Company Volunteer Data by passing login, password, startDate, endDate. Parameters : login : Login Name of User password : Password of User startDate : Start Date Range endDate: End Date Range 3. VerifyLogin : This method will verify user login details , on login failure it will return 0 and on success it will return CompanyID of login User which will used in GetVolunteerByCompany method. Parameters : login : Login Name of User password : Password of User

4. LoginCompanyDetail : This method is get company details like as company name and company id by companyId .which is user for display name of company.this method is work successfully then return companymodel class object otherwise return null object. Parameters : CompanyId : CompanyId for Login User 5. DeleteVolunteerDetail :This method is physical delete volunteer details in table base by volunteered.it will success then return 1 otherwise return 0; Parameters : VolunteerId : delete volunteer details Id from volunteer table. 6. UpdateVolunteerDetail :This method is use for update volunteer details in database base by volunteer Id ,it will return 1 then success and return 0 then fail.it is update information of firstname, Lastname, email, phone, address1, address2, city, state,country in volunteer table Parameters : Volunteer : it is VolunteerModel object 7. DeleteEmailDetail: This method is physical delete Email details in table base by EmailId.it will success then return 1 otherwise return 0; Parameters : EmailId : delete email details Id from Email table.

8. UpdateEmailDetail :This method is use for update email details in database base by EmailId ,it will return 1 then success and return 0 then fail.it is update information of firstname, Lastname, email, in Email table Parameters : EmailId : EmailId for update email details FirstName: First Name of Email LastName :Last Name of Email Email : Email Addeess of Email 9. GetEmailByCompany : This method will provide Company Email Data by passing companyID, startDate, endDate. Parameters : companyID : CompanyID of company whose Email data you want. startDate : Start Date Range endDate: End Date Range 10.GetAllStateDetails:This method will provide all state data from State table in database 11.GetAllCountryDetails:This method will provide all Country data from Country table in database

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close