2
I created a Spservices that queries a list in Sharepoint 2010 and returns the value of a single field. However, this query is returning the following error:
soap:ServerException of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.Não existe nenhuma Web chamada "/blog/Lists/Postagens/_vti_bin/Lists.asmx".
My code is this:
var queryText = "<Query>"+
"<Where>"+
"<Eq>"+
"<FieldRef Name='ID'/>"+
"<Value Type='Number'>" + IDPost + "</Value>"+
"</Eq>"+
"</Where>"+
"</Query>";
$().SPServices({
operation: 'GetListItems',
async: false,
listName: 'Postagens',
webURL: 'http://site/subsite/Lists/Postagens/',
CAMLViewFields: '<ViewFields>'+
'<FieldRef Name="Curtir" />'+
'</ViewFields>',
CAMLQuery : queryText,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode('z:row').each(function() {
CurtirTot = $(this).attr('ows_Curtir');
});
}
});
I googled, but the closest result I got was "Connectivity failure"
Can anyone tell me if I need to set up something else in Sharepoint to work properly on Spservices or is there an error in the code ?
I tried to take out the "Weburl" parameter and it worked. Thank you
– Luanna Iozzi
About this parameter, it should be used only when you are making requests from one site to another. If you are on the site itself blog, then he’s really expendable.
– Oralista de Sistemas