Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

use site map web service in sharepoint app

$
0
0

Hi,

I want to use site map web service to build DOM in a structured way...I am using like this:

  function reloadStructure() {
                var def = new $.Deferred();
                var executor = new SP.RequestExecutor(appweburl);
                executor.executeAsync({
                    url:' https://xcp02.andritz.com/_vti_bin/andritz/intranet/locations.asmx/CreateSitemap',
                    method: "POST",
                    body: JSON.stringify({
                        "locations": [
                            "ANDRITZ AG Graz AT-01-01" //default term label
                        ]

                    }),
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "Content-Type": "application/json;odata=verbose",
                        "X-HTTP-Method": "PATCH",
                        "IF-MATCH": "*"
                    },
                    success: function (data) {
                        console.log(data);
                        def.resolve(data);

                    },
                    error: function (data, errorCode, errorMessage) {
                        def.reject(data, errorCode, errorMessage);
                    }
                });

                return def.promise();

            }

But I think executor is not working so How to do it with Javascript xhr call with post method...

 This url https://xcp02.andritz.com/_vti_bin/andritz/intranet/locations.asmx/CreateSitemap' bring data like this when I test in postman...so the url is correct..but using executor method it is not bringing result.. Result of url is below.

So how to do it with Javascript Xhr calls or jquery.

Best regards

Deeksha





Viewing all articles
Browse latest Browse all 26374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>