2010-12-10 10 views

Antwort

3

Hier gehen Sie:

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

ich die jQuery-Bibliothek empfehlen, für Sharepoint Web Service bekommen (SPServices) von CodePlex: http://spservices.codeplex.com
Es wird Ihnen für diesen Anruf einen Wrapper geben und jeden anderen Sharepoint-Web-Service es gibt.