Consuming a SOAP Web Service quickly using Web Service Data Control (WSDL) in ADF

Sharing is Caring

Creating and Consuming Web Servie is an important part development cycle . In earlier posts i have described about creating SOAP/REST Web Service
Create REST Web Service with Application Module declaratively in ADF 12.2.1
Create SOAP Web Service with Application Module quickly in ADF 12.2.1

Now this post is about consuming a SOAP Web Service. A very simple way to consume Web Service is to create Web Service Data Control (WSDL) for external Web Service URL
Here i am using a Country-Currency Web Service ( to create WSDL

    • Create a Fusion Web Application with default Model and ViewController project


    • Right click on Model project , Select New–> From Gallery–> Business Tier–> Web Services and select Web Service Data Control SOAP/REST 


    • It opens WSDL creation wizard , First Step is to provide Web Service Name and URL



    • Click on next and in second screen select the methods to expose in Data Control that will be further used by application



    • In third step we can set return type of Web Service response , there are two options -XML and CSV. Leave it as default XML



    • Click on Finish button to generate DataControl.dcx (It is created when DataControl is registered on Business Service not on ADF Business Components) and WSDL document




    • Creation of WSDL is done now create a page in view controller project and expand DataControls menu , there we will see a data control created for CountryWebServices



    • Drag and drop GetCountries operation on page as a button and expand this operation and drop String as output text formatted to show response of webservice




    • In same manner drop another method as parameter form as it has one input parameter that takes country name as input and shows it’s currency as output.
      See page source code-

<af:panelGroupLayout id="pgl1" layout="horizontal" valign="top">
                            <af:panelFormLayout id="pfl2" inlineStyle="width:600px;">
                                <af:button actionListener="#{bindings.GetCountries.execute}" text="GetCountries"
                                           disabled="#{!bindings.GetCountries.enabled}" id="b1"/>
                                <af:outputFormatted value="#{bindings.Return.inputValue}" id="of2"
                                                    partialTriggers="b1" inlineStyle="width:500px;color:blue;"/>
                            <af:panelFormLayout id="pfl1" inlineStyle="width:600px;">
                                <af:inputText value="#{bindings.CountryName.inputValue}"
                                              shortDesc="#{bindings.CountryName.hints.tooltip}" id="it1">
                                    <f:validator binding="#{bindings.CountryName.validator}"/>
                                <af:button actionListener="#{bindings.GetCurrencyByCountry.execute}"
                                           disabled="#{!bindings.GetCurrencyByCountry.enabled}" id="b2"/>
                                <af:outputFormatted value="#{bindings.Return1.inputValue}" id="of1"
                                                    partialTriggers="b2" inlineStyle="color:maroon;"/>


    • Now run and check application





All done 🙂 Sample ADF Application- Download
Cheers 🙂 Happy Learning

Related Posts

An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF

3 thoughts on “Consuming a SOAP Web Service quickly using Web Service Data Control (WSDL) in ADF”

  1. Hi Ashish,

    I have created a Web Service and I tested it so it's giving response. But the moment I tried to consume in main application where I've accessed it's method interface from Data control it's showing the error 404 response not found from the WebService URL which I have provided. So, please help me getting this sorted out

Leave a Reply

Your email address will not be published. Required fields are marked *