Forum Discussion

seham's avatar
seham
Occasional Contributor
8 years ago

Test Rest service secured with Basic authentication sends valid acces return401 unauthorized respons

Hi,

I am new in using SOAP UI 5.3.0 and the requirement is to retrieve the data from secured web service, but I am getting a HTTP/1.1 401 unauthorized response as my response.

I am using REST Service. When I try the same thing in POSTMAN it works fine and I got JSON response.

The URL, headers, parameters (bec it's POST method) and Username and password (for authorization) are the same in POSTMAN as well as SOAP UI but I don't understand why I am getting a 401 response in SOAP UI.

 

Note that I have download POSTMAN as plugin into Chrome Browser and I have been enter the URL in the chrome and allow of using invalid certificate of my web service (Chrome warning message was as image attached below) and after I click to procced to unsafe, it's working fine in Postman

 

Can anyone please explain me why this is the case not work with soapui and how to fix it?

Your help is much appreciated.

Thanks,

7 Replies

  • fazlook's avatar
    fazlook
    Frequent Contributor

    That's normal :) because you dont have a certificate installed.

     

    How did you test it in SoapUI ? please post a screenshot of your work.

    • seham's avatar
      seham
      Occasional Contributor

      First thanks for your replay and help!

       

      I didn't build the web service so I don't know what is mean of the certificate and from who can i request it!

      What can i do in this situation 

       

      SOAPUI

       soap ui response

      postman

       

       

    • fazlook's avatar
      fazlook
      Frequent Contributor

      Hi Seham,

       

      So in SOAPUI, under your project, are you using https://..... or http:// ? also, is this a part of a domain ?

       

      Are you able to do a GET request ?

  • seham's avatar
    seham
    Occasional Contributor
    Yes the service use https; and http not work with link.

    I am not able to use Get request while the service used a post method to send the params.

    • fazlook's avatar
      fazlook
      Frequent Contributor

      Of course you could use a GET request, just try to see if any GET request works. That way you make sure the service is running. yalla try.

      • seham's avatar
        seham
        Occasional Contributor

        Hi Fazlook,

         

        I really appreciate your help,

        unfortunately, I received this error message when using GET request {"Message": "The requested resource does not support http method 'GET'."} as a response.

         

        I really tried to solve this problem but it's stuck :(

         

        Note: you have late respnse due to i can't run the api in a public wireless. it must use a specific wireless.