Create A Custom Business Entity:: How To Convert Custom PLSQL To Web Services
Create A Custom Business Entity:: How To Convert Custom PLSQL To Web Services
Create A Custom Business Entity:: How To Convert Custom PLSQL To Web Services
Code : DSI_BUS_ENTITY
/*#
* Use this method to get item identifier
* @param p_item_number item number
* @param p_org_id organization identifier
* @param x_item_id item identifier
* @param x_status status
* @param x_err_msg error message
* @rep:scope public
* @rep:lifecycle active
* @rep:displayname Get Item Identifier
*/
procedure get_item_id
(p_item_number in VARCHAR2,
p_org_id in NUMBER,
x_item_id out NUMBER,
x_status out VARCHAR2,
x_err_msg out VARCHAR2
);
END DSI_GET_ITEM_ID;
procedure get_item_id
(p_item_number in VARCHAR2,
p_org_id in NUMBER,
x_item_id out NUMBER,
x_status out VARCHAR2,
x_err_msg out VARCHAR2
)
IS
v_item_id number;
end_chk_excep exception;
BEGIN
begin
select inventory_item_id
into v_item_id
from mtl_system_items_b
where 1=1
and segment1=p_item_number
and organization_id=p_org_id;
exception when no_data_found then
x_status:='E';
x_err_msg:='Item Number Entered does not exist';
raise end_chk_excep;
end;
x_item_id := v_item_id;
x_status:='S';
x_err_msg:='DSI Custom Rest Service Successful';
exception
when end_chk_excep then
x_status := 'E';
x_err_msg := x_err_msg || ' - ' || sqlerrm;
when others then
x_status:='E';
x_err_msg:='Item Number Entered is not valid';
END GET_ITEM_ID;
END DSI_GET_ITEM_ID;
Connect to application server with FTP and upload pls file into INV_TOP :
Give permissions:
Connect to application server using putty tool and run the following unix command. This command
runs a perl script which is going to parse your pls file according to the annotations and generates an
ildt file.
$IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=sysadmin
INV:patch/115/sql:DSI_GET_ITEM_ID:12.0=patch/115/sql/DSI_GET_ITEM_ID.pls
To upload ILDT file into Oracle EBS, run the following command :
Log on to the applications with SYSADMIN username and click on the Integration Repository:
Navigate to Oracle Supply Chain Management Family->Oracle Inventory Management:
You can ‘Deploy’ the web service by clicking the ‘Deploy’ button, you can always redeploy or un
deploy the service:
Before Invoking the Webservice :
cd $INST_TOP/admin/scripts
adoafmctl.sh stop
adoacorectl.sh stop
adoafmctl.sh start
adoacorectl.sh start
Clear cache
Use responsibility Functional Administrator and go to Core Services -> Caching Framework -> Global
Configuration -> Clear all cache.
Now to test the web service , you can use tools like SOAP UI :
The url to be passed into the SOAP UI can be seen in the WSDL File generated : (look for soap address
location)
RespApplication : INV
SecurityGroup : STANDARD
NLSLanguage : AMERICAN
Org_Id : 204
For Authentication, enter the username/password in the request properties and click on the ‘Green
arrow-Submit Request to specified Url) button on the SOAP UI
USING REST WEBSERVICES :
Log on to the applications with SYSADMIN username and click on the Integration Repository:
Click on REST Web Service Tab , select the method you want to POST and click on ‘DEPLOY’ :
Select Group of Users and select ‘Inventory Vision Operations (USA)’ and then click on the WADL link :
Copy the link for XSD File and paste in the browser :
Now to test it download ‘POST MAN’ a google chrome extension and the URL would be combination
of links from WADL file above .
Under Headers, you should have the following : Note that Authorization : Basic ‘Uniquekey’ will be
generated by the Tool
Content-Type:application/xml
Authorization:Basic TUZHOndlbGNvbWU=
Accept:application/xml
Content-Language:en-US