I am developing wp7 application. I have done the authentication of the user through authentication.asmx. For this I have referred the following link
http://blogs.msdn.com/b/pstubbs/archive/2010/10/04/developing-windows-phone-7-applications-for-sharepoint-2010.aspx
N开发者_如何学Cow I am trying to consume the lists.asmx as described in the above code. For this I have dowloaded the sample code from the given link. In the sample link there is one folder SampleData and SPTasksSampleData.xml. These are the two things I am completely unable to unserstand. I think thats why I am getting the following error
"The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '"
I am getting the above error after passing through the code
lists.GetListItemsAsync(
"ABC", //List Name
String.Empty, //View Name
null, //query
null, //view fields
null, //row limit
null, //query options
null); //webID
Also I am not able to understand what is element.Attribute("ows_LinkTitle") means ows_LinkTitle is referring to what ? Is it referring to column name of list or something else.
Can you please tell me where I am going wrong ? Can you please tell me what modifications I need to do in my code so that I can display the list data on my WP7 application ? If I am doing anything wrong then please guide me.
You need to inspect the results that you are getting back from SharePoint. Since it says that it is returning text/html it is telling you that the web service isn't responding with XML. That's a sure sign that something is wrong. The real error message might be in that html or you might have to check the server logs for more information. In any case, you need to dig more into what the server is telling you.
精彩评论