Thursday, June 4, 2015

Call Secure SOAP Web Service In ADF Application Using DataControl

In this post I will explain how in ADF application you can call secured Web Service where this web service is secured by username token.

Assume you have the WSDL URL of SOAP Web Service like this:


In My Example the wsdl is:

You can run this url in the browser to be sure that web service is running and secured by username token as:

- In the server which the web service was deployed in, open the console -->Security Realms --> myrealm --> users

create user. for example username= wsuser and password=ws123456

This user will be used when we call Web Service

- Now make ADF application and from ViewController project right click --> New --> Web Service Data Control

- Enter Data Control name and web service wsdl url

- Select the function which you want to use from web service

- In Endpoint Authentication step select web service port and enter username and password (in our example username=wsuser - password = ws123456)

- Press Finish.

- After finishing the new data control will created select it and go to structure window --> right click on the data control -->  Define Web Service Security

- From the security list check on " oracle/wss_username_token_client_policy" then press "OK"

- In adf application create new .jspx page and from Data Control drag web service function and drop it in the page

- Drag web service output and drop it in the page as ADF Output Text

- Run ADF page.
- Enter web service parameter then press the button you will get the web service output.