Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Команда проверяет адреса переданные в формате AddressRange на валидность по маске DigitMap определенной на домене.

Аналог команды в CoCon:

domain/<DOMAIN>/alias/.check-by-digitmap

Метод http запроса

POST

Шаблон http запроса

http://host:port/commands/ds_domain_check_addr_to_digitmap_cmd

Код http ответа

200 – в случае успеха;
404 – в случае ошибки.

Xsd схема xml файла запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

    <xs:include schemaLocation="error.xsd"/>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="validate" minOccurs="1" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:attribute name="domain" type="xs:string" use="required"/>
                                    <xs:attribute name="addressrange" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="response" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="addressrange" type="xs:string" use="required"/>
                        <xs:attribute name="validate" type="xs:boolean" use="required"/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>

Пример:

http://192.168.1.21:9999/commands/ds_domain_check_addr_to_digitmap_cmd

<in>
    <request>
        <validate domain="biysk.local" addressrange="240101"/>
        <validate domain="biysk.local" addressrange="2405{01-99}"/>
        <validate domain="biysk.local" addressrange="10{01-20}"/>
        <validate domain="biysk.local" addressrange="100b"/>
        <validate domain="biysk.local" addressrange="100B"/>
      
    </request>
</in>

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ds_domain_check_addr_to_digitmap_cmd.xsd">
    <response domain="biysk.local" addressrange="240101" validate="true"/>
    <response domain="biysk.local" addressrange="2405{01-99}" validate="true"/>
    <response domain="biysk.local" addressrange="10{01-20}" validate="true"/>
    <response domain="biysk.local" addressrange="100b" validate="false"/>
    <response domain="biysk.local" addressrange="100B" validate="true"/>
</out>
  • Нет меток

0 Комментариев

Вы не можете зарегистрироваться в системе. Любые изменения, которые Вы сделаете, будут помечены как сделанные анонимно. Вы можете Войти, если у Вас есть учётная запись.