Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

В данной задаче моды достаточно просто активировать, настройку производить нет необходимости сверх базовых настроек SSO-портала.

Необходимо активировать моды:МОД Интеграция с SSO (ModSSOService)- для обеспечения возможности перехода из SAP и передачи параметров заявки

...

Детальный маршрут для SSO - для передачи и контроля целостности участков маршрута

...

.

Web Services

В данной задаче используется стандартный веб-сервис SSO:

http://test.sso.corteos.ru/Documentation/GeneralWebService (для тестовой среды)

https://prd.sso.corteos.ru/Documentation/GeneralWebService ((для продуктивной среды)

Сценарий использования

При переходе при помощи SSO, мы инициализируем запрос при помощи следующих данных:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sso="https://sso.corteos.ru/">
   <soapenv:Header/>
   <soapenv:Body>
      <sso:Set>
         <sso:request>
            <sso:OuterId>2000000171</sso:OuterId>
			<sso:CustomRoute>
				<sso:RoutePart>
					<sso:DateDepart>2020-12-14</sso:DateDepart>
					<sso:Origin>Москва</sso:Origin>
					<sso:Destination>Санкт-Петербург</sso:Destination>
					<sso:DepartureAdvanceShiftDays>1</sso:DepartureAdvanceShiftDays>
					<sso:DeparturePostShiftDays>1</sso:DeparturePostShiftDays>
					<sso:ReturnAdvanceShiftDays>0</sso:ReturnAdvanceShiftDays>
					<sso:ReturnPostShiftDays>0</sso:ReturnPostShiftDays>
					<sso:BookingSequence>1</sso:BookingSequence>
				</sso:RoutePart>
				<sso:RoutePart>
					<sso:DateDepart>2020-12-16</sso:DateDepart>
					<sso:Origin>Самара</sso:Origin>
					<sso:Destination>Санкт-Петербург</sso:Destination>
					<sso:DepartureAdvanceShiftDays>1</sso:DepartureAdvanceShiftDays>
					<sso:DeparturePostShiftDays>1</sso:DeparturePostShiftDays>
					<sso:ReturnAdvanceShiftDays>0</sso:ReturnAdvanceShiftDays>
					<sso:ReturnPostShiftDays>0</sso:ReturnPostShiftDays>
					<sso:BookingSequence>1</sso:BookingSequence>
				</sso:RoutePart>
			</sso:CustomRoute>
            <sso:CustomOptions>
               <sso:CustomOption>
                  <sso:Key>routeControl</sso:Key>
                  <sso:Value>true</sso:Value>
               </sso:CustomOption>
                <sso:CustomOption>
                  <sso:Key>automaticServices</sso:Key>
                  <sso:Value>transport,hotel</sso:Value>
               </sso:CustomOption>
               <sso:CustomOption>
                  <sso:Key>allowedExtraServices</sso:Key>
                  <sso:Value>transfer</sso:Value>
               </sso:CustomOption>
               <sso:CustomOption>
                  <sso:Key>updateMode</sso:Key>
                  <sso:Value>update</sso:Value>
               </sso:CustomOption>
               <sso:CustomOption>
                  <sso:Key>personalDays</sso:Key>
                  <sso:Value>2020-12-14,2020-12-15</sso:Value>
               </sso:CustomOption>
            </sso:CustomOptions>
             <sso:Persons>
               <sso:Person LastName="Максимов" FirstName="Максим" MiddleName="Максимович" 
               LastNameLatin="Maximov" FirstNameLatin="Maxim" MiddleNameLatin="Maximovich" Gender="true" DateBirth="2000-02-01">
                  <sso:INN>987987987</sso:INN>
                  <sso:KPP>779901001</sso:KPP>
                  <sso:CountryAlpha2>RU</sso:CountryAlpha2>
                  <sso:Documents>
                     <sso:Document CountryCode="RU" DocumentNumber="4505111222" DocumentType="NationalPassport" DateValid="2030-10-10"/>
                  </sso:Documents>
                  <sso:Contacts>
                     <sso:Contact ContactType="MobilePhone" Value="+79162223311"/>
                  </sso:Contacts>
                  <sso:PersonalCodes>
                     <sso:Code DictionaryName="Идентификатор в SAP" CodeValue="1234" IsPrimaryKey="true"/>
                  </sso:PersonalCodes>
               </sso:Person>
            </sso:Persons>
            <sso:AccountDetails id_Group="XX" GroupSecurityKey="test" Email="user@somedomain.ru">
                <sso:PersonToCreate LastName="Админских" FirstName="Максим" MiddleName="Валерьевич" 
               	  LastNameLatin="Adminskih" FirstNameLatin="Maksim" MiddleNameLatin="Valerievich" Gender="true" DateBirth="2000-01-02">
                  <sso:INN>987987987</sso:INN>
                  <sso:KPP>779901001</sso:KPP>
                  <sso:CountryAlpha2>RU</sso:CountryAlpha2>
               </sso:PersonToCreate>
               <sso:id_Role>1</sso:id_Role>
            </sso:AccountDetails>
         </sso:request>
      </sso:Set>
   </soapenv:Body>
</soapenv:Envelope>

Разберем структуру запроса более детально:

...

В ответе веб-сервиса нам следует обратить внимание на поле CorteosId:

Code Block
languagexml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <SetResponse xmlns="https://sso.corteos.ru/">
         <SetResult>
            <OuterId>2000000171</OuterId>
            <CustomRoute>
               <RoutePart>
                  <DateDepart>2020-12-14T00:00:00</DateDepart>
                  <DateReturn xsi:nil="true"/>
                  <Origin>Москва</Origin>
                  <Destination>Санкт-Петербург</Destination>
                  <DepartureAdvanceShiftDays>1</DepartureAdvanceShiftDays>
                  <DeparturePostShiftDays>1</DeparturePostShiftDays>
                  <ReturnAdvanceShiftDays>0</ReturnAdvanceShiftDays>
                  <ReturnPostShiftDays>0</ReturnPostShiftDays>
                  <BookingSequence>1</BookingSequence>
               </RoutePart>
               <RoutePart>
                  <DateDepart>2020-12-16T00:00:00</DateDepart>
                  <DateReturn xsi:nil="true"/>
                  <Origin>Самара</Origin>
                  <Destination>Санкт-Петербург</Destination>
                  <DepartureAdvanceShiftDays>1</DepartureAdvanceShiftDays>
                  <DeparturePostShiftDays>1</DeparturePostShiftDays>
                  <ReturnAdvanceShiftDays>0</ReturnAdvanceShiftDays>
                  <ReturnPostShiftDays>0</ReturnPostShiftDays>
                  <BookingSequence>1</BookingSequence>
               </RoutePart>
            </CustomRoute>
            <CustomOptions>
               <CustomOption>
                  <Key>routeControl</Key>
                  <Value>true</Value>
               </CustomOption>
               <CustomOption>
                  <Key>automaticServices</Key>
                  <Value>transport,hotel</Value>
               </CustomOption>
               <CustomOption>
                  <Key>allowedExtraServices</Key>
                  <Value>transfer</Value>
               </CustomOption>
               <CustomOption>
                  <Key>updateMode</Key>
                  <Value>update</Value>
               </CustomOption>
            </CustomOptions>
            <Persons>
               <Person LastName="Максимов" FirstName="Максим" MiddleName="Максимович" LastNameLatin="Maximov" FirstNameLatin="Maxim" MiddleNameLatin="Maximovich" Gender="true" DateBirth="2000-02-01T00:00:00">
                  <INN>987987987</INN>
                  <KPP>779901001</KPP>
                  <CountryAlpha2>RU</CountryAlpha2>
                  <Documents>
                     <Document CountryCode="RU" DocumentNumber="4505111222" DocumentType="NationalPassport" DateValid="2030-10-10T00:00:00"/>
                  </Documents>
                  <Contacts>
                     <Contact ContactType="MobilePhone" Value="+79162223311"/>
                  </Contacts>
                  <PersonalCodes>
                     <Code DictionaryName="Идентификатор в SAP" CodeValue="1234" IsPrimaryKey="true"/>
                  </PersonalCodes>
               </Person>
            </Persons>
            <BudgetCodes/>
            <AccountDetails id_Group="xxx" GroupSecurityKey="xxxx" Email="xxxx@xxxxx.ru">
            </AccountDetails>
            <id_User>xxxx</id_User>
            <CorteosId>xxxx-xxx-xxx-xxxx-xxxxxxxxx</CorteosId>
            <CreationDate>2020-11-16T20:02:37.1565805+03:00</CreationDate>
            <AugmentationData>
               <xml xmlns=""/>
            </AugmentationData>
         </SetResult>
      </SetResponse>
   </soap:Body>
</soap:Envelope>

Значение выглядит таким образом:

...