GetPurposeList v2.0: различия между версиями
Перейти к навигации
Перейти к поиску
(не показаны 2 промежуточные версии этого же участника) | |||
Строка 30: | Строка 30: | ||
! Тип | ! Тип | ||
! Обязат. | ! Обязат. | ||
! Описание | ! Описание (нажмите [...] для отображения дополнительного описания) | ||
|- | |- | ||
| | |001 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''<ws:getPurposeListRequest>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |002 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''<{{color|#660e7a|bs:}}listOptions>'''}} | ||
|[[ListOptions|bs:ListOptions]] | |[[ListOptions|bs:ListOptions]] | ||
|[0..1] | |[0..1] | ||
| style="width:52em;"| Параметры запрашиваемого списка. | |||
|style=" | |||
|- | |- | ||
| | |003 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''<{{color|#660e7a|bs:}}count>'''}}{{color|#131313|10}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}count>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger xs:nonNegativeInteger] | |[http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger xs:nonNegativeInteger] | ||
|[0..1] | |[0..1] | ||
|Максимальное запрашиваемое количество объектов в списке. | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Максимальное запрашиваемое количество объектов в списке. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* По умолчанию значение 100; | * По умолчанию значение 100; | ||
* Максимально возможное значение 1000. | * Максимально возможное значение 1000.</div> | ||
</div> | |||
|- | |- | ||
| | |004 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''<{{color|#660e7a|bs:}}offset>'''}}{{color|#131313|2}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}offset>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger xs:nonNegativeInteger] | |[http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger xs:nonNegativeInteger] | ||
|[0..1] | |[0..1] | ||
|Номер элемента, по которому осуществляется смещение первого элемента списка. | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Номер элемента, по которому осуществляется смещение первого элемента списка. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* По умолчанию значение 0.</div> | |||
</div> | |||
|- | |- | ||
| | |005 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''</{{color|#660e7a|bs:}}listOptions>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |006 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''</ws:getPurposeListRequest>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
|} | |} | ||
Строка 86: | Строка 87: | ||
! Тип | ! Тип | ||
! Обязат. | ! Обязат. | ||
! Описание | ! Описание (нажмите [...] для отображения дополнительного описания) | ||
|- | |- | ||
| | |001 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''<ws:getPurposeListResponse>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |002 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''<{{color|#660e7a|dt:}}purposeList {{color|Red|total=}}{{color|#007f15|"2"}} {{color|Red|offset=}}{{color|#007f15|"0"}} {{color|Red|count=}}{{color|#007f15|"2"}}>'''}} | ||
|[[PurposeList_v2.0|dt:PurposeList]] | |[[PurposeList_v2.0|dt:PurposeList]] | ||
|[1..1] | |[1..1] | ||
|Список | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Список назначений груза. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* total - всего записей; | * total - всего записей; | ||
* offset - смещение относительно первого элемента; | * offset - смещение относительно первого элемента; | ||
* count - количество выводимых записей. | * count - количество выводимых записей.</div> | ||
</div> | |||
|- | |- | ||
| | |003 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''<{{color|#660e7a|dt:}}purpose>'''}} | ||
|[[Purpose_v2.0|dt:Purpose]] | |[[Purpose_v2.0|dt:Purpose]] | ||
|[0..*] | |[0..*] | ||
| style="width:52em;"| Назначение груза. | |||
|style=" | |||
|- | |- | ||
| | |004 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}uuid>'''}}{{color|#131313|UUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}uuid>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Идентификатор версии назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |005 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}guid>'''}}{{color|#131313|GUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}guid>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Глобальный идентификатор назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |006 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}active>'''}}{{color|#131313|true}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}active>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | |[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | ||
|[1..1] | |[1..1] | ||
| | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Описывает, является ли запись активной. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* true - запись активна; | * true - запись активна; | ||
* false - запись не активна. | * false - запись не активна.</div> | ||
</div> | |||
|- | |- | ||
| | |007 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}last>'''}}{{color|#131313|true}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}last>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | |[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | ||
|[1..1] | |[1..1] | ||
| | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Описывает, является ли версия записи последней. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* true - да; | * true - да; | ||
* false - нет. | * false - нет. </div> | ||
</div> | |||
|- | |- | ||
| | |008 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}status>'''}}{{color|#131313|100}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}status>'''}} | ||
|[[VersionStatus|bs:VersionStatus]] | |[[VersionStatus|bs:VersionStatus]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Статус версии назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |009 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}createDate>'''}}{{color|#131313|2017-07-07T12:00:00}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}createDate>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | |[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Дата создания назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |010 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}updateDate>'''}}{{color|#131313|2017-07-07T12:00:00}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}updateDate>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | |[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Дата изменения назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |011 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}previous>'''}}{{color|#131313|UUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}previous>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[0..1] | |[0..1] | ||
| style="width:52em;"| Идентификатор предыдущей версии записи. | |||
|style=" | |||
|Идентификатор | |||
|- | |- | ||
| | |012 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|dt:}}name>'''}}{{color|#131313|в корм животным}}{{color|#190dbf|'''</{{color|#660e7a|dt:}}name>'''}} | ||
|[[String255|bs:String255]] | |[[String255|bs:String255]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Наименование назначения груза. | |||
|style=" | |||
|- | |- | ||
| | |013 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''</{{color|#660e7a|dt:}}purpose>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |014 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''</{{color|#660e7a|dt:}}purposeList>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |015 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''</ws:getPurposeListResponse>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
|} | |} |
Текущая версия на 23:11, 10 октября 2020
Общие сведения
Операция GetPurposeList предназначена для получения списка актуальных записей о назначениях груза (active=true, last=true). Операция поддерживает постраничный вывод. Выполнение операции заканчивается либо возвратом списка назначений груза, либо ошибкой, в случае если параметры запроса не корректны или произошла иная ошибка выполнения запроса.
Входные данные
- параметры выводимого списка.
Выходные данные
- список актуальных записей назначений груза.
Спецификация запроса
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getPurposeListRequest> | |||
002 | ···<bs:listOptions> | bs:ListOptions | [0..1] | Параметры запрашиваемого списка. |
003 | ······<bs:count>10</bs:count> | xs:nonNegativeInteger | [0..1] | Максимальное запрашиваемое количество объектов в списке.
|
004 | ······<bs:offset>2</bs:offset> | xs:nonNegativeInteger | [0..1] | Номер элемента, по которому осуществляется смещение первого элемента списка.
|
005 | ···</bs:listOptions> | |||
006 | </ws:getPurposeListRequest> |
Спецификация ответа
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getPurposeListResponse> | |||
002 | ···<dt:purposeList total="2" offset="0" count="2"> | dt:PurposeList | [1..1] | Список назначений груза.
|
003 | ······<dt:purpose> | dt:Purpose | [0..*] | Назначение груза. |
004 | ·········<bs:uuid>UUID</bs:uuid> | bs:UUID | [1..1] | Идентификатор версии назначения груза. |
005 | ·········<bs:guid>GUID</bs:guid> | bs:UUID | [1..1] | Глобальный идентификатор назначения груза. |
006 | ·········<bs:active>true</bs:active> | xs:boolean | [1..1] | Описывает, является ли запись активной.
|
007 | ·········<bs:last>true</bs:last> | xs:boolean | [1..1] | Описывает, является ли версия записи последней.
|
008 | ·········<bs:status>100</bs:status> | bs:VersionStatus | [1..1] | Статус версии назначения груза. |
009 | ·········<bs:createDate>2017-07-07T12:00:00</bs:createDate> | xs:DateTime | [1..1] | Дата создания назначения груза. |
010 | ·········<bs:updateDate>2017-07-07T12:00:00</bs:updateDate> | xs:DateTime | [1..1] | Дата изменения назначения груза. |
011 | ·········<bs:previous>UUID</bs:previous> | bs:UUID | [0..1] | Идентификатор предыдущей версии записи. |
012 | ·········<dt:name>в корм животным</dt:name> | bs:String255 | [1..1] | Наименование назначения груза. |
013 | ······</dt:purpose> | |||
014 | ···</dt:purposeList> | |||
015 | </ws:getPurposeListResponse> |
Описание ошибок
Ошибка | Описание |
---|---|
InternalServiceFault | Внутренняя ошибка сервиса. |
IncorrectRequestFault | Некорректный запрос. Происходит в случае, если запрос не соответствует требованиям указанным в xsd. |
OffsetOutOfRangeFault | Заданный в запросе отступ больше числа записей в результате запроса. |
Пример запроса
Запрос первых трех назначений груза без смещения.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://api.vetrf.ru/schema/cdm/registry/ws-definitions/v2" xmlns:bs="http://api.vetrf.ru/schema/cdm/base">
<soapenv:Header/>
<soapenv:Body>
<ws:getPurposeListRequest>
<bs:listOptions>
<bs:count>3</bs:count>
<bs:offset>0</bs:offset>
</bs:listOptions>
</ws:getPurposeListRequest>
</soapenv:Body>
</soapenv:Envelope>
Ответ на запрос.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<v2:getPurposeListResponse xmlns:bs="http://api.vetrf.ru/schema/cdm/base" xmlns:dt="http://api.vetrf.ru/schema/cdm/dictionary/v2" xmlns:v2="http://api.vetrf.ru/schema/cdm/registry/ws-definitions/v2">
<dt:purposeList count="3" total="210" offset="0">
<dt:purpose>
<bs:uuid>fedc91a0-053c-11e1-99b4-d8d385fbc9e8</bs:uuid>
<bs:guid>5b914aea-e089-11e1-bcf3-b499babae7ea</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2009-04-24T15:13:08+04:00</bs:createDate>
<bs:updateDate>2009-04-24T15:13:08+04:00</bs:updateDate>
<dt:name>адсорбация микотоксинов в кормах для с/х животных, в том числе птиц</dt:name>
</dt:purpose>
<dt:purpose>
<bs:uuid>fedc99e8-053c-11e1-99b4-d8d385fbc9e8</bs:uuid>
<bs:guid>5b915b5e-e089-11e1-bcf3-b499babae7ea</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2009-05-21T15:26:10+04:00</bs:createDate>
<bs:updateDate>2009-05-21T15:26:10+04:00</bs:updateDate>
<dt:name>адсорбция афлатоксина В1 и предотвращение развития плесени в кормах для свиней и с/х птицы</dt:name>
</dt:purpose>
<dt:purpose>
<bs:uuid>fedc43a8-053c-11e1-99b4-d8d385fbc9e8</bs:uuid>
<bs:guid>5b913ae4-e089-11e1-bcf3-b499babae7ea</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2009-04-15T16:50:49+04:00</bs:createDate>
<bs:updateDate>2009-04-15T16:50:49+04:00</bs:updateDate>
<dt:name>аукцион</dt:name>
</dt:purpose>
</dt:purposeList>
</v2:getPurposeListResponse>
</soap:Body>
</soapenv:Envelope>