Operação getroomsGetRooms operation

A operação Getrooms Obtém as salas dentro da lista de salas especificada.The GetRooms operation gets the rooms within the specified room list.

Cabeçalhos SOAPSOAP Headers

A operação Getrooms pode usar os cabeçalhos SOAP listados e descritos na tabela a seguir.The GetRooms operation can use the SOAP headers that are listed and described in the following table.

HeaderHeader ElementoElement DescriçãoDescription
RepresentaçãoImpersonation
ExchangeImpersonationExchangeImpersonation
Identifica o usuário que o aplicativo cliente está representando.Identifies the user whom the client application is impersonating.
MailboxCultureMailboxCulture
MailboxCultureMailboxCulture
Identifica a cultura RFC3066 a ser usada para acessar a caixa de correio.Identifies the RFC3066 culture to be used to access the mailbox.
RequestVersionRequestVersion
RequestServerVersionRequestServerVersion
Identifica a versão do esquema para a solicitação de operação.Identifies the schema version for the operation request.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
Identifica a versão do servidor que respondeu à solicitação.Identifies the version of the server that responded to the request.

Exemplo de solicitação getroomsGetRooms request example

DescriçãoDescription

Veja a seguir um exemplo de uma solicitação Getrooms que obtém as salas que estão associadas a uma lista de salas.The following is an example of a GetRooms request that gets the rooms that are associated with a room list.

CódigoCode

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
  <soap:Header>
    <t:RequestServerVersion Version ="Exchange2010_SP1"/>
  </soap:Header>
  <soap:Body>
    <m:GetRooms>
      <m:RoomList>
        <t:EmailAddress>RoomList@contoso.com</t:EmailAddress>
      </m:RoomList>
    </m:GetRooms>
  </soap:Body>

Elementos RequestRequest elements

Os seguintes elementos são usados na solicitação:The following elements are used in the request:

Exemplo de resposta de getrooms bem-sucedidaSuccessful GetRooms response example

DescriçãoDescription

A resposta a seguir mostra as informações de endereço de email para as salas que estão associadas à lista de salas.The following response shows the email address information for the rooms that are associated with the room list.

CódigoCode

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1" xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" xmlns="https://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetRoomsResponse ResponseClass="Success" xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <ResponseCode>NoError</ResponseCode>
      <m:Rooms xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
        <t:Room xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
          <t:Id>
            <t:Name>Room01</t:Name>
            <t:EmailAddress>Room01@contoso.com</t:EmailAddress>
            <t:RoutingType>SMTP</t:RoutingType>
            <t:MailboxType>Mailbox</t:MailboxType>
          </t:Id>
        </t:Room>
        <t:Room xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
          <t:Id>
            <t:Name>Room02</t:Name>
            <t:EmailAddress>Room02@contoso.com</t:EmailAddress>
            <t:RoutingType>SMTP</t:RoutingType>
            <t:MailboxType>Mailbox</t:MailboxType>
          </t:Id>
        </t:Room>
      </m:Rooms>
    </GetRoomsResponse>
  </s:Body>
</s:Envelope>

Elementos de resposta de getrooms bem-sucedidosSuccessful GetRooms response elements

Os seguintes elementos são usados na resposta:The following elements are used in the response:

Exemplo de resposta de erro getroomsGetRooms Error response example

DescriçãoDescription

O exemplo a seguir mostra uma resposta de erro causada por uma tentativa de obter informações de sala para uma lista de salas não existente.The following example shows an error response caused by an attempt to get room information for a nonexistent room list.

CódigoCode

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="164" MinorBuildNumber="0" Version="Exchange2010_SP1" xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" xmlns="https://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetRoomsResponse ResponseClass="Error" xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <MessageText>No results were found.</MessageText>
      <ResponseCode>ErrorNameResolutionNoResults</ResponseCode>
      <DescriptiveLinkKey>0</DescriptiveLinkKey>
    </GetRoomsResponse>
  </s:Body>
</s:Envelope>

Elementos de resposta de erro getroomsGetRooms Error response elements

Os seguintes elementos são usados na resposta:The following elements are used in the response:

Confira tambémSee also