401 Not Authorized error in soapUI but web service works perfect in Postman - soap

As the title states, when I send a request from soapUI to an SAP web service I am returned with an XML that contains a "401 Nicht autorisiert" error message in it. Since it is an SAP web service, I do have to input credentials when I create the new project, but those are the only credentials I have input before running the project.
With the same credentials, I am able to create a request and not receive an error message when I use the Postman interface.
Could this be an issue with the web service configuration, or is this an authorization issue with soapUI?
Links to images:
SoapUI: https://imgur.com/2ZOBMgZ
Postman: https://imgur.com/M1SOCgG

From your images it looks like the Authorization: Basic... header is not being sent as part of your HTTP request out of soapUI and I assume your service doesn't challenge for the credentials in a way that soapUI understands.
One way around this is to click the Authenticate pre-emptively radio button on the basic authorization dialog box. This will construct and send the header the same way as Postman.

Related

Trying to access the account (Preview) REST API in Keycloak , getting a 404

I am trying to access the new account API (Not the Admin) in keycloak 4.8.3 . I am trying to do :
GET "/auth/realms/{realm}/account/credentials/password" endpoint (Based on the AccountRestServiceTest.java)
with the account owner's token. Getting a 404 error.
I have started the sever with preview features
bin/standalone.bat -Dkeycloak.profile=preview
I have tried to add profile.properites file with profile=preview options
and the user has "manage-account","view-profile" account roles
What am i doing wrong here?
I'm facing the same problem and i found a solution.
You need to add the HTTP header Accept with the value application/json to your request.
Because AccountRestService is only accessible if headers Accept or Content-Type are application/json.

VSTS connection with SOAPui via ReSTapi

I am trying to make connection to Azure VSTS with SOAPui through vsts rest api's, but the response I am getting is: HTTP/1.1 203 Non-Authoritative information
Though when I hit the same request from POSTMAN it's giving successful response for every operation(Get, Post, Delete).
As I have a framework for API automation in SOAPUI I need to have this connection to post the test results in VSTS against respective test case.
Any idea how to resolve this would be much appreciated!!
Thanks
This is due to the incorrect authentication headers (Authorization header) that you send in the request. I have experienced this issue when you are trying to send empty username in SoapUI - Basic Authorization tab.
This can be handled by generating the header offline (using some online utilities - https://www.blitter.se/utils/basic-authentication-header-generator/) and sending in a separate header like below,
Authorization: Basic Onl1eWl1eWl5aXlpeWl5aXk=
Hope this helps.

IBM Weather REST API 401 Keep getting CORS issues when access

I am getting a 401 and some cross domain issues when trying to access IBM Weather REST API from either client (browser) or server.
If I generate a URL and try and access it directly from a browser (eg paste it in it works fine and the JSON weather report is returned).
When I try and run the Javascript HTTP request from either the browser or server it seems like it's only allowed to run from an ibm.com domain.
Failed to load https://twcservice.au-syd.mybluemix.net/api/weather/v1/geocode/-33.00/151.00/forecast/daily/7day.json?units=m&language=en-US: The 'Access-Control-Allow-Origin' header contains multiple values 'https://*.ibm.com, https://*.ibmcloud.com', but only one is allowed. Origin 'http://localhost:3000' is therefore not allowed access.
I am using the free service on Bluemix. Is this restricted to only run via a Bluemix server? or are there some options I can pass when I create the service on Bluemix
Note, when I make the request I am using the credentials supplied via the Bluemix console. Again, this works via the browser URL bar, but not via code.
Update/More info: if I hit past the URL above into the browser (with creds) it works as above, then if hit it via the web app in the same session it works.
Hmmm. So the IBM server is sending the following response header:
Access-Control-Allow-Origin: https://*.ibm.com, https://*.ibmcloud.com
That's an invalid response from IBM. Unfortunately, I think your only option is to complain to IBM, and convince them to
Return a valid Access-Control-Allow-Origin response header (with only one value)
Allow people outside of IBM to access it
Without that, I fear you're out of luck.

WSO2 API Manager - How to proxy a SOAP Service that has a basic Auth

Using wso2 api manager. I cannot publish an existing SOAP service that has a basic auth (in the back end). The publisher interface let you insert the wsdl location, but obviously it requires a basic auth (in fact i have a 401 error in the log).
I tried to put username and password in the url like https://username:pwd#server... but it does not work.
Thank you

HP QC REST API for postman rest client

I tried to connect HP QC using postman rest client
The followig URL(Example)
http://qc-server.com/qcbin/rest/domains/DEFAULT_773497139/projects/773497139_DEMO/defects?username=username#gmail.com&password=mypassword
It throws error as follows
**Authentication failed. Browser based integrations - to login append '?login-form-required=y' to the url you tried to access.**
when i tried adding the parameter login-form-required=y it goes back to login page how to store session and fetch data through rest api using postman rest client.
Choose Authorization type as BASIC and Enter credential and Click Update Request.
Postman snap: