Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6747527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:27:17+00:00 2026-05-26T12:27:17+00:00

I am trying to call a SharePoint web service from Acrobat JavaScript, and I

  • 0

I am trying to call a SharePoint web service from Acrobat JavaScript, and I am encountering an error that I cant seem to get around. Hoping for some help on what I am doing wrong to call sharepoint. I have seen two ways of doing a SOAP call to a web service:

Way 1:

var strURL = "http://www.webservicex.net/globalweather.asmx?wsdl";
      var service = SOAP.connect(strURL);
      var sCountryName = "United States";
      var sCityName = "New York";
      var result = {
                  soapType: "xsd:string",
                 CountryName: sCountryName,
                   CityName: sCityName
                   //soapValue:
                  };
      var results = service.GetWeather(result);

This works when I copy the code directly, but when I try and replace it with my code, I get “service is undefined” error message:

var strURL = "http://dev-dc:40570/branches/GHIS/XXXXXXX/_vti_bin/lists.asmx?wsdl";
      var service = SOAP.connect(strURL);

      var sPageURL = "http://devdc:40570/branches/GHIS/XXXXXXX/Other%20Client%20Documents/XXXXXXX.pdf";
      var sCheckoutToLocal = "false";
      var sLastModified = "";
      var result = {
                    soapType: "xsd:string",
                    pageURL: sPageURL,
                    checkoutToLocal: sCheckoutToLocal,
                    LastModified: sLastModified
                  };
      var results = service.CheckOutFile(result);

Since this didn’t work, I tried method 2 for calling the webservice:

var oAuthenticator ={ UsePlatformAuth: "true"};
var cURL = "http://www.webservicex.net/globalweather.asmx";
var oRequest = {"http://www.webserviceX.NET:GetWeather":{CityName:"New York",CountryName:"United States"}};
var cAction = "http://www.webserviceX.NET/GetWeather";
var ver = SOAPVersion.version_1_2;
SOAP.wireDump = "true";
var response = Net.SOAP.request({cURL:cURL,oRequest:oRequest,cAction:cAction,oAuthenticate:oAuthenticator,bEncoded:false,cVersion:ver});

I got an error with this style though saying that CountryName was not supplied. Using my code, I got a similar error saying that pageUrl was missing or invalid:

var oAuthenticator ={ UsePlatformAuth: "true"};
    var cURL = "http://dev-dc:40570/branches/GHIS/XXXXXXX/_vti_bin/lists.asmx?wsdl";
    var oRequest = {
        "http://schemas.microsoft.com/sharepoint/soap:CheckOutFile":{
            pageUrl:"http://dev-dc:40570/branches/GHIS/XXXXXXX/Other%20Client%20Documents/XXXXXXX.pdf",
            checkoutToLocal:"false",
            lastmodified:""
            }};
    var cAction = "http://schemas.microsoft.com/sharepoint/soap/CheckOutFile";
    var ver = SOAPVersion.version_1_1;
    SOAP.wireDump = "true";
    var response = SOAP.request({
        cURL:cURL,
        oRequest:oRequest,
        cAction:cAction,
        oAuthenticate:oAuthenticator,
        bEncoded:false,
        cVersion:ver
        });

Can someone help me figure out why I cant seem to call this SharePoint web service? I dont care which method I use as long as I can talk to the webservice from within Acrobat’s javascript. Also, in case it helps, here is the recommended call when navigating to the webservice manually in the browser:

POST /_vti_bin/lists.asmx HTTP/1.1
Host: dev-dc
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CheckOutFile xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <pageUrl>string</pageUrl>
      <checkoutToLocal>string</checkoutToLocal>
      <lastmodified>string</lastmodified>
    </CheckOutFile>
  </soap12:Body>
</soap12:Envelope>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:27:18+00:00Added an answer on May 26, 2026 at 12:27 pm

    After doing some experimenting, I have learned that instead of using acrobat to build the request portion of the code, you can instead pass raw XML and it will pass it exactly as typed. Because of this, I determined that sharepoint must be looking for a specific way that XML is structured. By changing the code to pass XML Sharepoint and Acrobat were able to successfully communicate. The revised (working) code looks like this:

    /**WebService Call to the Sharepoint Lists service for Checking Out the current document**/
    function CheckOutFile(myFileVal){
        var oAuthenticator ={ UsePlatformAuth: "true"};
        var cURL = GetDocLibraryWS(myFileVal.path); 
        var oRequest = {
            soapValue: "<CheckOutFile xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"+
                            "<pageUrl>"+myFileVal.path+"</pageUrl>"+
                            "<checkoutToLocal>false</checkoutToLocal>"+
                            "<lastmodified/>"+
                        "</CheckOutFile>"};
        var cAction = "http://schemas.microsoft.com/sharepoint/soap/CheckOutFile";
        var ver = SOAPVersion.version_1_2;
        var response = SOAP.request({
            cURL:cURL,
            oRequest:oRequest,
            cAction:cAction,
            oAuthenticate:oAuthenticator,
            bEncoded:false,
            cVersion:ver
            });}
    /**derives the document library web service path from the file URL**/
    function GetDocLibraryWS(myFile){
        var myString = myFile.substring(0,myFile.lastIndexOf("/"));
        myString = myString + "/_vti_bin/Lists.asmx";
        return myString;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use jQuery to get data from an ASP.NET web service (SharePoint
I'm trying to call a web service from Excel 2003 module. The way i've
I'm trying to learn to call SharePoint Web Services from an external C# client.
I'm trying to create a C# program using a Sharepoint Web Service reference that
I get this error trying call my service in WcfTestClient My config: <services> <service
When trying to call a web method from the .net compact framework I get
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException:
I am trying to call GetUserInfo on a sharepoint list (using the sharepoint web
I trying to call some ejb bean method from tread. and getting error :
I have created a custom SharePoint web service that was deployed to, and successfully

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.