title: How to get response of soap web service in adobe acrobat reader?
body: <p>I have created a soap web service and want to show the response that web service in adobe acrobat reader. I have created a new file in adobe acrobat->reader->javascripts folder named MenuConfig.js and added code in that file.
  Now I am trying to show the response of soap web service using ajax call.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>app.addMenuItem({
      cName: "-",
      cParent: "File",
      cExec: " "
  });
  app.addMenuItem({
      cName: "Save to Sharepoint",
      cParent: "File",
      cExec: "ShowDialog()",
      nPos: 0
  });
  
  // Dialog Definition 
  var oDlg = {
      strName: "",
      initialize: function(dialog) {
          dialog.load({
              "desc": this.strName
          });
      },
      commit: function(dialog) {
          var data = dialog.store();
          this.strName = data["desc"];
      },
      description: {
          name: "Sharepoint", // Dialog box title
          align_children: "align_left",
          width: 250,
          height: 250,
          elements: [{
              type: "cluster",
              name: "Save File",
              align_children: "align_left",
              elements: [{
                      type: "view",
                      align_children: "align_row",
                      elements: [{
                              type: "static_text",
                              name: "Description",
                              width: 70
                          },
                          {
                              item_id: "desc", //item_id needs 4 characters only
                              type: "edit_text",
                              alignment: "align_right",
                              width: 200,
                              height: 20
                          }
                      ]
                  },
                  {
                      type: "view",
                      align_children: "align_row",
                      elements: [{
                              type: "static_text",
                              name: "1. Client",
                              width: 70
                          },
                          {
                              item_id: "Clnt",
                              type: "popup",
                              alignment: "align_right",
                              width: 165,
                              height: 20
                          }
                      ]
                  },
                  {
                      type: "view",
                      align_children: "align_row",
                      elements: [{
                              type: "static_text",
                              name: "2. Matter",
                              width: 70
                          },
                          {
                              item_id: "Matr",
                              type: "popup",
                              alignment: "align_right",
                              width: 165,
                              height: 20
                          }
                      ]
                  },
                  {
                      type: "view",
                      align_children: "align_row",
                      elements: [{
                              type: "static_text",
                              name: "3. Doc. Type",
                              width: 70
                          },
                          {
                              item_id: "DocT",
                              type: "popup",
                              alignment: "align_right",
                              width: 165,
                              height: 20
                          }
                      ]
                  },
                  {
                      type: "view",
                      align_children: "align_row",
                      elements: [{
                              type: "static_text",
                              name: "4. User ID",
                              width: 70
                          },
                          {
                              item_id: "UsID",
                              type: "edit_text",
                              alignment: "align_right",
                              width: 200,
                              height: 20
                          }
                      ]
                  },
                  {
                      //alignment: "align_right",
                      type: "ok_cancel",
                      align_children: "align_row",
                      ok_name: "Ok",
                      cancel_name: "Cancel"
                  }
              ]
          }]
      }
  };
  
  function ShowDialog() {
      var listId = '{19736DC6-B732-4D25-8DAA-9E0FD808CA30}';
      var siteUrl = "http://www.rajman.in/json/productlistclient.php?wsdl";
      oDlg.strName = "Larry";
      if ("ok" == app.execDialog(oDlg)) {
          getDocTypeListItems(siteUrl, listId);
      }
  }
  
  function getDocTypeListItems(siteUrl, listId) {
      var cURL = "http://www.rajman.in/json/productlist.php?wsdl";
      ajax = function(siteUrl) {
          var params = {
              cVerb: "GET",
              cURL: siteUrl,
              oHandler: {
                  response: function(msg, uri, e, h) {
                      var stream = msg;
                      var string = "";
                      string = SOAP.stringFromStream(stream);
                      app.alert(string);
                  }
              }
          };
  
          Net.HTTP.request(params);
      }
  }
  </code></pre>