Hello everyone,
I am finding some difficulties in using a SOAP APIs.
In order to create the call we import the .wsdl file and we insert the authentication as "Basic" with the correct user and password. When we launch the API we get the following error message:
"The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was ''.".
We aren't able to understand how to resolve this problem. Can someone give us some insight on this?
Thank you.
Hi Linda,
I am sure we can figure this out.
- Can you share more information (wsdl or documentation)?
- Can you check the authorization in the raw request (trace perhaps?) are user and password displaying in the authorization header (base64 encoded with Basic in front of it)
- Did you put user and password in ServiceCenter or only Service Studio?
Thank you Stefano!
- Unfortunately we don't have any documentation and for security reasons we can't share the wsdl file :(
- Yes, we've checked the header using the ServerAction "GetRequestHeader" with parameter "HeaderName" set to "Authorization" and we get a null (empty) value in response.
- We've done some test using both credentials entered in ServiceStudio and ServiceCenter, and the result is always the same.
Something that may be worth bringing up is that we've had to change the URL of the endpoint with respect to the one present on the WSDL. Could this be an issue?
You write "we insert the authentication as "Basic"" - can you show what way you are adding the Basic Authentication? I assume you have set the Authentication Type Property like this:
If so, have you also checked in Service Center whether the default and/or effective username and password are set correctly? (Factory -> Modules -> Integrations tab -> Consumed SOAP Web Services -> click name of service)
Hi Kilian,
Yes, exactly. We've done both of those things just as you've described.
I must say that i have more difficulties in getting the SOAP exposed with Basic authentication, than i have consuming it.
Kilians question is why i put in my third bullet: did you fill in the basic authentication properly.
Your print screen with the getheader in the onbefore advanced, if i am correct, will never show the header, because its not there yet.
Your question that you changed the url: that should not remove any basic authentication.