다음을 통해 공유


HTTP 요청 및 메시지 가져오기(메타데이터 교환)

가져오기 메시지는 메타데이터를 요청하는 데 사용되는 WS-Transfer 메시지입니다. 메시지 가져오기에 대한 자세한 내용은 WS-Transfer 사양의 섹션 3.1을 참조하세요. 메타데이터 교환은 HTTP를 통해 수행되므로 Get 메시지는 HTTP 요청의 페이로드입니다.

DPWS 클라이언트는 메시지 가져오기를 보냅니다. 함수 검색 클라이언트, WSDCreateDeviceProxy를 호출하는 WSDAPI 클라이언트 및 WSDCreateDeviceProxyAdvanced 를 호출하는 WSDAPI 클라이언트는 이 메시지를 보냅니다.

참고

이 항목에서는 WSDAPI 클라이언트 및 호스트에서 생성된 샘플 DPWS 메시지를 보여 줍니다. WSDAPI는 이 샘플을 준수하지 않는 다른 DPWS 규격 메시지를 구문 분석하고 수락합니다. 이 샘플을 사용하여 DPWS 상호 운용성을 확인하지 마세요. 대신 WSDBIT(WSDAPI 기본 상호 운용성 도구) 를 사용합니다.

 

다음 예제에서는 HTTP 요청 가져오기 샘플을 보여줍니다.

POST /37f86d35-e6ac-4241-964f-1d9ae46fb366
HTTP/1.1
Content-Type: application/soap+xml
User-Agent: WSDAPI
Host: 192.168.0.2:5357
Content-Length: 658
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache

HTTP 가져오기 요청에는 다음과 같은 포커스 포인트가 있습니다.

포커스 지점 머리글 선 Description
맵의 경로와
POST /37f86d35-e6ac-4241-964f-1d9ae46fb366
HTTP 가져오기 요청이 게시된 URL 경로입니다.
호스트 및 포트
Host: 192.168.0.2:5357
HTTP 가져오기 요청이 전달된 호스트 및 포트입니다.

 

다음 SOAP 메시지는 샘플 메시지 가져오기를 보여줍니다.

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
    xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
    xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing">
<soap:Header>
    <wsa:To>
        urn:uuid:37f86d35-e6ac-4241-964f-1d9ae46fb366
    </wsa:To>
    <wsa:Action>
        https://schemas.xmlsoap.org/ws/2004/09/transfer/Get
    </wsa:Action>
    <wsa:MessageID>
        urn:uuid:027bec45-c37c-466c-936c-68f648abe2bb
    </wsa:MessageID>
    <wsa:ReplyTo>
        <wsa:Address>
            https://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
        </wsa:Address>
    </wsa:ReplyTo>
    <wsa:From>
        <wsa:Address>
            urn:uuid:49e131df-351a-4ece-9a6f-6a862d31cffa
        </wsa:Address>
    </wsa:From>
</soap:Header>
<soap:Body>
</soap:Body>

Get 메시지에는 다음과 같은 포커스 포인트가 있습니다.

포커스 지점 XML Description
대상
<wsa:To>
    urn:uuid:37f86d35-e6ac-4241-964f-1d9ae46fb366
</wsa:To>
메타데이터를 요청하는 디바이스의 식별자입니다.
가져오기
<wsa:Action>
    https://schemas.xmlsoap.org/ws/2004/09/transfer/Get
SOAP 가져오기 작업은 메시지를 Get 메시지로 식별합니다.
MessageID
<wsa:MessageID>
    urn:uuid:027bec45-c37c-466c-936c-68f648abe2bb
GetResponse 메시지에서 참조되는 메시지 식별자를 포함합니다.

 

검색 및 메타데이터 교환 메시지

GetResponse 메시지