Tuesday, December 11, 2012

Consuming webMethods WSD in C#.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace TANFWorkSearch
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var ws = new TANFWorkSearchWSD.TANFWorkSearch();


            TANFWorkSearchWSD.WorkSearchOut wsInput = new TANFWorkSearchWSD.WorkSearchOut();


            DateTime dateTime = DateTime.Now;
            TANFWorkSearchWSD.SGData sgData = new TANFWorkSearchWSD.SGData();
            sgData.RequestEnvironment = TANFWorkSearchWSD.RequestEnvironment.C;
            sgData.RequestTimeStamp = dateTime;
            sgData.Caller = TANFWorkSearchWSD.Caller.C;
            sgData.ServiceVersion = "serviceVersionPlaceHolder";


            TANFWorkSearchWSD.BusinessData businessData = new TANFWorkSearchWSD.BusinessData();


            TANFWorkSearchWSD.Individual individual = new TANFWorkSearchWSD.Individual();
            double recID=12.30;
            individual.RecipientID = recID.ToString();
            individual.FirstName = "firstName";
            individual.LastName = "lastName";
            individual.MiddleInitial = "Middle";
            individual.DOB =dateTime;
            individual.SSN = "1234";
            individual.BeginDate = dateTime;
            individual.EndDate = dateTime;
            individual.UserID = "1234";
            individual.ParticipantID = "1234";


            ws.GetWorkSearchInfo(wsInput);


        }
    }
}

No comments:

Post a Comment