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:
http://serverIp:port/myws/MyWSPort?WSDL
In My Example the wsdl is:
http://192.168.1.39:8000/corews/CAPISalesOrderWebSPort?WSDL
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
Assume you have the WSDL URL of SOAP Web Service like this:
http://serverIp:port/myws/MyWSPort?WSDL
In My Example the wsdl is:
http://192.168.1.39:8000/corews/CAPISalesOrderWebSPort?WSDL
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.