コード例 #1
0
ファイル: Client.cs プロジェクト: bsnyder/wrox-pix-web
    public static void Main( )
    {
        PixUser user = new PixUser();

        Affiliate aff = new Affiliate();

        user.userName ="******";
        user.password ="******";
        user.email = "*****@*****.**";
        user.firstName ="net";
        user.lastName = "user";

        aff.userName ="******";
        aff.password ="******";
        aff.email = "*****@*****.**";
        aff.firstName = "net";
        aff.lastName = "affiliate";
        aff.websiteURL = "http://netaffiliate.org";
        aff.companyName = "dummyaff";

        AffiliateManagmentServiceImpl proxy = new AffiliateManagmentServiceImpl();

        WriteMessage("Invoking Affiliate Management  Web Service.");
        try
        {

         //Registered Affiliate
         proxy.enrollAffiliate(aff);
         	 WriteMessage("Registered affiliate " + aff.companyName);

         proxy.enrollUserViaAffiliateWebSite(user,aff);
         	 	 WriteMessage("Enrolled user " + user.userName);

        }
        catch(Exception e)
        {Console.WriteLine("Threw general exception: {0}", e);}
    }
コード例 #2
0
    public static void Main( )
    {
        PixUser user = new PixUser();

        Affiliate aff = new Affiliate();

        user.userName  = "******";
        user.password  = "******";
        user.email     = "*****@*****.**";
        user.firstName = "net";
        user.lastName  = "user";

        aff.userName    = "******";
        aff.password    = "******";
        aff.email       = "*****@*****.**";
        aff.firstName   = "net";
        aff.lastName    = "affiliate";
        aff.websiteURL  = "http://netaffiliate.org";
        aff.companyName = "dummyaff";

        AffiliateManagmentServiceImpl proxy = new AffiliateManagmentServiceImpl();


        WriteMessage("Invoking Affiliate Management  Web Service.");
        try
        {
            //Registered Affiliate
            proxy.enrollAffiliate(aff);
            WriteMessage("Registered affiliate " + aff.companyName);

            proxy.enrollUserViaAffiliateWebSite(user, aff);
            WriteMessage("Enrolled user " + user.userName);
        }
        catch (Exception e)
        { Console.WriteLine("Threw general exception: {0}", e); }
    }