Consuming the sitefinty Formsservice.svc

Posted by Community Admin on 04-Aug-2018 21:49

Consuming the sitefinty Formsservice.svc

All Replies

Posted by Community Admin on 27-Nov-2012 00:00

Hi 
I am trying to retrieve the responses from a Sitefinbity form usinfg the webservice call. For now I am testing the call using an xmlhttp request as below.

I am getting a response when I use t his as the url to the request

url= www.kramesstaywell.com/.../
like this
xmlhttp.open('GET',url,true);

However when I try to retrieve the responses for a particular form using the url below  I am getting the following error

url =www.kramesstaywell.com/.../MetroTest

Error: "Detail":"Value cannot be null.\u000d\u000aParameter name: No
persistent type with name:
Telerik.Sitefinity.DynamicTypes.Model.MetroTest"

Will you be able to tell me whats wrong with the URL above?

I am also attaching the test html I have been using
Any help is greatly appreciated.
Thanks in advance
KSW




Posted by Community Admin on 30-Nov-2012 00:00

Hi Sajitha,

 You can take a look at some of these resources for consuming web services in Sitefinity.

Restful Services in SF
Working with web services in SF

Also are you calling this from a widget, page code-behind, or another solution?

Regards,
Patrick Dunn
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 30-Nov-2012 00:00

Hi Patrick,
Thanks for the response. My final goal is to access the sitefinity webservice from Salesforce. However I am now testing it using a simple javascript xmlhttp call.  I understand that we need to first authenticate the user before we can access any of the webservice, which eventually I will have to implement. But for now I am logging on to the backend on the browser and the accessing the webservice from the same browser, so that way the cookie is created in the browser. 
The code below works and returns all the available forms.
Howevere if I change the url variable to the one commented out(url for the responses for a form) below it gives the following error I mentioned in my previous post. It looked like I need to pass some parameters like providername.. etc? If so what value would i use as parameter. The help document that is available for the webservice does not give examples of the sample values that should be passed for the providename and other parameters :

 Error: "Detail":"Value cannot be null.\u000d\u000aParameter name: No persistent type with name: Telerik.Sitefinity.DynamicTypes.Model.MetroTest"

 <script language="javascript">
var xmlhttp;
function init()
// put more code here in case you are concerned about browsers that do not provide XMLHttpRequest object directly
xmlhttp = new XMLHttpRequest();

function getdetails()
var url = "www.kramesstaywell.com/.../";
// var url =   http://www.kramesstaywell.com/sitefinity/Services/Forms/FormsService.svc/entries/MetroTest";
xmlhttp.open('GET',url,true);
xmlhttp.send(null);
xmlhttp.onreadystatechange = function()
if (xmlhttp.readyState == 4)
if ( xmlhttp.status == 200)
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

else
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

;

</script>

Posted by Community Admin on 04-Dec-2012 00:00

Hi Sajitha,

 In IE visit the help page for your service. In this case it will be

YourDomain.com/.../help

It will give you examples of how to make a variety of different calls to the service. For example:

Getting a Form Entry
localhost:15014/.../

I hope this helps and keep in mind only IE will render the help pages correctly. FF/Chrome just display a jumble of URLs that are near impossible to read.

Greetings,
Patrick Dunn
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed