I am developing window phone application. I am consuming the sharepoint web services exposed by the sharepoint 2010. So firstly I am authenticating with the authentication.asmx. I am able to authenticate with the authentication.asmx. Then I am trying to access the list data using the Lists.asmx. For this I am using the following link
http://blogs.msdn.com/b/pstubbs/archive/2010/10/04/developing-windows-phone-7-applications-for-sharepoint-2010.aspx
By following the above link in my code I am getting the System.ServiceModel.ProtocolException at following method
lists.GetListItemsAsync()
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:
For this scenario I have serached on the internet and I come across the following two link. These are the two link which I am thinking might be useful
http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/9003839f-ec0e-473f-b86d-1b325d5c1a18/
http://msdn.microsoft.com/en-us/library/dd456789.aspx
The first link says that MOSS 2010 doesnt support .NET Framework 4. It supports the .NET Framework 3.5. .NET Framework 4 provides the new CLR. The second link says that if we try to consume .NET 3.5 WCF Service from .NET 4 then we will get the ProtocolException.
Then I am finding me in dought whether I can consume the Sharepoint 2010 list services on my WP7 application or not ?
开发者_Python百科Can you please tell me whether this is possible or not ? Can you please provide me your suggestions. If I am doing anything wrong then please guide me.
If your SharePoint 2010 installation supports OData, then you can use the technique outlined in Jan Tielens' blog:
http://weblogs.asp.net/jan/archive/2010/04/22/accessing-sharepoint-2010-data-with-rest-odata-on-windows-phone-7.aspx
I've used that technique before and so long as the server is configured correctly, it works like a champ.
/chris
精彩评论