Guest User

Untitled

a guest
Dec 4th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. function call2WS() {
  2. var soapEnv = "<?xml version='1.0' encoding='utf-8'?>
  3. <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/'>
  4. <soap:Body>
  5. <GetUserProfileByName xmlns='http://microsoft.com/webservices/SharePointPortalServer/UserProfileService'>
  6. <AccountName>domain\username</AccountName>
  7. </GetUserProfileByName>
  8. </soap:Body>
  9. </soap:Envelope>";
  10.  
  11. var call = $.ajax({
  12. url: "http://sharepoint/_vti_bin/UserProfileService.asmx/GetUserProfileByName",
  13. type: "POST",
  14. dataType: "xml",
  15. username: "domain\username",
  16. password: "passwd",
  17. data: soapEnv,
  18. headers: {
  19. contentType: "text/xml; charset="utf-8""
  20. }
  21. });
Add Comment
Please, Sign In to add comment