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:

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.


12 comments:

  1. Thanks a million. I never knew how to do that. Very detailed and help post!
    software development

    ReplyDelete
  2. Web programmer than would be who makes dynamic applications. Web programmer has liitle bit of designing information but better at making applications.liveblogging

    ReplyDelete
  3. If i run it in local server its fine, when i have to deploy into SAAS cloud what can i do for that??plz help me

    ReplyDelete
    Replies
    1. In Stand alone weblogic be sure that you create new user in security Security Realms and use this user for authentication

      Delete
  4. Nice post, I bookmark your blog because I found very good information on your blog, Thanks for sharing more information Dynamic Web Development Company.

    ReplyDelete
  5. Thanks for sharing this information. your blog is good and I got so much knowledge..........Digital Marketing Services in Delhi & Web Development Services in India

    ReplyDelete
  6. السلام عليكم ورحمه الله في اول خطوه لم اجد user toker policy

    ReplyDelete
    Replies
    1. اذا الويب سيرفيس لم يطبق عليها سيكيوريتي

      Delete
  7. وكيف اطبق السكيورتي علي الوب سيرفس يابشمهندس

    ReplyDelete
    Replies
    1. I have created a post for how to apply usernameToken security to your webservice.

      Check this URL:

      http://sameh-nassar.blogspot.com/2018/10/create-secured-soap-web-service-using.html

      Delete
  8. Great post with very useful information to all thanks for sharing with all of us. I like it very much.
    Fantasy Cricket app development

    ReplyDelete