how to call web services from PL/SQL procedure or function
Shahid17May 13 2013 — edited May 21 2013I'm using Oracle database 10 G and I need to create a procedure or function that will call a web service from a 3rd party system.
The other party has given me the HTTP GET code request and response that I need to use.
request is
GET /Serviceewb/AccountService.asmx/Payment?MSISDN=string&Amount=string&PreBalance=string&PartyCode=string&BillID=string&BillNbr=string&AccountID=string&AccountCode=string&SN=string HTTP/1.1
Host: 192.168.12.247
Response is
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<PaymentDto xmlns="http://www.ZTEsoft.com/ZSmart">
<PaymentID>string</PaymentID>
<AccountCode>string</AccountCode>
<Balance>string</Balance>
<balDtoList>
<BalDto>
<AcctResID>string</AcctResID>
<AcctResName>string</AcctResName>
<Balance>string</Balance>
<BalType>string</BalType>
<EffDate>string</EffDate>
<ExpDate>string</ExpDate>
<UpdateDate>string</UpdateDate>
<BalShareDtoList>
<BalShareDto d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
<BalShareDto d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
</BalShareDtoList>
<BalID>string</BalID>
</BalDto>
<BalDto>
<AcctResID>string</AcctResID>
<AcctResName>string</AcctResName>
<Balance>string</Balance>
<BalType>string</BalType>
<EffDate>string</EffDate>
<ExpDate>string</ExpDate>
<UpdateDate>string</UpdateDate>
<BalShareDtoList>
<BalShareDto d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
<BalShareDto d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" />
</BalShareDtoList>
<BalID>string</BalID>
</BalDto>
</balDtoList>
<SubscriberInfoDtoList>
<SubscriberInfoDto>
<MSISDN>string</MSISDN>
<SubscriberID>string</SubscriberID>
<CustomerName>string</CustomerName>
<ProdState>string</ProdState>
<Due>string</Due>
</SubscriberInfoDto>
<SubscriberInfoDto>
<MSISDN>string</MSISDN>
<SubscriberID>string</SubscriberID>
<CustomerName>string</CustomerName>
<ProdState>string</ProdState>
<Due>string</Due>
</SubscriberInfoDto>
</SubscriberInfoDtoList>
</PaymentDto>
I now need to call the web service from my oracle procedure(function) and pass the required parameters and get a response (ok or not ok).
Any suggestion on the code to call that web service will be very appreciated.
Thanks,