Skip to content

Instantly share code, notes, and snippets.

@cab1729
Created July 20, 2012 19:05
Show Gist options
  • Save cab1729/3152609 to your computer and use it in GitHub Desktop.
Save cab1729/3152609 to your computer and use it in GitHub Desktop.
C# Web Service Example
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using Customer.Services;
using Customer.Entity;
namespace CustomerWebServices
{
/// <summary>
/// Sample - expose a service layer object as a web service
/// </summary>
[WebService(Namespace = "http://customer.com/WebServices")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class WSGetAllLicensePermitBySSN : System.Web.Services.WebService
{
[WebMethod]
public EntityCollection<SearchResultEnt> GetAllLicensePermitBySNN(string ssn)
{
EntityCollection<SearchResultEnt> licperm =
ServiceFactoryAccess.LicensePermitService
.GetAllLicensesPermitsBySSN(new UserEntity(), ssn);
return licperm;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment