2010-12-10 31 views

Répondre

3

Ici, vous allez:

var xml = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'; 
    xml += ' <soap:Body>'; 
    xml += ' <GetUserLoginFromEmail xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">'; 
    xml += '  <emailXml><Users><User Email="[email protected]"/></Users></emailXml>'; 
    xml += ' </GetUserLoginFromEmail>'; 
    xml += ' </soap:Body>'; 
    xml += '</soap:Envelope>'; 

$.ajax({ 
    type: 'POST', 
    url: '/_vti_bin/usergroup.asmx', 
    dataType: 'xml', 
    contentType: "text/xml; charset=utf-8", 
    data: xml, 
    success: function(data) { 
     // data is here. You can use .attr("Attribute") to get, well, attributes! 
     console.log($(data).find("User")); 
    } 
}); 
2

Je recommande fortement d'obtenir la bibliothèque jQuery pour les services Web SharePoint (de SPServices) de CodePlex: http://spservices.codeplex.com
Il vous donnera une enveloppe pour cet appel et tous les autres services Web SharePoint il y a.