+ Reply to Thread
Results 1 to 4 of 4

Thread: Unable to add job: Object reference not set to an instance of an object.

  1. #1

    Unable to add job: Object reference not set to an instance of an object.

    I知 trying to submit the job via API, but I知 getting error.
    The problem I have is that if I try to submit the job using curl and I知 getting the following error: <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Unable to add job: Object reference not set to an instance of an object.</string>
    curl -H "Accept: application/xml" -H "Content-type: application/xml" --data "
    > <JobCreateInfo>
    > <Name>Test</Name>
    > <QueueId>00000000-0000-0000-0000-000000000000</QueueId>
    > <JobMediaInfo>
    > <CompressionPresetList>
    > <CompressionPreset>
    > <PresetId>758c03b4-7dee-4f58-84a1-e966c95432bf</PresetId>
    > </CompressionPreset>
    > </CompressionPresetList>
    > <DestinationList>
    > <DestinationInfo>
    > <FileUri>file://C:\Temp\0b0834c5-1528-4c9d-acf2-2cb24b4cac82.flv</FileUri>
    > </DestinationInfo>
    > </DestinationList>
    > <SourceMedia>
    > <FileUri>
    > file://C:\Temp\0b0834c5-1528-4c9d-acf2-2cb24b4cac82.flv</FileUri>
    > </SourceMedia>
    > </JobMediaInfo>
    > </JobCreateInfo>"http://hostname/api/jobs/
    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Unable to add job: Object reference not set to an instance of an object.</string>

    I have IP based authentication,
    Many thanks for any help to sort it out.
    Thanks,
    Marek

  2. #2
    Hi Marek,

    I'm not familiar with curl, so I might be wrong, but it looks like it needs to tell that this is a POST request.

    Thank you.
    Terri

  3. #3
    Terri,

    I just used the example from the Public API doc. curl is normally using POST. Do you have an example using other programming language (preferably python) ?
    Thanks,

    Marek



    [QUOTE=terri;16716]Hi Marek,

    I'm not familiar with curl, so I might be wrong, but it looks like it needs to tell that this is a POST request.

    Thank you.
    Terri[/QUOTE]

  4. #4
    Hello,

    We don't have a sample code written in python. We provide a C# sample code using Squeeze Server API.(not using Rest API)

    The way we test our Rest api is to use Fiddler.
    http://www.telerik.com/fiddler

    The attached picture shows how create a job in Fiddler.
    I've used your xml string and it created a job successfully.
    Please try it in Fiddler and let us know if you have more questions.

    Thank you.
    Terri
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	Create a job in Fiddler.png
Views:	297
Size:	74.1 KB
ID:	533  

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts