web services main

Post on 31-Oct-2015

41 views

Category:

Documents


0 download

TRANSCRIPT

  • web v 0.11 web (Alexander Litvinenko)

  • web v 0.11

    2

    1. .............................................................................................................................................. 4 2. web . ................................................................ 5 2.1. . .................................................................................................. 6 2.2. . ................................................................................................................... 7 2.3. . ............................................................................................................................. 9 2.4. EDBO. ....................................................................................................................... 10 2.5. . .................................................................................................................................... 11 2.5.1. . ........................................................................................................... 11 2.6. . ................................................................................................................ 13 2.7. ................................................................................................................... 15 2.7.1. - ........................................................................................ 15 2.7.1.1. - . .................................................................. 15 2.7.1.2. . ..................................................... 16 2.7.2. .................................................................................................... 17 2.7.3. . ........................................................ 17 2.7.3.1. . ............................................................................................. 17 2.7.3.2. .......................... 18 2.8. ............................................................................................... 20 2.8.1. . ................................................................................................... 20 2.8.2. ............................................................................................................................................. 20 2.9. .............................................................................................................................. 21 2.9.1. . ............................................................................................................ 21 2.9.2. . ..................................................................................................... 21 2.9.3. . ................................................................................................................ 22 3. ............................................................................................................................................. 23 3.1. . ....................................................................................................................... 23 3.1.1. ........................................................................................................................ 23 3.1.2. ................................... 23 3.1.3. ............................. 24 3.1.4. . ...................... 25 3.2. .................................................................... 26 3.2.1. .............................................................................................................. 26 3.2.2. ......................................................................................................................... 26 3.3. . ........................................................................................ 27 3.3.1. (). ................................................... 27 3.3.2. () () .................................................................................................................................................... 27 3.3.3. ..................................................................................................... 28 3.3.4. () .......................................................................................................... 28 3.3.5. ......................................................................................................... 29 3.3.6. ........................................................................................... 29 3.3.7. . ................................................................... 29 3.3.8. . ....................................................... 29 4. . .......................................................................................................... 30 5. . ................................................................................................................................. 31 6. . ........................................................................................................................... 33 7. . ............................................................................................................................................ 34 7.1. PHP ...................................................................................................................................................... 34 7.2. C# (Framework 2.0, WinForm) ............................................................................................................ 35 8. ........................................................................................................ 37

    0.11 ............................................................................................................................................. 37

  • web v 0.11

    3

    0.10 ............................................................................................................................................. 37 0.9 ............................................................................................................................................... 37 0.8 ............................................................................................................................................... 37 0.7 ............................................................................................................................................... 37 0.6 ............................................................................................................................................... 37 0.5 ............................................................................................................................................... 37 0.4 ............................................................................................................................................... 38 0.3 ............................................................................................................................................... 38 0.2 ............................................................................................................................................... 38 0.1 ............................................................................................................................................... 38

  • web v 0.11

    4

    1.

    (

    ) web ,

    , ,

    .

    , ,

    . .

    web .

    1. http://test.edbo.gov.ua:8080/EDBOGuides/EDBOGuides.asmx - web

    EDBO. web

    Manual_EDBOGuides.pdf.

    2. http://test.edbo.gov.ua:8080/EDBOPerson/EDBOPerson.asmx- web

    (, ..). web

    Manual_EDBOPerson.pdf.

    web SOAP (Simple Object Access Protocol).

    SOAP

    XML.

    , ..

    http://forum.edbo.gov.ua/

    http://test.edbo.gov.ua/EDBOCLientW/ web

    .

  • web v 0.11

    5

    2. web .

    web ,

    , .

    web web :

    1. .

    2. .

    web , :

    Login .

    Logout .

    ChangePassword .

    LanguagesGet .

    GlobaliInfoGet EDBO

    GetLastError .

    web .

    .

    Manual_EDBOGuides.pdf Manual_EDBOPerson.pdf..

  • web v 0.11

    6

    2.1. .

    (

    , ). ( )

    , ,

    .

    :

    Int ,

    . , 1 2 -

    .

    GUID uniqueidentifier -

    (

    ).

    , GUID 00000000-0000-

    0000-0000-000000000000 (, 2E0B9E77-E6F3-473F-B917-0526E435939B).

    String ,

    .

    , , .

    , , .

    , ,

    .

  • web v 0.11

    7

    2.2. .

    web

    .

    Int . Add, Edit, Del.

    String , Login.

    Array , Get.

    Nil Get

    .

    Array.

    .NET web

    GET.

    , LanguagesGet .

    public class dLanguages { public int Id_Language { get; set; } public string Code { get; set; } public string NameLanguage { get; set; } }

    LanguagesGet List (

    dLanguages).

    , SOAP

    XML. , LanguagesGet

    :

    -

    -

    1

    UK

    -

    2

    RU

    -

    3

    EN

    English

  • web v 0.11

    8

    , .

    web .

    Get null (Nil) return

    . XML :

    GetLastError.

  • web v 0.11

    9

    2.3. .

    web EDBO .

    1. , web .

    2. , .

    3. web .

    web EDBO.

    , web EDBO.

    web , , .

    web

    , , (,

    UniversityFacultetAdd 0). web

    , .

    ,

    , GetLastError,

    .

    .

    ( )

    100-198 , ( ) .

    199 web .

    200 , .

    1000-1999 web .

  • web v 0.11

    10

    2.4. EDBO.

    web Login

    GUID . GUID

    , web

    .

    .

    , ,

    ClearPreviewSession .

    , 30

    .

  • web v 0.11

    11

    2.5. . web

    .NET SOAP HTTP POST

    .

    , Login

    http://193.23.225.254/EDBOCommon/EDBOCommon.asmx?op=Login

    SOAP 1.1 SOAP 1.2

    HTTP POST.

    web .

    web ,

    ( ) web . :

    SessionGUID - GUID , web .

    .

    Id_Language , ,

    EDBO.

    .

    1 .

    ActualDate . EDBO

    ,

    .

    .. ::. UniversityFacultetsGet

    ActualDate 25.06.1975 04:00:00 .

    2.5.1. . , .

    web

    .

    ,

    .

    , .

    ~###~###~###

    Type .

    Value .

  • web v 0.11

    12

    ,

    . .

    .

    , Get

    .

    Get1.

    Id_Get 55,56,57

    : ~1#55#56#57

    Id_Get 41,42,43 Id_GetGroup 101

    :

    ~1#41#42#43~2#101

    Id_Get 41,42,43, Id_GetGroup, 01-01-2012

    : ~1#41#42#43~2#101~3#2012-01-01 00:00:00

    Id_Get 41,42,43, Id_GetGroup, 01-01-2012

    * : ~1#41#42#43~2#101~3#2012-01-01 00:00:00~4#*

    Id_Get 41,42,43, *

    :

    ~1#41#42#43~4#*

    ~1#41#42~4#*~1#43

    1 Id_Get

    2 Id_GetGroup

    3 Id_Get

    -- ::

    4

  • web v 0.11

    13

    2.6. .

    ,

    .

    - .

    -

    .

    ,

    1 .

    .

    Web Web

    EDBOGuides

    LanguagesGet EDBOGuides, EDBOPerson

    KOATUUGet, KOATUUGetL1, KOATUUGetL2, KOATUUGetL3

    EDBOGuides

    EducationTypesGet EDBOGuides

    StreetTypesGet EDBOGuides

    SpecRedactionsGet EDBOGuides

    UniversityAcreditatinTypesGet EDBOGuides

    UniversityGetCurentRequestSeason EDBOGuides

    . UniversitiesGet EDBOGuides

    . UniversityFacultetsGet EDBOGuides

    . UniversityFacultetSpecialitiesGet EDBOGuides

    SubjectsGet EDBOGuides

    BenefitsGet EDBOGuides

    UniversityCoursesGet EDBOGuides

    SpecDirectionsSubjectsGet EDBOGuides

    QuotasGet EDBOGuides

    UniversityCoursesGet EDBOGuides

    EDBOPerson

    PersonSexTypesGet EDBOPerson

    PersonContactTypesGet EDBOPerson

    PersonDocumentTypesGet EDBOPerson

    PersonEducationTypesGet EDBOPerson

    PersonEducationFormsGet EDBOPerson

    . PersonRequestSeasonsGet EDBOPerson

    PersonRequestExaminationCausesGet EDBOPerson

    PersonRequestStatusTypesGet EDBOPerson

  • web v 0.11

    14

    PersonEnteranceTypesGet EDBOPerson

  • web v 0.11

    15

    2.7. ( )

    .

    2.7.1. - , .

    PersonEntrantAdd

    .

    PersonEntrantAutoAdd .

    , , .

    .

    2.7.1.1. -

    . ,

    .

    PersonEntrantAdd web EDBOPerson.

    .

    :

    Resident 0 ( ) 1 ().

    KOATUUCode 0000000000 Adress

    .

    Adress .

    KOATUUCode .

    .

    0000000000

    Id_StreetType .

    Adress .

    .

    HomeNumber .

    , . , .

    (, ).

    AttestatSeries, AttestatNumber, AttestatDate .

    . ,

    .

    .

  • web v 0.11

    16

    AttestatValue . .

    2 . :

    /

    , ..

    .

    (Kode_School),

    .

    . - (

    PersonEntrantAdd PersonEntrantAutoAdd)

    .

    ,

    GUID .

    .

    2.7.1.2.

    . , , , . . 2011 . PersonEntrantAutoAdd web EDBOPerson.

    . :

    .

    .

    .

    .

    .

    .

    ( 2011 ).

    .

    (, , ).

    (, , , ).

  • web v 0.11

    17

    (Kode_School),

    ( 2011

    )

    ( ).

    ( PersonEntrantAdd

    PerosnEntrantAutoAdd ) -

    .

    ,

    GUID .

    .

    2.7.2.

    .

    PersonDocumentsZnoAdd web EDBOPerson.

    PersonDocumentsZnoAdd Id_Person,

    (, , ).

    .

    PersonDocumentsZnoAdd

    . web

    PersonDocumentsZnoAdd (

    ) .

    2.7.3.

    .

    2.7.3.1. . A. , ,

    PersonsFind, (

    ).

    D. B.

  • web v 0.11

    18

    B. PersonsFind

    .

    , D. C.

    C. , .

    D.

    D. , Person*Get.

    E.

    E. (,

    , , ..) ,

    . F.

    F. (

    5 3 )

    PersonRequestCheckCanAdd. G.

    G. .

    (

    )

    2.7.3.2.

    . N

    .

    PersonDocumentsZnoAdd. .

    A. , PersonsFind,

    (

    ). .

    B.

    B. PersonsFind

    .

    , . ,

    C.

    C. PersonDocumentsZnoAdd.

  • web v 0.11

    19

  • web v 0.11

    20

    2.8.

    .

    1. -

    2. , .

    .

    , BenefitsGet web EDBOGuides.

    (2) (1).

    PersonBenefitsAdd

    .

    2.8.1. .

    .

    .

    , , ,

    (

    OlympiadsAwardsGet web EDBOGuides).

    ,

    .

    , .

    2.8.2.

    .

    .

    ,

    . , , , ,

    ,

    .

  • web v 0.11

    21

    2.9. , .

    2.9.1. . .

    A.

    , ,

    , ( B). , ,

    ,

    , , .

    B. ,

    PersonRequestCheckCanAdd ,

    . .

    C. PersonRequestAdd,

    . D.

    D. (

    PersonRequestAdd), ,

    PersonRequestQuotas*.

    2.9.2. . .

    .

    .

    A. (1)

    , (8) .

    (9).

    B.

    UniversityFacultetsGetRequests

    B. () (4)

    (2). (9)

    .

    (3). (3)

    5/3. 4 .

    C. () (4) .

    (5) (6).

    5 D. (6)

    (5).

    D. (5)

    (7)

  • web v 0.11

    22

    Id_PersonRequestStatusType

    , .

    . - .

    -

    1 (2), (3), (4), (9)

    2 (4) 3 5/3. ( 8) ( 1) 4 (5), (6), (2) 5 (7), (6) 6 (5) 7 . 8 , (2), (3), (4),

    (9)

    9 (2), (3), (4)

    ,

    PersonRequestsStatusesGet.

    2.9.3. .

    ( )

    .

    .

    ()

    .

    UniversityFacultetSpecialitiesSubjectsGet web EDBOGuides.

    PersonRequestExaminationsAdd web EDBOPerson.

    PersonRequestExaminationsValueChange.

    PersonRequestExaminationsGet.

  • web v 0.11

    23

    3. .

    3.1. . :

    .

    .

    .

    .

    .

    3.1.1. . PersonEntrantAdd

    PersonEntrantAddFromString.

    web EDBOPersons. , , ,

    ..

    , .

    ,

    ,

    (, , , )

    .

    ,

    . , PersonsFind

    . 2

    3.1.2.

    ( )

    , .

  • web v 0.11

    24

    3.1.3.

    ,

    .

    , .

    , , ,

    .

    ,

    ( )

    .

    web . ,

    .

    , .

    PersonEducationsAdd.

    Id_PersonEducationHistoryType (

    PersonEducationHistoryTypesGet):

    10 ( ).

    .

    15 . .

    20 . .

    50 . .

    61 .

    .

    .

    Id_PersonEducationForm .

    PersonEducationDateBegin .

    Id_PersonEducationPaymentType

    SpecCode , . SpecGet. () . , , SpecCode 5.06010105

  • web v 0.11

    25

    Id_PersonEducationHistoryType ,

    PersonEducationHistoryDateBegin Id_PersonEducationHistoryType. , .

    Id_Qualification .

    Id_Course

    Id_AcademicYear . , ,

    Id_PersonEducationHistoryOrders , . 3.2.1.

    Id_PersonDocument , .

    :

    .

    . ,

    .

    (

    Id_PersonEducation)

    .

    PersonEducationsStatusChange*

    . 3.3

    3.1.4.

    . .

    PersonsStudentsGrupsGet ,

    , ,

    , , ()

    PersonsStudentsGrupsPersonsGet .

  • web v 0.11

    26

    PersonsStudentsGrupsPersonsFind .

    PersonEducationsGet (

    )

    PersonEducationHistoryGet

    .

    3.2.

    , .

    3.2.1.

    .

    .

    PersonEducationHistoryOrdersGet

    PersonEducationHistoryOrdersAdd

    PersonEducationHistoryOrdersEdit .

    PersonEducationHistoryOrdersDel .

    PersonEducationHistoryOrdersStatusChange .

    PersonEducationHistoryOrdersDataGet

    .

    ( PersonEducationHistoryType)

    (

    PersonEducationHistoryTypesGet).

    . ,

    110 .

    , ,

    - .

    3.2.2. .

    UniversityGroupsAdd

  • web v 0.11

    27

    UniversityGroupsEdit

    UniversityGroupsDel

    UniversityGroupsGet .

    .

    , , , ,

    .

    . ,

    .

    3.3. .

    (

    PersonEducationAdd)

    PersonEducationsStatusChange*.

    3.3.1.

    ().

    PersonEducationsStatusChangePaymentType

    .

    Id_PersonEducationHistoryType =12 .

    :

    .

    3.3.2.

    ()

    () ()

    PersonEducationsStatusChangeMove :

  • web v 0.11

    28

    Id_PersonEducationHistoryType = 14 .

    :

    .

    3.3.3.

    PersonEducationsStatusChangeSetGroups.

    .

    .

    :

    .

    3.3.4. () ()

    PersonEducationsStatusChangeCancelEducation. ()

    Id_PersonEducationHistoryType = 110 .

    :

  • web v 0.11

    29

    3.3.5. ()

    PersonEducationsStatusChangeRenewal. ()

    Id_PersonEducationHistoryType = 20 .

    , .

    3.3.6.

    PersonEducationsStatusChangeAcademicLeaveTo. ()

    Id_PersonEducationHistoryType = 60

    .

    :

    .

    3.3.7.

    .

    PersonEducationsStatusChangeAcademicLeaveFrom. ()

    Id_PersonEducationHistoryType = 61 .

    ,

    3.3.8.

    . , ,

    PersonEducationsHistoryLastDel.

    . , , .

    ( ),

    .

    ,

    .

  • web v 0.11

    30

    4. .

    web

    /.

    .

    :

    .

    ,

    , , .

    , ,

    .

    ,

    .

    , .

  • web v 0.11

    31

    5. . .

    ()

    GUID

    SessionGUID string Login

    Id_Language int LanguagesGet

    KOATUUCode string KOATUUGet

    . ( )

    Id_KOATUU int KOATUUGet

    Id_EducationType int EducationTypesGet

    Id_StreetType int StreetTypesGet

    Id_SpecRedactions int SpecRedactionsGet

    GUID

    SpecCode string SpecGet

    GUID

    SpecIndastryCode string SpecGet

    GUID

    SpecDirectionsCode string SpecGet

    GUID

    SpecSpecialityCode string SpecGet

    GUID

    SpecScecializationCode string SpecGet

    GUID Kode_School string SchoolsGet

    Id_UniversityAcreditatinType int UniversityAcreditatinTypesGet

    GUID . UniversityKode string UniversitiesGet

    , .

    Id_University int UniversitiesGet

    GUID

    UniversityFacultetKode string UniversityFacultetsGet

    , .

    Id_UniversityFacultet int UniversityFacultetsGet

    GUID

    UniversitySpecialitiesKode string UniversityFacultetSpecialitiesGet

    .

    Id_UniversitySpecialities

    int UniversityFacultetSpecialitiesGet

  • web v 0.11

    32

    Id_Benefit int BenefitsGet

    Id_BenefitGroup int BenefitsGet

    Id_UniversityCourse int UniversityCoursesGet

    GUID

    UniversityCourseCode string UniversityCoursesGet

    GUID

    PersonCodeU

    string PersonsFind

    Id_PersonSex int PersonSexTypesGet

    Id_PersonContactType int PersonContactTypesGet

    Id_PersonContact

    int PersonContactsGet

    Id_PersonAddress int PersonAddressesGet

    Id_PersonDocumentType int PersonDocumentTypesGet

    .

    Id_PersonDocument int PersonDocumentsGet

    .

    Id_PersonEducationType int PersonEducationTypesGet

    .

    Id_PersonEducationForm int PersonEducationFormsGet

    Id_PersonEducation int PersonEducationsGet

    .

    Id_PersonRequestSeasons int PersonRequestSeasonsGet

    .

    Id_PersonRequest int PersonRequestsGet

    .

    Id_PersonRequestStatusType int PersonRequestStatusTypesGet

    . .

    Id_Person int PersonsFind

    Id_Subject int SubjectsGet

    Id_PersonBenefit int PersonBenefitsGet

  • web v 0.11

    33

    6. .

    6.1. , http://test.edbo.gov.ua

    , , .

    ,

    .

    .

    6.2. ,

    .

    6.3. .

  • web v 0.11

    34

    7. .

    web

    GetLanguage.

    7.1. PHP buildObject($value); break; } } if(is_integer($key)){ $res[] = $this->buildObject($value); } } } else { $res = $data; } if(is_array($res) && count($res) == 1) $res = $res[0]; return $res; } public function invoke($method, $params){ try{ $invs = $this->soapClient->__soapCall($method, array($params)); $sresult = $invs->{$method."Result"}; $res = $this->buildObject($sresult); return $res; }catch(Exception $e){

  • web v 0.11

    35

    print "Exception in try call method $method\n"; print "Parameters:\n"; print_r($params); print "\n"; throw $e; } } public function __construct(){ global $soapClient; $this->soapClient = $soapClient; } } global $soap; $soap = new Soap(); $sessionId = $soap->invoke("Login", array("User" => "user", "Password" => "123456", "ClearPreviewSession" => 1, "ApplicationKey" =>"" )); if(preg_match("/([a-f\\d]{8})-([a-f\\d]{4})-([a-f\\d]{4})-([a-f\\d]{4})-([a-f\\d]{12})/i", $sessionId)){ $languages = $soap->invoke("LanguagesGet", array("SessionGUID" => $sessionId)); print_r($languages); } else print $sessionId; ?>

    7.2. C# (Framework 2.0, WinForm) web reference EDBOGuide web

    http://193.23.225.254/EDBOGuides/EDBOGuides.asmx

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Web.Services.Description; using TestEDBOWebService.EDBOGuide; namespace TestEDBOWebService { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button_Start_Click(object sender, EventArgs e) { EDBOGuides eg = new EDBOGuides(); string GUIDSession = eg.Login("user", "123456", 1, ""); Guid gSession =new Guid(); try { gSession =new Guid(GUIDSession); } catch (Exception) {

  • web v 0.11

    36

    MessageBox.Show(GUIDSession); } try { dLanguages[] lang = eg.LanguagesGet(gSession.ToString()); if (lang==null) { dLastError[] er=eg.GetLastError(gSession.ToString()); throw new Exception("Error code: "+er[0].LastErrorCode.ToString()+". "+er[0].LastErrorDescription); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }

  • web v 0.11

    37

    8.

    0.11 3.

    0.10 2.5.1 .

    0.9 web EDBOPerson v0.15.

    0.8 .

    0.7 .

    .

    0.6

    .

    SpecDirectionsSubjectsGet EDBOGuides

    QuotasGet EDBOGuides

    UniversityCoursesGet EDBOGuides

    PersonRequestExaminationCausesGet EDBOPerson

    PersonRequestStatusTypesGet EDBOPerson

    PersonEnteranceTypesGet EDBOPerson

    0.5 .

    .

    .

    BenefitsGet EDBOGuides

    UniversityCoursesGet EDBOGuides

  • web v 0.11

    38

    Id_Benefit int BenefitsGet

    Id_BenefitGroup int BenefitsGet

    Id_UniversityCourse int UniversityCoursesGet

    GUID

    UniversityCourseCode string UniversityCoursesGet

    Id_PersonBenefit int PersonBenefitsGet

    0.4 .

    SubjectsGet EDBOGuides

    . .

    Id_Person int PersonsFind

    Id_Subject int SubjectsGet

    EducationTypesGet EDBOGuides

    0.3 PHP

    C# (Framework 2.0 WinForm)

    0.2 3. .

    4. .

    0.1