there are good solutions to get data from office 365, and move it to another platform using client object model.. i.e Wictor Wilen solution. its work in code behind.
i have tried to get list data from office 365, to another platform like azure project(html page).
i did try to using .asmx
webservices. that works perfectly in Office 365 Site page. but when script swift to any other html page(azure project). its not working.i have passed credentials even if they are not working. Here is my script.
function GetData()
{
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'><listName>Cloud</listName><query><Query></Query></query> \
<viewFields> \
<ViewFields> \
<FieldRef Name='OfficeCountry' /> \
<FieldRef Name='Title' /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "https://nexpo.sharepoint.com/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
processData: false,
beforeSend : function(req) {
req.setRequestHeader('Authorization',
make_base_auth ('username', 'pwd'));
},
complete: processResult,
contentType: "text/xml; charset=\"utf-8\""
});
}
function processResult(xData, status) {
$(xData.responseXML).find("z\\:row").each(function() {
var lititle= $(this).attr("ows_Title");
alert(lititle);
});
}
function make_base_auth(user, password) {
var tok = user + ':' + password;
var hash = Base64.encode(tok);
return "Basic " + hash;
}
it may be becauses of a cross domain problem. but is this possible to do this in this manner? does anyone have a better solution or idea to retrive the data?