Reputation: 735
I want to access sharepoint list webservice from classic ASP Page. I am creating the soap xml format and trying to call the webservice url, like this
Dim http ,soap
soap = "<?xml version='1.0' encoding='utf-8'?>"
soap =soap & "<soap12:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap12='http://www.w3.org/2003/05/soap-envelope'>"
soap =soap & "<soap12:Body>"
soap =soap & "<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"
soap =soap & "<listName>Posts</listName>"
soap =soap & "<viewName></viewName>"
soap =soap & "<query></query>"
soap =soap & "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Modified'/><FieldRef Name='DefaultViewUrl'/><FieldRef Name='ID'/><FieldRef Name='Author'/><FieldRef Name='Name'/><FieldRef Name='Body'/><FieldRef Name='NumComments'/><FieldRef Name='DefaultViewUrl'/></ViewFields>"
soap =soap & "<rowLimit>5</rowLimit>"
soap =soap & "<QueryOptions><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns><DateInUtc>FALSE</DateInUtc></QueryOptions>"
soap =soap & "</GetListItems>"
soap =soap & "</soap12:Body>"
soap =soap & "</soap12:Envelope>"
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "POST", URL, False
http.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
http.send(soap)
But i am getting the error like "An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator..."
Do I need to pass any authentication or something else is the problem?.
Upvotes: 0
Views: 1312
Reputation: 384
If you are not under the SharePoint site, the problem is you are getting denied access. SharePoint is expecting a cookie or NTLM authorization to do this.
Can you relay a little more?
David Sterling Sterling International Consulting Group davidmsterling.blogspot.com www.sharepoint-blog.com
Upvotes: 1