Latest post Thu, Nov 2 2017 10:44 PM by alexfx. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • Fri, Oct 27 2017 5:10 AM

    • alexfx
    • Not Ranked
    • Joined on Fri, Oct 27 2017
    • Posts 12
    • Points 110

    CheckInAAF via python

    Hello,

    I'm attempting to call CheckinAAF. Via soapui I am successful using MTOM. Via python with the Zeep module it seems MTOM is not supported so I'm trying to base64 encode the AAF, which fails with 

    Fault: An unexpected error occurred checking in asset to interplay://AvidWG/Projects/02/Del_test/AlexTest  XML returned from getMetadata is empty Filename=C:\Program Files\Avid\Interplay Web Services\.\apache-tomcat\temp\md_7465657294711782608.tmp.

    Searching around has yielded little information on this error or MTOM attachments with a SOAP python client. Has anyone successfully done this?

    Cheers,

    Alex

  • Fri, Oct 27 2017 8:23 PM In reply to

    • Vadym
    • Not Ranked
    • Joined on Thu, Apr 17 2014
    • Posts 176
    • Points 2,225
    • Avid Developer Moderator
      Avid Employee

    Re: CheckInAAF via python

    Hi Alex,

    The error you see typically means that payload has not been parsed correctly thus temporary file is empty.

    Please share raw request from the succesfull SoapUI attempt for review.

     

    Thanks

  • Sun, Oct 29 2017 8:34 PM In reply to

    • alexfx
    • Not Ranked
    • Joined on Fri, Oct 27 2017
    • Posts 12
    • Points 110

    Re: CheckInAAF via python

    Hi Vadym,

    Here is a successful raw request.

     

    POST http://mca-tv-av-sv01/services/Assets HTTP/1.1

    Accept-Encoding: gzip,deflate

    Content-Type: multipart/related; type="application/xop+xml"; start="<rootpart@soapui.org>"; start-info="text/xml"; boundary="----=_Part_0_71082943.1509306529311"

    SOAPAction: ""

    MIME-Version: 1.0

    Content-Length: 630441

    Host: mca-tv-av-sv01

    Connection: Keep-Alive

    User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

     

     

    ------=_Part_0_71082943.1509306529311

    Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"

    Content-Transfer-Encoding: 8bit

    Content-ID: <rootpart@soapui.org>

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://avid.com/interplay/ws/assets/types">

       <soapenv:Header>

          <typ:UserCredentials>

             <typ:Username>*****</typ:Username>

             <typ:Password>*****</typ:Password>

          </typ:UserCredentials>

       </soapenv:Header>

       <soapenv:Body>

          <typ:CheckInAAF>

             <typ:InterplayURI>interplay://AvidWG/Projects/02/Del_test/AlexTest</typ:InterplayURI>

             <typ:AAF><inc:Include href="cid:TEST.aaf" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></typ:AAF>

          </typ:CheckInAAF>

       </soapenv:Body>

    </soapenv:Envelope>

    ------=_Part_0_71082943.1509306529311

    Content-Type: application/octet-stream; name=TEST.aaf

    Content-Transfer-Encoding: binary

    Content-ID: <TEST.aaf>

    Content-Disposition: attachment; name="TEST.aaf"; filename="TEST.aaf"

     

    ��ࡱ�AAFB

  • Mon, Oct 30 2017 11:29 PM In reply to

    • Vadym
    • Not Ranked
    • Joined on Thu, Apr 17 2014
    • Posts 176
    • Points 2,225
    • Avid Developer Moderator
      Avid Employee

    Re: CheckInAAF via python

    Thanks Alex,

    So what you mean is that the module you're using doesn't have MTOM encoding? Then use plain request or another module with MTOM support.

     

    Thanks

  • Thu, Nov 2 2017 10:44 PM In reply to

    • alexfx
    • Not Ranked
    • Joined on Fri, Oct 27 2017
    • Posts 12
    • Points 110

    Re: CheckInAAF via python

    I managed to get MTOM encoding working with the python module I'm using (Zeep) with a little tweaking. Thanks!

Page 1 of 1 (5 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller