4 Replies Latest reply on Jun 9, 2016 6:52 AM by robertd5930284

    Exception with soap.request input

    robertd5930284 Level 1

      I'm trying to build a SOAP request into a form in Acrobat DC, but I can't get the input parameter for the SOAP request to work.

       

      I'm using the examples on the Acrobat SDK site, and this is my code.  The debugger throws an exception at the indicated line but doesn't say why.

      var cURL="http://mysite/_layouts/AppNumberService/NumberService.asmx?WSDL"
      var oParam = "AppName";

      var response = Net.SOAP.request(
      {
           cURL: cURL,
           oRequest: {
               "http://tempuri.org/:IncrementandFetchNumber": {
                     application:oParam  << Exception here
                }
           }
      });

      var result = response["http://tempuri.org/:IncrementandFetchNumber"]["IncrementandFetchNumberResult"];

       

      The SOAP request uses a SOAP service on our SharePoint site. This is the sample request and response format displayed when I go tot he asmx page for this service.

      Request:

      <?xml version="1.0" encoding="utf-8"?>
      <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/">
        <soap:Body>
          <IncrementandFetchNumber xmlns="http://tempuri.org/">
            <application>string</application>
          </IncrementandFetchNumber>
        </soap:Body>
      </soap:Envelope>

      RESPONSE:

      <?xml version="1.0" encoding="utf-8"?>
      <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/">
        <soap:Body>
          <IncrementandFetchNumberResponse xmlns="http://tempuri.org/">
            <IncrementandFetchNumberResult>string</IncrementandFetchNumberResult>
          </IncrementandFetchNumberResponse>
        </soap:Body>
      </soap:Envelope>

       

      The SOAP service does work from other application (e.g. InfoPath) and if use the following code in Acrobat, it does list the SOAP services.

      var service = Net.SOAP.connect(cURL);

      for(var i in service) console.println(i);

       

      So I'm not sure what I'm doing wrong. Any ideas?