Frage

I'm trying to use the REST API for IIS Media Services to create a Live Publishing point programatically. For this, I'm sending a POST call to this URL:

http://127.0.0.1/services/smoothstreaming/publishingpoints.isml/settings 

I've included two custom headers to the request:

Content-Type: application/atom+xml
Slug: /test.isml

And this is the body of the request:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <entry xmlns="http://www.w3.org/2005/Atom">
    <id>http://127.0.0.1/test.isml/settings</id>
    <title>Test</title>
    <updated>2012-07-12T19:13:25Z</updated>
    <content type="application/xml">
      <SmoothStreaming xmlns="http://schemas.microsoft.com/iis/media/2011/03/streaming/management">
        <Settings>
          <Title>Test</Title>
          <SourceType>Push</SourceType>
          <AutoStart>false</AutoStart>
          <AutoRestartOnEncoderReconnect>false</AutoRestartOnEncoderReconnect>
          <LookAheadChunks>2</LookAheadChunks>
          <Archive enabled="false">
            <Path useEventIdOnPath="false" />
          </Archive>
          <ClientConnections enabled="true">
            <ClientManifestVersion>2.0</ClientManifestVersion>
          </ClientConnections>
          <ServerConnections enabled="false">
            <SendEndOfStreamOnStop>false</SendEndOfStreamOnStop>
          </ServerConnections>
        </Settings>
      </SmoothStreaming>
    </content>
  </entry>

IIS is giving me a 405/Bad Request error with this body:

<?xml version="1.0" encoding="UTF-8"?>
<SmoothStreaming xmlns="http://schemas.microsoft.com/iis/media/2011/03/streaming/management">
  <Error>
    <ErrorCode>0x80880026</ErrorCode>
    <ErrorMessage>The resource contains one or more elements that contain invalid data. For information about valid resource representations, please see the documentation for the supported schemas.</ErrorMessage>
  </Error>
</SmoothStreaming>

Anyone knows what I'm doing wrong here?

War es hilfreich?

Lösung

Ommiting the "Archive" and "ServerConnections" nodes fixed it. Not sure it there's anything wrong in them, or if they're only supposed to be included when enabled=true.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top