MediaProcess


按一下這裡以取得完整的作業清單。

GrabPreviewImage

擷取預覽影像
key: 驗證碼
video_url: 影片的網路路徑
preview_time: 預覽時間(秒)
回傳ResponseInfo物件
ResponseInfo.Verification: 驗證碼是否正確
ResponseInfo.Result: 擷取預覽影像是否成功
ResponseInfo.ErrorMessage: 錯誤訊息描述
ResponseInfo.Args: 預覽影像的物件(byte[])
ResponseInfo.Code: 保留(未定義)

測試

測試表單只適用於來自本機電腦的要求。

SOAP 1.1

下列是 SOAP 1.1 要求與回應的範例。預留位置顯示之處必須代入實際的值。

POST /MediaProcess.asmx HTTP/1.1
Host: ws.ktnp.gov.tw
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GrabPreviewImage"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GrabPreviewImage xmlns="http://tempuri.org/">
      <key>string</key>
      <video_url>string</video_url>
      <preview_time>double</preview_time>
    </GrabPreviewImage>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GrabPreviewImageResponse xmlns="http://tempuri.org/">
      <GrabPreviewImageResult>
        <Code>int</Code>
        <Verification>boolean</Verification>
        <Result>boolean</Result>
        <Args />
        <ErrorMessage>string</ErrorMessage>
      </GrabPreviewImageResult>
    </GrabPreviewImageResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

下列是 SOAP 1.2 要求與回應的範例。預留位置顯示之處必須代入實際的值。

POST /MediaProcess.asmx HTTP/1.1
Host: ws.ktnp.gov.tw
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GrabPreviewImage xmlns="http://tempuri.org/">
      <key>string</key>
      <video_url>string</video_url>
      <preview_time>double</preview_time>
    </GrabPreviewImage>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GrabPreviewImageResponse xmlns="http://tempuri.org/">
      <GrabPreviewImageResult>
        <Code>int</Code>
        <Verification>boolean</Verification>
        <Result>boolean</Result>
        <Args />
        <ErrorMessage>string</ErrorMessage>
      </GrabPreviewImageResult>
    </GrabPreviewImageResponse>
  </soap12:Body>
</soap12:Envelope>