Webservice call from PLSQL

This article demonstrates the way we can call a webservice from oracle PLSQL.

For the purpose of the demonstration we will be calling webservice provided by ‘AddressDoctor’ [http://www.addressdoctor.com/en/] for validating an address. We will build the SOAP request XML file and call the webservice. SOAP response from the webservice will be parsed to retrieve the output from webservice call.

You can register with AddressDoctor to get the customerid which we will use in the SOAP request XML file

Following are the details for the Web service

SOAP Action is : http://validator2.AddressDoctor.com/addInteractive/Interactive/Validate

WSDL is : http://validator2.addressdoctor.com/addInteractive/Interactive.asmx?WSDL

Sample SOAP XML file is:

Change the high-lightened lines with appropriate customerId and password.

Below package definition gives the code for

  1. building the SOAP request message
  2. invoking the web service call
  3. parsing the SOAP response message

Package specification can be downloaded from following link

Package body can be downloaded from following link

Test code to invoke the package can be downloaded from following link

Leave a Reply

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