Getting a Fault code error while calling the GetRecurringReports method. What am I missing?
Hello,
We are in the process of testing the SOAP API for requesting usage reports from Panopto. We are using SOAPUI to test this out. The ASPXAUTH code/cookie was already generated via the "LogOnWithPassword' request and the corresponding cookie value has been added to the request header. However, upon calling the getRecurringReports API, we are getting the below error response. Looking at the error it seems like we need to create a client but don't know how we would do that via the SOAPUI request. Any help will be greatly appreciated? Thanks.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:pan="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40">
<soapenv:Header/>
<soapenv:Body>
<tem:GetRecurringReports>
<!--Optional:-->
<tem:auth>
<!--Optional:-->
<pan:AuthCode>?</pan:AuthCode>
<!--Optional:-->
<pan:Password>?</pan:Password>
<!--Optional:-->
<pan:UserKey>?</pan:UserKey>
</tem:auth>
<!--Optional:-->
<tem:reportType>SessionUsage</tem:reportType>
</tem:GetRecurringReports>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">Value cannot be null.
Parameter name: source</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
Thank You!
Answers
Hello Shakil,
We cannot give advice about specific development tools or frameworks. Many SOAP clients introduce subtle differences in their implementation of the SOAP spec and we don't officially support any clients.
Here is a minimal body that I confirmed resulted in a well-formed request and valid response:
<?xml version='1.0' encoding='utf-8'?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<ns0:GetRecurringReports xmlns:ns0="http://tempuri.org/">
<ns0:reportType>SessionUsage</ns0:reportType>
</ns0:GetRecurringReports>
</soap-env:Body>
</soap-env:Envelope>
You mentioned that you're including the ASPXAUTH cookie in the request headers. Please ensure that it's well-formed (e.g. Cookie=".ASPXAUTH=1234567890ABCDEF;"). A common mistake with SOAP headers is to omit some that are required. In your case, please ensure that you've set Content-Type="text/xml" and SOAPAction="http://tempuri.org/IUsageReporting/GetRecurringReports".
Good luck!
Mark
Thanks Mark. We were able to get it working. Fyi, we had to include the csrfToken value as part of the cookie in addition to the ASPXAUTH cookie to get it to authenticate and receive the correct response. I have a follow-up question, how long is the authentication cookie valid? Is it permanent or does it have to be re-generated at some point in the future?
Once again, thank you for your assistance re: the issue. 😃
Have a refreshing weekend!
Shakil