WSDL

From A-SMIL.org
Jump to: navigation, search

The following WSDL specification describes the Adfotain API (AdAPI) 1.0 interface common to SMIL-compatible digital signage media players.

You can download it here: Media:Adapi-1_0.wsdl.

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions targetNamespace="http://schemas.adfotain.org/adapi-1.0"
    xmlns:adapi="http://schemas.adfotain.org/adapi-1.0"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:whttp="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:wmime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

  <wsdl:documentation>
    This document describes Adfotain API for XMP devices.
    Copyright (C) 2008, 2009 by IAdea Corporation. All Rights Reserved.
  </wsdl:documentation>

  <wsdl:types>
    <xsd:schema targetNamespace="http://schemas.adfotain.org/adapi-1.0">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> 

      <xsd:complexType name="ChunkInfo">
        <xsd:sequence>
          <xsd:element name="checksum" type="xsd:hexBinary"/>
        </xsd:sequence>
      </xsd:complexType> 

      <xsd:complexType name="ArrayOfChunkInfo">
        <xsd:sequence>
          <xsd:element name="chunk" type="adapi:ChunkInfo" minOcurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="Meta">
        ArrayOfChunkInfo
        <xsd:attribute name="name" type="xsd:NCName" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="optional"/>
      </xsd:complexType>

      <xsd:complexType name="Metadata">
        <xsd:sequence>
          <xsd:element name="meta" type="adapi:Meta" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:simpleType name="DigestAlgorithm">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="NONE"/>
          <xsd:enumeration value="MD5"/>
          <xsd:enumeration value="SHA1"/>
        </xsd:restriction>
      </xsd:simpleType>

      <xsd:simpleType name="FindFilterType">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="ID"/>
          <xsd:enumeration value="URI"/>
          <xsd:enumeration value="PROTOCOL"/>
          <xsd:enumeration value="HOST"/>
          <xsd:enumeration value="TYPE"/>
          <xsd:enumeration value="STATE"/>
          <xsd:enumeration value="IS"/>
          <xsd:enumeration value="AFTER"/>
          <xsd:enumeration value="BEFORE"/>
          <xsd:enumeration value="METADATA"/>
          <xsd:enumeration value="NOT"/>
          <xsd:enumeration value="AND"/>
          <xsd:enumeration value="OR"/>
          <xsd:enumeration value="CONTINUE"/>
        </xsd:restriction>
      </xsd:simpleType>

      <xsd:complexType name="ObjectFilter">
        <xsd:attribute name="type" type="adapi:FindFilterType" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="optional"/>
     </xsd:complexType>

      <xsd:complexType name="ArrayOfObjectFilter">
        <xsd:sequence>
          <xsd:element name="filter" type="adapi:ObjectFilter" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>          
      </xsd:complexType>

      <!-- device report -->

      <xsd:complexType name="Resource">
        <xsd:sequence>
          <xsd:element name="resourceURI" type="xsd:string"/>
          <xsd:element name="metadata" type="adapi:Metadata"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="ResourceInfo">
        <xsd:sequence>
          <xsd:element name="resource" type="adapi:Resource" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:simpleType name="ObjectState">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="TRANSFER"/>
          <xsd:enumeration value="STREAMING"/>
          <xsd:enumeration value="CHECKSUM"/>
          <xsd:enumeration value="CHECKSUM_ERROR"/>
          <xsd:enumeration value="COMPLETE"/>
        </xsd:restriction>
      </xsd:simpleType>

      <xsd:complexType name="Object">
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:attribute name="persistent" type="xsd:boolean" use="required"/>
        <xsd:sequence>
          <xsd:element name="resourceURI" type="xsd:string"/>
          <xsd:element name="state" type="adapi:ObjectState"/>
          <xsd:element name="contentType" type="xsd:string"/>
          <xsd:element name="contentLength" type="xsd:unsignedLong"/>
          <xsd:element name="lastModified" type="xsd:string"/>
          <xsd:element name="expires" type="xsd:string"/>
          <xsd:element name="transferLength" type="xsd:unsignedLong"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="ObjectInfo">
        <xsd:sequence>
          <xsd:element name="object" type="adapi:Object" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="ContentDirectory">
        <xsd:sequence>
          <xsd:element name="resourceInfo" type="adapi:ResourceInfo" minOccurs="0" maxOccurs="1"/>
          <xsd:element name="objectInfo" type="adapi:ObjectInfo" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:simpleType name="PlayInstanceState">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="STOPPED"/>
          <xsd:enumeration value="ERROR_STOPPED"/>
          <xsd:enumeration value="TRANSITIONING"/>
          <xsd:enumeration value="PLAYING"/>
          <xsd:enumeration value="PAUSED_PLAYBACK"/>
        </xsd:restriction>
      </xsd:simpleType>

      <xsd:complexType name="PlayInstance">
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:sequence>
          <xsd:element name="state" type="adapi:PlayInstanceState"/>
          <xsd:element name="currentURI" type="xsd:string"/>
          <!--<xsd:element name="metadata" type="adapi:Metadata"/>-->
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="PlayInstanceInfo">
        <xsd:sequence>
          <xsd:element name="instance" type="adapi:PlayInstance" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="PlayState">
        <xsd:sequence>
          <xsd:element name="instanceInfo" type="adapi:PlayInstanceInfo" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="PlayerInfo">
        <xsd:attribute name="id" type="xsd:string" use="required"/>
        <xsd:sequence>
          <xsd:element name="contentDirectory" type="adapi:ContentDirectory" minOccurs="0" maxOccurs="1"/>
          <xsd:element name="playState" type="adapi:PlayState" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="DeviceReport">
        <xsd:sequence>
          <xsd:element name="date" type="xsd:dateTime"/>
          <xsd:element name="version" type="xsd:string"/>
          <xsd:element name="player" type="adapi:PlayerInfo" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

    </xsd:schema>
  </wsdl:types>

  <!-- Session Interface -->

  <wsdl:message name="LoginRequest"/>
  <wsdl:message name="LoginResponse"/>
  <wsdl:message name="LogoutRequest"/>
  <wsdl:message name="LogoutResponse"/>

  <wsdl:portType name="Session_Interface">
    <wsdl:operation name="Login">
      <wsdl:input message="adapi:LoginRequest" name="LoginRequest"/>
      <wsdl:output message="adapi:LoginResponse" name="LoginResponse"/>
    </wsdl:operation>
    <wsdl:operation name="Logout">
      <wsdl:input message="adapi:LogoutRequest" name="LogoutRequest"/>
      <wsdl:output message="adapi:LogoutResponse" name="LogoutResponse"/>
    </wsdl:operation>
  </wsdl:portType>

  <wsdl:binding name="Session" type="adapi:Session_Interface">
    <wsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Login">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:Session:1#Login"/>
      <wsdl:input name="LoginRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:Session:1"/>
      </wsdl:input>
      <wsdl:output name="LoginResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:Session:1"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Logout">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:Session:1#Logout"/>
      <wsdl:input name="LogoutRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:Session:1"/>
      </wsdl:input>
      <wsdl:output name="LogoutResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:Session:1"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <!-- MediaControl Interface -->

  <wsdl:message name="PlayRequest">
    <wsdl:part name="instanceID" type="xsd:string"/>
    <wsdl:part name="currentURI" type="xsd:string"/>
    <wsdl:part name="currentURIMetaData" type="xsd:Metadata"/>
  </wsdl:message>
  <wsdl:message name="PlayResponse"/>

  <wsdl:message name="StopRequest">
    <wsdl:part name="instanceID" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="StopResponse"/>

  <wsdl:message name="GetStateRequest">
    <wsdl:part name="instanceID" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="GetStateResponse">
    <wsdl:part name="report" type="adapi:DeviceReport"/>
  </wsdl:message>

  <wsdl:portType name="MediaControl_Interface">
    <wsdl:operation name="Play" parameterOrder="instanceID currentURI currentURIMetaData">
      <wsdl:input message="adapi:PlayRequest" name="PlayRequest"/>
      <wsdl:output message="adapi:PlayResponse" name="PlayResponse"/>
    </wsdl:operation>
    <wsdl:operation name="Stop" parameterOrder="instanceID">
      <wsdl:input message="adapi:StopRequest" name="StopRequest"/>
      <wsdl:output message="adapi:StopResponse" name="StopResponse"/>
    </wsdl:operation>
    <wsdl:operation name="GetState" parameterOrder="instanceID report">
      <wsdl:input message="adapi:GetStateRequest" name="GetStateRequest"/>
      <wsdl:output message="adapi:GetStateResponse" name="GetStateResponse"/>
    </wsdl:operation>
  </wsdl:portType> 

  <wsdl:binding name="MediaControl" type="adapi:MediaControl_Interface">
    <wsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Play">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:MediaControl:1#Play"/>
      <wsdl:input name="PlayRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:input>
      <wsdl:output name="PlayResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Stop">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:MediaControl:1#Stop"/>
      <wsdl:input name="StopRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:input>
      <wsdl:output name="StopResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetState">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:MediaControl:1#GetState"/>
      <wsdl:input name="GetStateRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:input>
      <wsdl:output name="GetStateResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:MediaControl:1"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <!--ContentDirectory-->

  <!--
  [in] xsd:string destinationURI
  [in] xsd:string contentType
  [in] xsd:unsignedLong contentLength
  [in] xsd:dateTime lastModified
  [in] xsd:string maxAge
  [in] xsd:string contentChecksum
  [in] adapi:DigestAlgorithm checksumMethod
  [in] xsd:unsignedLong chunkSize
  [in] adapi:ChunkInfo[] chunkInfo
  [out] xsd:string objectID
  [out] xsd:string putPath
  -->

  <!--Messages of CreateObject Method-->
  <wsdl:message name="CreateObjectRequest">
    <wsdl:part name="destinationURI" type="xsd:string"/>
    <wsdl:part name="contentType" type="xsd:string"/>
    <wsdl:part name="contentLength" type="xsd:unsignedLong"/>
    <wsdl:part name="lastModified" type="xsd:dateTime"/>
    <wsdl:part name="maxAge" type="xsd:string"/>
    <wsdl:part name="contentChecksum" type="xsd:string"/>
    <wsdl:part name="checksumMethod" type="adapi:DigestAlgorithm"/>
    <wsdl:part name="chunkSize" type="xsd:unsignedLong"/>
    <wsdl:part name="chunkInfo" type="adapi:ArrayOfChunkInfo"/>
  </wsdl:message>
  <wsdl:message name="CreateObjectResponse">
    <wsdl:part name="objectID" type="xsd:string"/>
    <wsdl:part name="putPath" type="xsd:string"/>
  </wsdl:message>

  <!--Messages of RemoveResource Method-->
  <wsdl:message name="RemoveResourceRequest">
    <wsdl:part name="resourceURI" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="RemoveResourceResponse"/>

  <!--Messages of FindObject Method-->
  <wsdl:message name="FindObjectRequest">
    <wsdl:part name="findFilter" type="adapi:ArrayOfObjectFilter"/>
    <wsdl:part name="requestedCount" type="xsd:unsignedInt"/>
  </wsdl:message>
  <wsdl:message name="FindObjectResponse">
    <wsdl:part name="report" type="adapi:DeviceReport"/>
    <wsdl:part name="continueFilter" type="adapi:ArrayOfObjectFilter"/>
  </wsdl:message>  


  <wsdl:portType name="ContentManager_Interface">
    <!--Declare of CreateObject Method-->
    <wsdl:operation name="CreateObject" parameterOrder="destinationURI contentType contentLength lastModified maxAge contentChecksum checksumMethod chunkSize chunkInfo">
      <wsdl:input message="adapi:CreateObjectRequest" name="CreateObjectRequest"/>
      <wsdl:output message="adapi:CreateObjectResponse" name="CreateObjectResponse"/>
    </wsdl:operation>
    <!--Declare of RemoveResource Method-->
    <wsdl:operation name="RemoveResource" parameterOrder="resourceURI">
      <wsdl:input message="adapi:RemoveResourceRequest" name="RemoveResourceRequest"/>
      <wsdl:output message="adapi:RemoveResourceResponse" name="RemoveResourceResponse"/>
    </wsdl:operation>
    <!--Declare of FindObject Method-->
    <wsdl:operation name="FindObject" parameterOrder="findFilter requestedCount">
      <wsdl:input message="adapi:FindObjectRequest" name="FindObjectRequest"/>
      <wsdl:output message="adapi:FindObjectResponse" name="FindObjectResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  
  <wsdl:binding name="ContentManager" type="adapi:ContentManager_Interface">
    <wsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <!--instance of CreateObject Method-->
    <wsdl:operation name="CreateObject">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:ContentManager:1#CreateObject"/>
      <wsdl:input name="CreateObjectRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:input>
      <wsdl:output name="CreateObjectResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:output>   
    </wsdl:operation>
    <!--instance of RemoveResource Method-->
    <wsdl:operation name="RemoveResource">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:ContentManager:1#RemoveResource"/>
      <wsdl:input name="RemoveResourceRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:input>
      <wsdl:output name="RemoveResourceResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:output>
    </wsdl:operation>
    <!--instance of FindObject Method-->
    <wsdl:operation name="FindObject">
      <wsoap:operation soapAction="urn:schemas-adfotain-org:service:ContentManager:1#FindObject"/>
      <wsdl:input name="FindObjectRequest">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:input>
      <wsdl:output name="FindObjectResponse">
        <wsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            namespace="urn:schemas-adfotain-org:service:ContentManager:1"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  
  <!-- Service -->

  <wsdl:service name="adapi_1_0">
    <wsdl:port binding="adapi:Session" name="Session_Service">
      <wsoap:address location="http://localhost:80/adapi-1.0/control/urn:adfotain-org:serviceId:Session"/>
    </wsdl:port>
    <wsdl:port binding="adapi:MediaControl" name="MediaControl_Service">
      <wsoap:address location="http://localhost:80/adapi-1.0/control/urn:adfotain-org:serviceId:MediaControl"/>
    </wsdl:port>
    <wsdl:port binding="adapi:ContentManager" name="ContentManager_Service">
      <wsoap:address location="http://localhost:80/adapi-1.0/control/urn:adfotain-org:serviceId:ContentManager"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

Related