• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get Response of SOAP method call to Sharepoint web service in Acrobat Javascript?

New Here ,
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

I had written below function to read list item values from Sharepoint list but i am unable to find how to read the return value.

I am calling ShowDialog() function on menu item click. and below is my code. Please provide input how to read response of SOAP method. below code shows me error "Response is undefine"

function ShowDialog() 

{

  // Dialog Activation

  app.beginPriv();

  var listItemId = '1';

  var title = 'new title again';

  var listId = '{19736DC6-B732-4D25-8DAA-9E0FD808CA30}';

  var siteUrl = 'http://pr-sharepoint.rothman.local/';

  var batch =

        '<Batch OnError="Continue">'+

            '<Method ID="1" Cmd="Update">'+

                '<Field Name="ID">' + listItemId + '</Field>'+

                '<Field Name="Title">' + title + '</Field>'+

            '</Method>'+

        '</Batch>';

  app.endPriv();

  oDlg.strName = "Larry";

    if( "ok" == app.execDialog(oDlg))

  {

      getDocTypeListItems(siteUrl, listId);

  }

}

//helper function for get list item from web service

function getDocTypeListItems(siteUrl, listId)

{

  var oAuthenticator ={ UsePlatformAuth: "true"};

  var oRequest = {

        soapValue: '<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+

      '<listName>' + listId + '</listName>'+

      '<viewName>All Items</viewName>'+

      '<query></query>'+

      '<viewFields>Title</viewFields>'+

      '<rowLimit></rowLimit>'+

      '<queryOptions></queryOptions>'+

      '<webID></webID>'+

    '</GetListItems>'

  };

  var cAction = "http://schemas.microsoft.com/sharepoint/soap/GetListItems";

   

  var ver = SOAPVersion.version_1_2;

    var response = SOAP.request ({

        cURL: siteUrl + "_vti_bin/lists.asmx",

  oRequest:oRequest,

        cAction:cAction,

  oAuthenticate:oAuthenticator,

  cResponseStyle: SOAPMessageStyle.Message,

        bEncoded:false,

      cVersion:ver

    });

  //var responseString = "http://pr-sharepoint.rothman.local/_vti_bin/lists.asmx?op=GetListItems";

  //var result = response[responseString]["return"];

  //var result = response['http://schemas.microsoft.com/sharepoint/soap/GetListItemsResponse']

  //['http://schemas.microsoft.com/sharepoint/soap/GetListItemsResult'];

  //app.alert(result);

}

TOPICS
Acrobat SDK and JavaScript , Windows

Views

560

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation