How to test Webservice in JDeveloper that uses basic authentication?

I created a web service that uses basic authentication in JDeveloper 11.1.1.4.

When I test my application using the client application, it runs correctly, so I know that the authentication mechanism has no problems.

How do I pass authentication data to an HTTP analyzer by right-clicking on Webservices and selecting Test Web Service ?

I tried passing credentials via SOAP Headers > :WS-Security:Header as shown below, but not working

case1

I also tried to authenticate using the Credentials option as shown below

case2

In both cases, I get this error 500 HTTP Analyzer Server Error The server sent HTTP status code 401: Unauthorized: .....

How can I overcome this? Thanks

UPDATE

I also tried passing the Authentication Request HTTP Headers parameter, but I get an error:

Error 403 - Forbidden From RFC 2068 Hypertext Transfer Protocol - HTTP / 1.1: 10.4.4 403 Forbidden The server understood the request, but refuses to fulfill it. Authorization will not help, and the request MUST NOT be repeated. If the request method was not HEAD, and the server wants to report why the request was not executed, it MUST describe the reason for the failure in essence. This status code is usually used when the server does not want to determine exactly why the request was rejected, or when another response is not applicable.

+4
source share
2 answers

If you use basic authentication, you only need to set the Authorization request header. The value of this header is: Basic prefix, one space, Base64 encoded string with the name usrname: password, so your title for Aladin:sesam open should look like this: Basic QWxhZGluOnNlc2FtIG9wZW4= .

In the screenshot, I see the Request HTTP headers section, add the Authorization header to it.

+1
source

I know this is an old post, but it can benefit those who are faced with this problem.

I am using Jdeveloper 11.1.2 . I provided a JAX-RPC web service (created by exposing PL / SQL poackage) using basic authentication. I applied the security policy: "Auth.xml" using the wizard.

I was able to verify this using an HTTP parser. I just passed the user credentials in the SOAP headers as shown below and it worked for me. (I also transferred invalid loans and no comments to make sure that security works as expected.)

Hope this helps !!!

enter image description here

+1
source

Source: https://habr.com/ru/post/1433716/


All Articles