Beispiel #1
0
        static void Main(string[] args)
        {
            /************************************Login***************************************************/
            WsLoginClient bOSLogin2 = new WsLoginClient();

            UserLogin2Request loginRequest = new UserLogin2Request
            {
                AWorkstationAK = "VTA.WKS19",
                AUserName      = "******",
                APassword      = "******"
            };

            UserLogin2Response response = bOSLogin2.UserLogin2(loginRequest);

            string login_response = response.@return;

            Console.WriteLine(login_response);


            goto Event;
            //goto Performance;
            //goto Save;
            //goto B2B;
            //goto Checkout;
            //goto Close;
            //goto Print;
            //goto Logout;

            /************************************Event***************************************************/

Event:

            WsAPIEventClient bosEvent = new WsAPIEventClient();

            FindAllEventsRequest  eventsRequest  = new FindAllEventsRequest();
            FindAllEventsResponse eventsResponse = bosEvent.FindAllEvents(eventsRequest);

            FINDALLEVENTSRESP fINDALLEVENTSRESP = eventsResponse.@return;

            string event_response = fINDALLEVENTSRESP.EVENTLIST.ToString();



            /************************************Performance***************************************************/

Performance:

            WsAPIPerformanceClient wsAPIPerformanceClient = new WsAPIPerformanceClient();

            SEARCHPERFORMANCEREQ sEARCHPERFORMANCEREQ = new SEARCHPERFORMANCEREQ();

            sEARCHPERFORMANCEREQ.EVENTAK  = "VTA.EVN3";
            sEARCHPERFORMANCEREQ.SELLABLE = true;
            SearchPerformanceRequest searchPerformanceRequest = new SearchPerformanceRequest(sEARCHPERFORMANCEREQ);

            SearchPerformanceResponse searchPerformanceResponse = wsAPIPerformanceClient.SearchPerformance(searchPerformanceRequest);

            SEARCHPERFORMANCERESP sEARCHPERFORMANCERESP = searchPerformanceResponse.@return;

            string performance_response = sEARCHPERFORMANCERESP.PERFORMANCELIST.ToString();


            /************************************Save account***************************************************/

Save:
            WsAPIAccountClient wsAPIAccountClient = new WsAPIAccountClient();


            Accounts.FIELDLISTFIELD[] fIELDLISTFIELDs = new Accounts.FIELDLISTFIELD[3];

            Accounts.FIELDLISTFIELD fIELDLISTFIELD1 = new Accounts.FIELDLISTFIELD();
            fIELDLISTFIELD1.OBJTYPE = 1;
            fIELDLISTFIELD1.VALUE   = "ironman";//firstname

            Accounts.FIELDLISTFIELD fIELDLISTFIELD2 = new Accounts.FIELDLISTFIELD();
            fIELDLISTFIELD2.OBJTYPE = 548;
            fIELDLISTFIELD2.VALUE   = "tony1234";//firstname


            Accounts.FIELDLISTFIELD fIELDLISTFIELD3 = new Accounts.FIELDLISTFIELD();
            fIELDLISTFIELD3.OBJTYPE = 549;
            fIELDLISTFIELD3.VALUE   = "avengers";//firstname



            fIELDLISTFIELDs[0] = fIELDLISTFIELD1;
            fIELDLISTFIELDs[1] = fIELDLISTFIELD2;
            fIELDLISTFIELDs[2] = fIELDLISTFIELD3;

            SAVEACCOUNTREQ sAVEACCOUNTREQ = new SAVEACCOUNTREQ
            {
                FIELDLIST     = fIELDLISTFIELDs,
                DMGCATEGORYAK = "VTA.DMGCAT29"
            };
            SaveAccountRequest saveAccountRequest = new SaveAccountRequest(sAVEACCOUNTREQ);

            SaveAccountResponse saveAccountResponse = wsAPIAccountClient.SaveAccount(saveAccountRequest);

            SAVEACCOUNTRESP sAVEACCOUNTRESP = saveAccountResponse.@return;

            string save_response = sAVEACCOUNTRESP.BASICINFO.ACCOUNTAK;

            /************************************B2B Login***************************************************/


B2B:
            B2BAccountLogInRequest b2BAccountLogInRequest = new B2BAccountLogInRequest
            {
                ADmgCatCode = "Guests",
                AUsername   = "******",
                APsw        = "Iambatma"
            };

            B2BAccountLogInResponse b2BAccountLogInResponse = wsAPIAccountClient.B2BAccountLogIn(b2BAccountLogInRequest);

            /************************************Checkout***************************************************/

Checkout:
            WsAPIOrderClient wsAPIOrderClient = new WsAPIOrderClient();


            CHECKOUTREQ cHECKOUTREQ = new CHECKOUTREQ();


            ITEMLISTITEM[] iTEMLISTITEMs = new ITEMLISTITEM[1];

            ITEMLISTITEMPERFORMANCE[] iTEMLISTITEMPERFORMANCEs = new ITEMLISTITEMPERFORMANCE[1];

            iTEMLISTITEMPERFORMANCEs[1].AK = "VTA.EVN4.PRF100";

            iTEMLISTITEMs[1].AK              = "VTA.EVN1.MCC28";
            iTEMLISTITEMs[1].QTY             = "1";
            iTEMLISTITEMs[1].PERFORMANCELIST = iTEMLISTITEMPERFORMANCEs;


            Orders.ACCOUNTSAVEBASE aCCOUNTSAVEBASE = new Orders.ACCOUNTSAVEBASE
            {
                AK = "99901920000019"
            };

            ORDERSTATUS oRDERSTATUS = new ORDERSTATUS
            {
                APPROVED  = true,
                PAID      = true,
                ENCODED   = true,
                VALIDATED = true,
                COMPLETED = true
            };


            RESERVATIONBASE rESERVATIONBASE = new RESERVATIONBASE
            {
                RESERVATIONOWNER = aCCOUNTSAVEBASE
            };

            cHECKOUTREQ.SHOPCART = new SHOPCART
            {
                ITEMLIST    = iTEMLISTITEMs,
                RESERVATION = rESERVATIONBASE,
                FLAG        = oRDERSTATUS
            };


            CheckOutRequest checkOutRequest = new CheckOutRequest(cHECKOUTREQ);

            CheckOutResponse checkOutResponse = wsAPIOrderClient.CheckOut(checkOutRequest);

            CHECKOUTRESP cHECKOUTRESP = checkOutResponse.@return;

            string checkout_response_sale_ak    = cHECKOUTRESP.SALE.AK;
            float  checkout_response_sale_gross = cHECKOUTRESP.SALE.TOTAL.GROSS;



            /************************************Close_order***************************************************/


Close:
            Orders.PAYMENTLISTBASEPAYMENTINFO[] pAYMENTLISTBASEPAYMENTINFOs = new Orders.PAYMENTLISTBASEPAYMENTINFO[1];

            pAYMENTLISTBASEPAYMENTINFOs[1].CODE   = "";
            pAYMENTLISTBASEPAYMENTINFOs[1].AMOUNT = checkout_response_sale_gross;



            CLOSEORDERREQ cLOSEORDERREQ = new CLOSEORDERREQ {
                AK = checkout_response_sale_ak,
                PAYMENTINFOLIST = pAYMENTLISTBASEPAYMENTINFOs,
            };

            CloseOrderRequest  closeOrderRequest  = new CloseOrderRequest(cLOSEORDERREQ);
            CloseOrderResponse closeOrderResponse = wsAPIOrderClient.CloseOrder(closeOrderRequest);

            CLOSEORDERRESP cLOSEORDERRESP = closeOrderResponse.@return;

            string close_order_sale_ak = cLOSEORDERRESP.SALE.AK;


            /************************************Print Ticket***************************************************/

Print:
            WsAPITicketClient wsAPITicketClient = new WsAPITicketClient();



            PrintPdfTicketRequest printPdfTicketRequest = new PrintPdfTicketRequest {
                ASaleAk = "VTA.WKS19.200527.SAL1" //VTA.WKS19.200527.SAL1
            };

            PrintPdfTicketResponse printPdfTicketResponse = wsAPITicketClient.PrintPdfTicket(printPdfTicketRequest);

            PRINTPDFTICKETRESP pRINTPDFTICKETRESP = printPdfTicketResponse.@return;

            byte[] pdf_string = pRINTPDFTICKETRESP.PDF;


            /************************************Logout***************************************************/

Logout:
            UserLogoutRequest userLogoutRequest = new UserLogoutRequest();

            UserLogoutResponse userLogoutResponse = bOSLogin2.UserLogout(userLogoutRequest);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("testing");

            Login.WsLoginClient LoginClient = new Login.WsLoginClient();

            WSDLPublish.WSDLPublishClient wSDLPublishClient = new WSDLPublish.WSDLPublishClient();

            WSDLPublish.GetWSDLForPortTypeRequest getWSDLForPortTypeRequest = new WSDLPublish.GetWSDLForPortTypeRequest();

            WSDLPublish.GetWSDLForPortTypeResponse getWSDLForPortTypeResponse = new WSDLPublish.GetWSDLForPortTypeResponse();

            Console.WriteLine(getWSDLForPortTypeResponse.@return);



            BOSLogin2.WsLoginClient bOSLogin2 = new BOSLogin2.WsLoginClient();

            //BOSLogin2.UserLoginRequest loginRequest = new BOSLogin2.UserLoginRequest
            //{

            //    AUserName = "******",
            //    APassword = "******"
            //};

            BOSLogin2.UserLogin2Request loginRequest = new BOSLogin2.UserLogin2Request
            {
                AWorkstationAK = "VTA.WKS19",
                AUserName      = "******",
                APassword      = "******"
            };

            //BOSLogin2.UserLoginResponse response = bOSLogin2.UserLogin(loginRequest);

            BOSLogin2.UserLogin2Response response = bOSLogin2.UserLogin2(loginRequest);

            string a = response.@return;

            Console.WriteLine(a);

            XmlDocument doc = new XmlDocument();

            doc.LoadXml(a);

            string json = JsonConvert.SerializeXmlNode(doc);

            ExecuteLogin();
            //  Execute();

            // ExecutePerformance();


            WsAPIAccountClient wsAPIAccountClient = new WsAPIAccountClient();



            List <FIELDLISTFIELD> fIELDLISTFIELD = new List <FIELDLISTFIELD>();

            FIELDLISTFIELD[] fIELDLISTFIELDs = new FIELDLISTFIELD[3];

            FIELDLISTFIELD fIELDLISTFIELD1 = new FIELDLISTFIELD();

            fIELDLISTFIELD1.OBJTYPE = 1;
            fIELDLISTFIELD1.VALUE   = "ironman";//firstname

            FIELDLISTFIELD fIELDLISTFIELD2 = new FIELDLISTFIELD();

            fIELDLISTFIELD2.OBJTYPE = 548;
            fIELDLISTFIELD2.VALUE   = "tony1234";//firstname


            FIELDLISTFIELD fIELDLISTFIELD3 = new FIELDLISTFIELD();

            fIELDLISTFIELD3.OBJTYPE = 549;
            fIELDLISTFIELD3.VALUE   = "avengers";//firstname



            fIELDLISTFIELDs[0] = fIELDLISTFIELD1;
            fIELDLISTFIELDs[1] = fIELDLISTFIELD2;
            fIELDLISTFIELDs[2] = fIELDLISTFIELD3;

            SAVEACCOUNTREQ sAVEACCOUNTREQ = new SAVEACCOUNTREQ {
                FIELDLIST     = fIELDLISTFIELDs,
                DMGCATEGORYAK = "VTA.DMGCAT29"
            };
            SaveAccountRequest saveAccountRequest = new SaveAccountRequest(sAVEACCOUNTREQ);


            //  SaveAccountResponse saveAccountResponse = wsAPIAccountClient.SaveAccount(saveAccountRequest);


            B2BAccountLogInRequest b2BAccountLogInRequest = new B2BAccountLogInRequest
            {
                ADmgCatCode = "Guests",
                AUsername   = "******",
                APsw        = "Iambatma"
            };

            B2BAccountLogInResponse b2BAccountLogInResponse = wsAPIAccountClient.B2BAccountLogIn(b2BAccountLogInRequest);



            WsAPIOrderClient wsAPIOrderClient = new WsAPIOrderClient();


            CHECKOUTREQ cHECKOUTREQ = new CHECKOUTREQ();


            ITEMLISTITEM[] iTEMLISTITEMs = new ITEMLISTITEM[1];



            //ITEMBASE iTEMBASE = new ITEMBASE {
            //AK = "VTA.EVN1.MCC28",
            //QTY ="1"
            //};



            //Order.PERFORMANCEBASE pERFORMANCEBASE= new Order.PERFORMANCEBASE {
            //AK = "VTA.EVN4.PRF100"
            //};

            // PRODUCTBASELISTPRODUCT

            //ITEMITEMPERFORMANCE[] iTEMITEMPERFORMANCE = new ITEMITEMPERFORMANCE[1];

            //iTEMITEMPERFORMANCE[1].AK = "VTA.EVN4.PRF100";

            ITEMLISTITEMPERFORMANCE[] iTEMLISTITEMPERFORMANCEs = new ITEMLISTITEMPERFORMANCE[1];

            iTEMLISTITEMPERFORMANCEs[1].AK = "VTA.EVN4.PRF100";

            iTEMLISTITEMs[1].AK              = "VTA.EVN1.MCC28";
            iTEMLISTITEMs[1].QTY             = "1";
            iTEMLISTITEMs[1].PERFORMANCELIST = iTEMLISTITEMPERFORMANCEs;

            //PERFORMANCE[] pERFORMANCEs = new PERFORMANCE[1];

            //pERFORMANCEs[1].AK = "VTA.EVN4.PRF100";



            //ITEM iTEM = new ITEM
            //{
            //   ITEMPERFORMANCELIST = iTEMITEMPERFORMANCE,


            //};



            Order.ACCOUNTSAVEBASE aCCOUNTSAVEBASE = new Order.ACCOUNTSAVEBASE
            {
                AK = "99901920000019"
            };

            ORDERSTATUS oRDERSTATUS = new ORDERSTATUS
            {
                APPROVED  = true,
                PAID      = true,
                ENCODED   = true,
                VALIDATED = true,
                COMPLETED = true
            };


            RESERVATIONBASE rESERVATIONBASE = new RESERVATIONBASE
            {
                RESERVATIONOWNER = aCCOUNTSAVEBASE
            };

            cHECKOUTREQ.SHOPCART = new SHOPCART
            {
                ITEMLIST    = iTEMLISTITEMs,
                RESERVATION = rESERVATIONBASE,
                FLAG        = oRDERSTATUS
            };


            CheckOutRequest checkOutRequest = new CheckOutRequest();



            WsAPIPerformanceClient wsAPIPerformanceClient = new WsAPIPerformanceClient();

            SEARCHPERFORMANCEREQ sEARCHPERFORMANCEREQ = new SEARCHPERFORMANCEREQ();

            sEARCHPERFORMANCEREQ.EVENTAK  = "VTA.EVN3";
            sEARCHPERFORMANCEREQ.SELLABLE = true;
            SearchPerformanceRequest searchPerformanceRequest = new SearchPerformanceRequest(sEARCHPERFORMANCEREQ);

            SEARCHPERFORMANCERESP sEARCHPERFORMANCERESP = wsAPIPerformanceClient.SearchPerformance(sEARCHPERFORMANCEREQ);

            Console.Write(sEARCHPERFORMANCERESP.PERFORMANCELIST);



            /*
             *
             *          Events2.WsAPIEventClient bosEvent = new Events2.WsAPIEventClient();
             *
             *          Events2.FindAllEventsRequest eventsRequest = new Events2.FindAllEventsRequest();
             *          //Events.FINDALLEVENTSRESP fINDALLEVENTSRESP = bosEvent.FindAllEvents(eventsRequest);
             *
             *          //Events2.FindAllEventsResponse eventsResponse = bosEvent.FindAllEvents(eventsRequest);
             *          Events2.FINDALLEVENTSRESP eventsResponse = bosEvent.FindAllEvents();
             */
            Events3.WsAPIEventClient bosEvent = new Events3.WsAPIEventClient();

            Events3.FindAllEventsResponse Response = Task.Run(async() => await bosEvent.FindAllEventsAsync().ConfigureAwait(false)).Result;
            Console.Write(Response);
            //Events2.FindAllEventsRequest eventsRequest = new Events2.FindAllEventsRequest();
            //Events.FINDALLEVENTSRESP fINDALLEVENTSRESP = bosEvent.FindAllEvents(eventsRequest);

            //Events2.FindAllEventsResponse eventsResponse = bosEvent.FindAllEvents(eventsRequest);
            //Events2.FINDALLEVENTSRESP eventsResponse = bosEvent.FindAllEvents();


            //Events.FINDEVENTSBYACCOUNTAKRESP eve = new FINDEVENTSBYACCOUNTAKRESP();
            //eve.FINDEVENTSBYACCOUNTAKRESPEVENTLIST =



            //Events.FindEventsByAccountAKResponse event_response = new Events.FindEventsByAccountAKResponse(eve);

            string r = ""; //[email protected]();

            // Events.FINDALLEVENTSRESPEVENTLIST esp = [email protected];

            //Console.WriteLine(r);

            XmlDocument docRE = new XmlDocument();

            docRE.LoadXml(r);

            string jsonRE = JsonConvert.SerializeXmlNode(docRE);

            BOSLogin2.UserLogoutRequest  logoutRequest  = new BOSLogin2.UserLogoutRequest();
            BOSLogin2.UserLogoutResponse logoutResponse = new BOSLogin2.UserLogoutResponse();


            string d = logoutResponse.ToString();

            Console.WriteLine(d);

            XmlDocument docR = new XmlDocument();

            docR.LoadXml(d);

            string jsonR = JsonConvert.SerializeXmlNode(docR);


            Console.WriteLine(LoginClient.UserLogin2("VTA.WKS19", "WebUser-01", "BOSweb123"));

            string b = LoginClient.UserLogin2("VTA.WKS19", "WebUser-01", "BOSweb123");
        }