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 as follows:
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 searched on google, but the closest result I got was "Connectivity failure"
Can anyone tell me if I need to configure something else in SharePoint to work correctly on SPServices or is there some error in the code?