Forum Discussion

yarl's avatar
yarl
New Contributor
7 years ago

Rest API call does not return XML message, but some logs, but response code is 200

HI ,

I am testing a REST API call from my laptop . The vpn connection to the server is established. When I run the Rest API call from SOAP UI Pro it gives 200- ok. But response in XML does not show- instead it shows up some logs- looks like something to do with authentication.

If I run the same http request via chrome it works ok.

 

I set the authentication method to Basic in SOAP UI and gave user/pw/domain.

 

This is the log in the reponse xml

<html lang="en-US">
   <head>
      <meta content="HTML Tidy for Java (vers. 27 Sep 2004), see www.w3.org" name="generator"/>
      <meta content="IE=10.000" http-equiv="X-UA-Compatible"/>
      <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
      <meta content="text/html;charset=UTF-8" http-equiv="content-type"/>
      <meta content="no-cache,no-store" http-equiv="cache-control"/>
      <meta content="no-cache" http-equiv="pragma"/>
      <meta content="-1" http-equiv="expires"/>
      <meta content="Connecting to Comactivity" name="mswebdialog-title"/>
      <title>Sign In</title>
      <script type="text/javascript">//&lt;![CDATA[
function LoginErrors(){this.userNameFormatError = 'Enter your user ID in the format \u0026quot;domain\\user\u0026quot; or \u0026quot;user@domain\u0026quot;.'; this.passwordEmpty = 'Enter your password.'; this.passwordTooLong = 'Password must be shorter than 128 characters.';}; var maxPasswordLength = 128;
//]]&gt;</script>
      <script type="text/javascript"><![CDATA[//<![CDATA[
// Copyright (c) Microsoft Corporation.  All rights reserved.
function InputUtil(errTextElementID, errDisplayElementID) {
    if (!errTextElementID)  errTextElementID = 'errorText';
    if (!errDisplayElementID)  errDisplayElementID = 'error';
    this.hasFocus = false;
    this.errLabel = document.getElementById(errTextElementID);
    this.errDisplay = document.getElementById(errDisplayElementID);
};
InputUtil.prototype.canDisplayError = function () {
    return this.errLabel && this.errDisplay;
}
InputUtil.prototype.checkError = function () {
    if (!this.canDisplayError){
        throw new Error ('Error element not present');
    }
    if (this.errLabel && this.errLabel.innerHTML) {
        this.errDisplay.style.display = '';       
        var cause = this.errLabel.getAttribute('for');
        if (cause) {
            var causeNode = document.getElementById(cause);
            if (causeNode && causeNode.value) {
                causeNode.focus();
                this.hasFocus = true;
            }
        }
    }
    else {
        this.errDisplay.style.display = 'none';
    }
};
InputUtil.prototype.setInitialFocus = function (input) {
    if (this.hasFocus) return;
    var node = document.getElementById(input);
    if (node) {
        if ((/^\s*$/).test(node.value)) {
            node.focus();
            this.hasFocus = true;
        }
    }
};
InputUtil.prototype.setError = function (input, errorMsg) {
    if (!this.canDisplayError) {
        throw new Error('Error element not present');
    }
    input.focus();
    if (errorMsg) {
        this.errLabel.innerHTML = errorMsg;
    }
    this.errLabel.setAttribute('for', input.id);
    this.errDisplay.style.display = '';
};
InputUtil.makePlaceholder = function (input) {
    var ua = navigator.userAgent;
    if (ua != null &&
        (ua.match(/MSIE 9.0/) != null ||
         ua.match(/MSIE 8.0/) != null ||
         ua.match(/MSIE 7.0/) != null)) {
        var node = document.getElementById(input);
        if (node) {
            var placeholder = node.getAttribute("placeholder");
            if (placeholder != null && placeholder != '') {
                var label = document.createElement('input');
                label.type = "text";
                label.value = placeholder;
                label.readOnly = true;
                label.style.position = 'absolute';
                label.style.borderColor = 'transparent';
                label.className = node.className + ' hint';
                label.tabIndex = -1;
                label.onfocus = function () { this.nextSibling.focus(); };
                node.style.position = 'relative';
                node.parentNode.style.position = 'relative';
                node.parentNode.insertBefore(label, node);
                node.onkeyup = function () { InputUtil.showHint(this); };
                node.onblur = function () { InputUtil.showHint(this); };
                node.style.background = 'transparent';
                node.setAttribute("placeholder", "");
                InputUtil.showHint(node);
            }
        }
    }
};
InputUtil.focus = function (inputField) {
    var node = document.getElementById(inputField);
    if (node) node.focus();
};
InputUtil.hasClass = function(node, clsName) {
    return node.className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)'));
};
InputUtil.addClass = function(node, clsName) {
    if (!this.hasClass(node, clsName)) node.className += " " + clsName;
};
InputUtil.removeClass = function(node, clsName) {
    if (this.hasClass(node, clsName)) {
        var reg = new RegExp('(\\s|^)' + clsName + '(\\s|$)');
        node.className = node.className.replace(reg, ' ');
    }
};
InputUtil.showHint = function (node, gotFocus) {
    if (node.value && node.value != '') {
        node.previousSibling.style.display = 'none';
    }
    else {
        node.previousSibling.style.display = '';
    }
};
//]]]]>><![CDATA[]]></script>
      <link href="/adfs/portal/css/style.css?id=D74D4D6943F32AE6F7F11D14D601DBB0E1A58919176EE512150366B6279AAF99" type="text/css" rel="stylesheet"/>
      <style type="text/css">.illustrationClass {background-image:url(/adfs/portal/illustration/illustration.png?id=183128A3C941EDE3D9199FA37D6AA90E0A7DFE101B37D10B4FEDA0CF35E11AFD);}</style>
   </head>
   <body class="body" dir="ltr">
      <div style="position:static; width:100%; height:100%; z-index:100" id="noScript">
         <h1>JavaScript required</h1>
         <p>JavaScript is required. This web browser does not support JavaScript or JavaScript in this web browser is not enabled.</p>
         <p>To find out if your web browser supports JavaScript or to enable JavaScript, see web browser help.</p>
      </div>
      <script language="JavaScript" type="text/javascript">document.getElementById("noScript").style.display = "none";</script>
      <div id="fullPage">
         <div class="float" id="brandingWrapper">
            <div id="branding"/>
         </div>
         <div class="float" id="contentWrapper">
            <div id="content">
               <div id="header">Com</div>
               <div id="workArea">
                  <div class="groupMargin" id="authArea">
                     <div id="loginArea">
                        <div class="groupMargin" id="loginMessage">Sign in with your organizational account</div>
                        <form action="/adfs/ls/?SAMLRequest=nVTdb9owEH%2FvXxH5PSQkkIAFSAzUFamdMmBTtZfKOJfWkmNnPqcf%2F%2F3swBhTO6TxZp0vd7%2BveIKslg2dt%2FZJreFnC2iD4LWWCml3MyWtUVQzFEgVqwGp5XQzv7ulSS%2BmjdFWcy3J1Wo5JZjESQ55kgyGeQUpVFl%2FPEzzXT7exbtdnCd8PMryAbCMBN%2FBoNBqStwYEqwQW1gptExZV4r7ozDOwjjfxikdjugg%2FkGCpYMmFLPdV0%2FWNkijqMIe1zXjVjwL%2B9aTmjMZsbLCSGJEgmttOHTcpqRiEsGvKhiieIZjpTiQ%2BCRUKdTjeca7fRPSm%2B22CNdQCgPckmCOCMZjW2iFbQ1mA%2BZZcPi2vv2DdjEP79JwHt6vrjdh3H8PnY6HgzTywkdSPwplABs3D8jsauKrtBPKnBh0Hi37jYrMfNtKVdo83ItCMutO9cNNfzAa5VmWJhn9bER5cjeJThYe1jf0i1uxWhZaCv52SU68IzWz57t9RZRh1bVSa5hCAcqJvCn8%2Fq8tk6ISYPZT%2FoeU80lK%2FbIwwKwLgDWtk3bP9G9uR8KHfwLKLkXOXAuv9hLiC103zAj06a2FEnVbu9WdxqejF9J5tobqUov%2F2cYp96Nd2ef%2FRZvS595lF8qtV7jRxh48%2FwjPUaUPBXFyRe8fktkv&amp;RelayState=s2027e722457fe3ef619537b79b0bb072c98674ea6" onkeypress="if (event &amp;&amp; event.keyCode == 13) Login.submitLoginRequest();" novalidate="novalidate" autocomplete="off" id="loginForm" method="post">
                           <div class="fieldMargin error smallText" id="error">
                              <label for="" id="errorText"/>
                           </div>
                           <div id="formsAuthenticationArea">
                              <div id="userNameArea">
                                 <input autocomplete="off" placeholder="someone@example.com" spellcheck="false" class="text fullWidth" tabindex="1" value="" type="email" name="UserName" id="userNameInput"/>
                              </div>
                              <div id="passwordArea">
                                 <input autocomplete="off" placeholder="Password" class="text fullWidth" tabindex="2" type="password" name="Password" id="passwordInput"/>
                              </div>
                              <div style="display:none" id="kmsiArea">
                                 <input tabindex="3" value="true" id="kmsiInput" name="Kmsi" type="checkbox"/>
                                 <label for="kmsiInput">Keep me signed in</label>
                              </div>
                              <div class="submitMargin" id="submissionArea">
                                 <span onclick="return Login.submitLoginRequest();" onkeypress="if (event &amp;&amp; event.keyCode == 32) Login.submitLoginRequest();" tabindex="4" class="submit" id="submitButton">Sign in</span>
                              </div>
                           </div>
                           <input value="FormsAuthentication" name="AuthMethod" type="hidden" id="optionForms"/>
                        </form>
                        <div id="authOptions">
                           <form action="https://fs.comactivity.local:443/adfs/ls/?SAMLRequest=nVTdb9owEH%2FvXxH5PSQkkIAFSAzUFamdMmBTtZfKOJfWkmNnPqcf%2F%2F3swBhTO6TxZp0vd7%2BveIKslg2dt%2FZJreFnC2iD4LWWCml3MyWtUVQzFEgVqwGp5XQzv7ulSS%2BmjdFWcy3J1Wo5JZjESQ55kgyGeQUpVFl%2FPEzzXT7exbtdnCd8PMryAbCMBN%2FBoNBqStwYEqwQW1gptExZV4r7ozDOwjjfxikdjugg%2FkGCpYMmFLPdV0%2FWNkijqMIe1zXjVjwL%2B9aTmjMZsbLCSGJEgmttOHTcpqRiEsGvKhiieIZjpTiQ%2BCRUKdTjeca7fRPSm%2B22CNdQCgPckmCOCMZjW2iFbQ1mA%2BZZcPi2vv2DdjEP79JwHt6vrjdh3H8PnY6HgzTywkdSPwplABs3D8jsauKrtBPKnBh0Hi37jYrMfNtKVdo83ItCMutO9cNNfzAa5VmWJhn9bER5cjeJThYe1jf0i1uxWhZaCv52SU68IzWz57t9RZRh1bVSa5hCAcqJvCn8%2Fq8tk6ISYPZT%2FoeU80lK%2FbIwwKwLgDWtk3bP9G9uR8KHfwLKLkXOXAuv9hLiC103zAj06a2FEnVbu9WdxqejF9J5tobqUov%2F2cYp96Nd2ef%2FRZvS595lF8qtV7jRxh48%2FwjPUaUPBXFyRe8fktkv&amp;RelayState=s2027e722457fe3ef619537b79b0bb072c98674ea6" method="post" id="options">
                              <script type="text/javascript">function SelectOption(option) {
                    var i = document.getElementById('optionSelection');
                    i.value = option;
                    document.forms['options'].submit();
                    return false;
                }</script>
                              <input name="AuthMethod" type="hidden" id="optionSelection"/>
                           </form>
                        </div>
                        <div class="groupMargin" id="introduction"/>
                        <script type="text/javascript">//&lt;![CDATA[
            function Login() {
            }
            Login.userNameInput = 'userNameInput';
            Login.passwordInput = 'passwordInput';
            Login.initialize = function () {
                var u = new InputUtil();
                u.checkError();
                u.setInitialFocus(Login.userNameInput);
                u.setInitialFocus(Login.passwordInput);
            }();
            Login.submitLoginRequest = function () {
                var u = new InputUtil();
                var e = new LoginErrors();
                var userName = document.getElementById(Login.userNameInput);
                var password = document.getElementById(Login.passwordInput);
                if (!userName.value || !userName.value.match('[@\\\\]')) {
                    u.setError(userName, e.userNameFormatError);
                    return false;
                }
                if (!password.value) {
                    u.setError(password, e.passwordEmpty);
                    return false;
                }
                if (password.value.length > maxPasswordLength) {
                    u.setError(password, e.passwordTooLong);
                    return false;
                }
                document.forms['loginForm'].submit();
                return false;
            };
            InputUtil.makePlaceholder(Login.userNameInput);
            InputUtil.makePlaceholder(Login.passwordInput);
        //]]&gt;</script>
                     </div>
                  </div>
               </div>
               <div id="footerPlaceholder"/>
            </div>
            <div id="footer">
               <div class="floatReverse" id="footerLinks">
                  <div>
                     <span id="copyright">© 2013 Microsoft</span>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">//&lt;![CDATA[
// Copyright (c) Microsoft Corporation.  All rights reserved.
// This file contains several workarounds on inconsistent browser behaviors that administrators may customize.
"use strict";
// iPhone email friendly keyboard does not include "\" key, use regular keyboard instead.
// Note change input type does not work on all versions of all browsers.
if (navigator.userAgent.match(/iPhone/i) != null) {
    var emails = document.querySelectorAll("input[type='email']");
    if (emails) {
        for (var i = 0; i</script>
   </body>
</html>
  • nmrao's avatar
    nmrao
    Champion Level 3
    If you see the above, there is clear error message, excerpt :
    'Enter your user ID in the format \u0026quot;domain\\user\u0026quot; or \u0026quot;user@domain\u0026quot;.'; this.passwordEmpty = 'Enter your password.'; this.passwordTooLong = 'Password must be shorter than 128 characters.';}; var maxPasswordLength = 128
    • yarl's avatar
      yarl
      New Contributor

      yes I did.

      against the user I gave user@domain

      against the password- I gave the password (not long password)

      against the domain- I left it blank and also tried giving the domain again

      but same error

      • nmrao's avatar
        nmrao
        Champion Level 3
        may be try the other format:

        domain\user as username.