Hc_restfs_list - Просмотр списка файлов на RestFS для системы или виртуальной АТС
Hc_restfs_list
Команда предназначена для получения списка файлов, хранящихся на файловой системе RestFS на уровне системы или виртуальной АТС. За одну операцию можно получить список файлов для нескольких папок.
Аналог команды в CoCon:
domain/<DOMAIN>/restfs/list
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/restfs_list
Код HTTP-ответа:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- systemRequestType -->
<xs:complexType name="systemRequestType">
<xs:attribute name="source" type="xs:string" use="required"/>
</xs:complexType>
<!-- domainRequestType -->
<xs:complexType name="domainRequestType">
<xs:attribute name="source" type="xs:string" use="required"/>
</xs:complexType>
<!-- errorType -->
<xs:complexType name="errorType">
<xs:attribute name="cause" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
</xs:complexType>
<!-- fileType -->
<xs:complexType name="fileType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="size" type="xs:integer" use="required"/>
</xs:complexType>
<!-- groupType -->
<xs:complexType name="groupType">
<xs:sequence>
<xs:element name="file" type="fileType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- systemResultType -->
<xs:complexType name="systemResultType">
<xs:sequence>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="1"/>
<xs:element name="group" type="groupType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="fileType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="source" type="xs:string" use="required"/>
</xs:complexType>
<!-- domainResultType -->
<xs:complexType name="domainResultType">
<xs:sequence>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="1"/>
<xs:element name="group" type="groupType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="fileType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="source" type="xs:string" use="required"/>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:sequence>
<xs:element name="system" type="systemRequestType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="domain" type="domainRequestType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="domain" type="xs:string" use="required"/>
</xs:complexType>
<!-- resultType -->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="system" type="systemResultType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="domain" type="domainResultType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request" type="requestType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:sequence>
<xs:element name="result" type="resultType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/restfs_list
<?xml version="1.0" encoding="UTF-8"?>
<in
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="restfs_list.xsd">
<request domain="biysk.local">
<system source="sounds"/>
<domain source="sounds"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="restfs_list.xsd">
<result>
<system source="sounds">
<group name="curency">
<file name="cent.wav" size="95336"/>
<file name="cent_a.wav" size="96512"/>
<file name="cent_ov.wav" size="105450"/>
<file name="euro_cent.wav" size="123324"/>
<file name="euro_cent_a.wav" size="118150"/>
<file name="euro_cent_ov.wav" size="136496"/>
<file name="kopecks.wav" size="9274"/>
<file name="ruble.wav" size="5972"/>
<file name="ruble_a.wav" size="6762"/>
<file name="ruble_ov.wav" size="8458"/>
</group>
<group name="dow">
<file name="ai_friday2.wav" size="7866"/>
<file name="ai_saturday2.wav" size="8494"/>
<file name="ai_wednesday2.wav" size="9538"/>
<file name="friday.wav" size="8076"/>
<file name="monday.wav" size="9120"/>
<file name="saturday.wav" size="8702"/>
<file name="sunday.wav" size="10584"/>
<file name="thursday.wav" size="9120"/>
<file name="tuesday.wav" size="9120"/>
<file name="wednesday.wav" size="8494"/>
</group>
<group name="enumeration">
<file name="h-1.wav" size="8404"/>
<file name="h-10.wav" size="13418"/>
<file name="h-11.wav" size="15926"/>
<file name="h-12.wav" size="16762"/>
<file name="h-13.wav" size="15926"/>
<file name="h-14.wav" size="18016"/>
<file name="h-15.wav" size="15926"/>
<file name="h-16.wav" size="18016"/>
<file name="h-2.wav" size="10076"/>
<file name="h-3.wav" size="10910"/>
<file name="h-4.wav" size="14672"/>
<file name="h-5.wav" size="9240"/>
<file name="h-6.wav" size="12164"/>
<file name="h-7.wav" size="13000"/>
<file name="h-8.wav" size="13000"/>
<file name="h-9.wav" size="14254"/>
</group>
<group name="et">
<file name="1.wav" size="12282"/>
<file name="10.wav" size="12002"/>
<file name="11.wav" size="13532"/>
<file name="12.wav" size="13864"/>
<file name="13.wav" size="13326"/>
<file name="14.wav" size="16392"/>
<file name="15.wav" size="13186"/>
<file name="16.wav" size="14254"/>
<file name="17.wav" size="14998"/>
<file name="18.wav" size="17654"/>
<file name="19.wav" size="16972"/>
<file name="1h.wav" size="10186"/>
<file name="2.wav" size="11312"/>
<file name="20.wav" size="14812"/>
<file name="2h.wav" size="11354"/>
<file name="3.wav" size="8590"/>
<file name="30.wav" size="11338"/>
<file name="4.wav" size="13814"/>
<file name="40.wav" size="13372"/>
<file name="5.wav" size="9798"/>
<file name="50.wav" size="13140"/>
<file name="6.wav" size="12118"/>
<file name="7.wav" size="11608"/>
<file name="8.wav" size="12954"/>
<file name="9.wav" size="12584"/>
<file name="exact_time.wav" size="19618"/>
<file name="hours1.wav" size="11296"/>
<file name="hours2.wav" size="14224"/>
<file name="hours3.wav" size="14304"/>
<file name="minute1.wav" size="10656"/>
<file name="minute2.wav" size="13350"/>
<file name="minute3.wav" size="14568"/>
<file name="minute4.wav" size="13012"/>
<file name="second1.wav" size="12672"/>
<file name="second2.wav" size="11000"/>
<file name="second3.wav" size="9956"/>
</group>
<group name="numbers">
<file name="#.wav" size="13696"/>
<file name="#1.wav" size="13754"/>
<file name="*.wav" size="15882"/>
<file name="*1.wav" size="80438"/>
<file name="0.wav" size="11654"/>
<file name="1.wav" size="9728"/>
<file name="1n.wav" size="6376"/>
<file name="2.wav" size="11354"/>
<file name="3.wav" size="8590"/>
<file name="4.wav" size="13814"/>
<file name="5.wav" size="9798"/>
<file name="6.wav" size="12118"/>
<file name="7.wav" size="11608"/>
<file name="8.wav" size="12954"/>
<file name="9.wav" size="12584"/>
<file name="A.wav" size="69582"/>
<file name="B.wav" size="68002"/>
<file name="C.wav" size="75932"/>
<file name="D.wav" size="75580"/>
<file name="E.wav" size="67586"/>
<file name="F.wav" size="84514"/>
</group>
<group name="prompts">
<file name="voicemail_intro.wav" size="626066"/>
</group>
<group name="push_numbers">
<file name="ai_push_#.wav" size="12056"/>
<file name="ai_push_*.wav" size="13044"/>
<file name="ai_push_0.wav" size="15180"/>
<file name="ai_push_1.wav" size="14442"/>
<file name="ai_push_2.wav" size="15180"/>
<file name="ai_push_3.wav" size="15998"/>
<file name="ai_push_4.wav" size="15980"/>
<file name="ai_push_5.wav" size="16060"/>
<file name="ai_push_6.wav" size="17454"/>
<file name="ai_push_7.wav" size="16156"/>
<file name="ai_push_8.wav" size="17986"/>
<file name="ai_push_9.wav" size="16064"/>
</group>
<group name="queue">
<file name="ai_do_you_want_decline_callback.wav" size="48688"/>
<file name="ai_do_you_want_us_to_call_you_back.wav" size="43254"/>
<file name="ai_limit_reached.wav" size="59972"/>
<file name="ai_notify_callback.wav" size="43254"/>
<file name="ai_now_you_can_hang_up.wav" size="64152"/>
<file name="ai_please_rate_us.wav" size="283026"/>
<file name="ai_queue_enqueued.wav" size="30144"/>
<file name="ai_queue_full.wav" size="31480"/>
<file name="ai_queue_greeting.wav" size="52594"/>
<file name="ai_queue_music.wav" size="3892940"/>
<file name="ai_queue_position.wav" size="16226"/>
<file name="ai_queue_predicted_time.wav" size="22912"/>
<file name="ai_rate_from_0_to_9.wav" size="393100"/>
<file name="ai_rate_from_1_to_5.wav" size="383220"/>
<file name="ai_rate_us_from_0_to_1.wav" size="480124"/>
<file name="ai_thanks_you_for_your_opinion.wav" size="203998"/>
<file name="ai_you_can_hang_up.wav" size="58718"/>
<file name="ai_you_can_still_wait.wav" size="105112"/>
<file name="ai_your_opinion_is_very_important.wav" size="262564"/>
</group>
<group name="variable"/>
<group name="voicemail">
<file name="ai_call_to_sender.wav" size="39826"/>
<file name="ai_change_service_settings.wav" size="44840"/>
<file name="ai_confirm_remove_messages.wav" size="40746"/>
<file name="ai_decline_remove_messages.wav" size="26118"/>
<file name="ai_enter_current_password.wav" size="41498"/>
<file name="ai_enter_new_password.wav" size="38572"/>
<file name="ai_enter_number_sharp.wav" size="59688"/>
<file name="ai_exit.wav" size="57440"/>
<file name="ai_for_exit_from_service.wav" size="25420"/>
<file name="ai_for_listen_next_message.wav" size="23122"/>
<file name="ai_for_record_voice_message_push.wav" size="29600"/>
<file name="ai_leave_message_after_beep.wav" size="218156"/>
<file name="ai_listen_current_file.wav" size="33404"/>
<file name="ai_listen_file.wav" size="45756"/>
<file name="ai_listen_files.wav" size="22076"/>
<file name="ai_listen_messages.wav" size="31618"/>
<file name="ai_listen_new_messages.wav" size="19360"/>
<file name="ai_listen_old_messages.wav" size="21868"/>
<file name="ai_listen_prompt.wav" size="21032"/>
<file name="ai_listen_save_messages.wav" size="47348"/>
<file name="ai_message_from_hidden_number.wav" size="55840"/>
<file name="ai_message_from_number.wav" size="21240"/>
<file name="ai_message_saved.wav" size="16852"/>
<file name="ai_message_successfully_removed.wav" size="17480"/>
<file name="ai_messages_successfully_removed.wav" size="17898"/>
<file name="ai_new_message.wav" size="14554"/>
<file name="ai_new_messages_1.wav" size="13298"/>
<file name="ai_new_messages_2.wav" size="14136"/>
<file name="ai_no_more_messages.wav" size="15180"/>
<file name="ai_old_message.wav" size="15808"/>
<file name="ai_old_messages_1.wav" size="13358"/>
<file name="ai_old_messages_2.wav" size="16852"/>
<file name="ai_participant_can_not_answer.wav" size="366414"/>
<file name="ai_password_successfully_changed.wav" size="28958"/>
<file name="ai_passwords_different.wav" size="36900"/>
<file name="ai_pause_resume_message.wav" size="69500"/>
<file name="ai_play_back_message.wav" size="23540"/>
<file name="ai_play_forward_message.wav" size="23540"/>
<file name="ai_play_message_details.wav" size="44422"/>
<file name="ai_reenter_new_password.wav" size="37736"/>
<file name="ai_remove_current_message.wav" size="22076"/>
<file name="ai_remove_new_messages.wav" size="21450"/>
<file name="ai_remove_old_messages.wav" size="25002"/>
<file name="ai_remove_save_messages.wav" size="52364"/>
<file name="ai_replay_message.wav" size="25420"/>
<file name="ai_save_current_message.wav" size="39482"/>
<file name="ai_save_file.wav" size="48630"/>
<file name="ai_saved_message.wav" size="34810"/>
<file name="ai_saved_messages_1.wav" size="34810"/>
<file name="ai_saved_messages_2.wav" size="34810"/>
<file name="ai_say_message_after_beep.wav" size="63276"/>
<file name="ai_skip_message.wav" size="50274"/>
<file name="ai_ss_unavailable.wav" size="14554"/>
<file name="ai_to_remove_message.wav" size="190606"/>
<file name="ai_to_remove_subscriber_intro.wav" size="45676"/>
<file name="ai_to_remove_voicemail_intro.wav" size="63604"/>
<file name="ai_try_once_more.wav" size="16524"/>
<file name="ai_voicemail_change_common_settings.wav" size="51110"/>
<file name="ai_voicemail_change_password.wav" size="32302"/>
<file name="ai_voicemail_change_play_details.wav" size="74098"/>
<file name="ai_voicemail_change_send_by_email.wav" size="78696"/>
<file name="ai_voicemail_change_write_by_busy.wav" size="82874"/>
<file name="ai_voicemail_change_write_by_no_reply.wav" size="74516"/>
<file name="ai_voicemail_change_write_by_out_of_service.wav" size="85800"/>
<file name="ai_voicemail_change_write_by_unconditional.wav" size="71172"/>
<file name="ai_voicemail_change_write_conditions.wav" size="64066"/>
<file name="ai_voicemail_mailbox_empty.wav" size="31898"/>
<file name="ai_voicemail_mgm_intro.wav" size="49856"/>
<file name="ai_voicemail_password_incorrect.wav" size="33556"/>
<file name="ai_voicemail_remove_user_intro.wav" size="42750"/>
<file name="ai_voicemail_write_user_intro.wav" size="18734"/>
<file name="ai_you_have.wav" size="8494"/>
</group>
<file name="activated.wav" size="9562"/>
<file name="ai_activated.wav" size="28752"/>
<file name="ai_added.wav" size="19270"/>
<file name="ai_agent_already_on.wav" size="214020"/>
<file name="ai_agent_auxwork.wav" size="282310"/>
<file name="ai_agent_busy.wav" size="260292"/>
<file name="ai_agent_logged_out.wav" size="38078"/>
<file name="ai_agent_login_ok.wav" size="31808"/>
<file name="ai_agent_number_occupied.wav" size="264004"/>
<file name="ai_alarm_multi_digits.wav" size="32526"/>
<file name="ai_alarm_off.wav" size="32720"/>
<file name="ai_alarm_off_today.wav" size="40746"/>
<file name="ai_alarm_on.wav" size="31048"/>
<file name="ai_alarm_one_digit.wav" size="24584"/>
<file name="ai_alerting.wav" size="80078"/>
<file name="ai_alerting_nd.wav" size="64298"/>
<file name="ai_already_activated.wav" size="195296"/>
<file name="ai_auth_incorrect.wav" size="28712"/>
<file name="ai_badconnection.wav" size="34096"/>
<file name="ai_badroute.wav" size="43034"/>
<file name="ai_busy.wav" size="11278"/>
<file name="ai_busy_long.wav" size="58638"/>
<file name="ai_busy_overload.wav" size="5678"/>
<file name="ai_call_forwarding.wav" size="31466"/>
<file name="ai_call_recording_announcement.wav" size="184844"/>
<file name="ai_call_recording_notification.wav" size="240926"/>
<file name="ai_changed.wav" size="38948"/>
<file name="ai_check_balance.wav" size="154782"/>
<file name="ai_conference_can_not_be_extended.wav" size="46034"/>
<file name="ai_conference_destroyed.wav" size="42342"/>
<file name="ai_conference_full.wav" size="46034"/>
<file name="ai_conference_has_been_extended.wav" size="35818"/>
<file name="ai_conference_prompt.wav" size="38326"/>
<file name="ai_connection_not_available_now.wav" size="31480"/>
<file name="ai_deactivated.wav" size="33978"/>
<file name="ai_deactivated_all.wav" size="48978"/>
<file name="ai_debt.wav" size="43662"/>
<file name="ai_empty.wav" size="57352"/>
<file name="ai_enter_number_of_conference.wav" size="17270"/>
<file name="ai_enter_number_sharp.wav" size="62990"/>
<file name="ai_enter_password.wav" size="12036"/>
<file name="ai_enter_pin.wav" size="23882"/>
<file name="ai_enter_pin_number_sharp.wav" size="91088"/>
<file name="ai_enter_subscriber_prompt_number.wav" size="43184"/>
<file name="ai_error.wav" size="27572"/>
<file name="ai_every1.wav" size="18928"/>
<file name="ai_every2.wav" size="20600"/>
<file name="ai_every3.wav" size="16628"/>
<file name="ai_every4.wav" size="17238"/>
<file name="ai_exact_time.wav" size="10106"/>
<file name="ai_exit.wav" size="46568"/>
<file name="ai_for_help_at_any_time.wav" size="38772"/>
<file name="ai_from.wav" size="13912"/>
<file name="ai_incomplete.wav" size="27036"/>
<file name="ai_intercom_announce.wav" size="318306"/>
<file name="ai_intercom_end.wav" size="380868"/>
<file name="ai_invalid_number_of_conference.wav" size="24376"/>
<file name="ai_invalidnumber.wav" size="27036"/>
<file name="ai_last_incoming_number.wav" size="51486"/>
<file name="ai_local_hold.wav" size="80078"/>
<file name="ai_mailbox_empty.wav" size="52510"/>
<file name="ai_my_number.wav" size="20976"/>
<file name="ai_nearest1.wav" size="20182"/>
<file name="ai_nearest2.wav" size="20182"/>
<file name="ai_nearest3.wav" size="22270"/>
<file name="ai_nearest4.wav" size="23942"/>
<file name="ai_no_answer.wav" size="36858"/>
<file name="ai_no_money_to_call.wav" size="210878"/>
<file name="ai_not_reachable.wav" size="37254"/>
<file name="ai_notaccess.wav" size="65234"/>
<file name="ai_notconnected.wav" size="50088"/>
<file name="ai_notification.wav" size="83276"/>
<file name="ai_notpay.wav" size="38808"/>
<file name="ai_number_absent.wav" size="55342"/>
<file name="ai_number_incorrect.wav" size="20824"/>
<file name="ai_number_is_hidden.wav" size="18734"/>
<file name="ai_number_not_detected.wav" size="18734"/>
<file name="ai_number_not_found.wav" size="66114"/>
<file name="ai_number_not_ready.wav" size="52028"/>
<file name="ai_one_minute_cost.wav" size="195404"/>
<file name="ai_out_of_order.wav" size="38112"/>
<file name="ai_overload.wav" size="39366"/>
<file name="ai_park_background_music.wav" size="3892940"/>
<file name="ai_park_slot.wav" size="15180"/>
<file name="ai_park_slot_busy.wav" size="12254"/>
<file name="ai_park_slot_empty.wav" size="41456"/>
<file name="ai_park_slot_number.wav" size="24794"/>
<file name="ai_participant_of_conference.wav" size="28154"/>
<file name="ai_pin_accepted.wav" size="25572"/>
<file name="ai_pin_incorrect.wav" size="33932"/>
<file name="ai_please_enter_number.wav" size="30172"/>
<file name="ai_prompt_recorder_intro.wav" size="116320"/>
<file name="ai_prompt_recorder_intro2.wav" size="164906"/>
<file name="ai_remote_hold.wav" size="3892940"/>
<file name="ai_ringback_second.wav" size="546266"/>
<file name="ai_rubles.wav" size="92684"/>
<file name="ai_silent.wav" size="12302"/>
<file name="ai_stay_on_line.wav" size="389572"/>
<file name="ai_subscriber_busy.wav" size="24318"/>
<file name="ai_supervising_mode_conference.wav" size="40446"/>
<file name="ai_supervising_mode_consult.wav" size="45230"/>
<file name="ai_supervising_mode_observing.wav" size="39964"/>
<file name="ai_supervising_mode_selected.wav" size="43332"/>
<file name="ai_system_problem.wav" size="39366"/>
<file name="ai_tempdenied.wav" size="37254"/>
<file name="ai_timeout.wav" size="35122"/>
<file name="ai_to_go_back_at_any_time.wav" size="58968"/>
<file name="ai_to_make_alarm_intro.wav" size="49962"/>
<file name="ai_to_make_subscriber_intro.wav" size="21868"/>
<file name="ai_to_make_voicemail_intro.wav" size="58270"/>
<file name="ai_to_turn_off.wav" size="28540"/>
<file name="ai_to_turn_on.wav" size="23106"/>
<file name="ai_unavailable.wav" size="28916"/>
<file name="ai_until.wav" size="14330"/>
<file name="ai_wait_connection.wav" size="64024"/>
<file name="ai_wait_time.wav" size="25342"/>
<file name="ai_wrong_number.wav" size="27036"/>
<file name="ai_you.wav" size="11670"/>
<file name="ai_you_are_first_participant.wav" size="50806"/>
<file name="ai_your_balance_is.wav" size="53804"/>
<file name="conference_already_exists.wav" size="246100"/>
<file name="conference_not_exists.wav" size="204704"/>
<file name="for_call_to_number.wav" size="151784"/>
<file name="reached_conference_restriction.wav" size="258330"/>
<file name="to_number.wav" size="107332"/>
</system>
<domain source="sounds"/>
</result>
</out>
Hc_restfs_url
Команда предназначена для получения URL до файла, хранящегося на RestFS для доступа до него по http.
Аналог команды в CoCon:
/domain/<DOMAIN>/restfs/list
Метод http запроса:
POST
Шаблон http запроса:
http://host:port/commands/restfs_url
Код http ответа:
201 – в случае успеха;
404 – в случае ошибки.
Xsd схема xml файла с ответом:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- systemRequestType -->
<xs:complexType name="systemRequestType">
<xs:attribute name="id" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Request Id. In case of id present, it will be returned in the result.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="source" type="xs:string" use="required"/>
<xs:attribute name="group" type="xs:string" use="optional"/>
<xs:attribute name="file" type="xs:string" use="required"/>
</xs:complexType>
<!-- domainRequestType -->
<xs:complexType name="domainRequestType">
<xs:attribute name="id" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Request Id. In case of id present, it will be returned in the result.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="source" type="xs:string" use="required"/>
<xs:attribute name="group" type="xs:string" use="optional"/>
<xs:attribute name="file" type="xs:string" use="required"/>
</xs:complexType>
<!-- systemResultType -->
<xs:complexType name="systemResultType">
<xs:attribute name="id" type="xs:string" use="optional"/>
<xs:attribute name="url" type="xs:string" use="required"/>
</xs:complexType>
<!-- domainResultType -->
<xs:complexType name="domainResultType">
<xs:attribute name="id" type="xs:string" use="optional"/>
<xs:attribute name="url" type="xs:string" use="required"/>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:sequence>
<xs:element name="system" type="systemRequestType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="domain" type="domainRequestType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="domain" type="xs:string" use="required"/>
</xs:complexType>
<!-- resultType -->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="system" type="systemResultType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="domain" type="domainResultType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request" type="requestType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:sequence>
<xs:element name="result" type="resultType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/restfs_url
<?xml version="1.0" encoding="UTF-8"?>
<in
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="restfs_url.xsd">
<request domain="biysk.local">
<server name="call" path=""/>
<server name="fax" path=""/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_restfs_domain_list.xsd">
<server name="fax">
<file type="directory" name="records" size="0"/>
<file type="directory" name="subscribers" size="0"/>
<file type="regular" name="cleaner.json" size="337"/>
</server>
<server name="call">
<file type="directory" name="records" size="0"/>
<file type="directory" name="subscribers" size="0"/>
<file type="regular" name="cleaner.json" size="337"/>
</server>
</out>