Print Page

Tuesday, April 15, 2008

Oracle B2B and XML Gateway Integration

B2B XMLGateway Interoperability can be achieved in two ways.

1. ECX Queues : B2B has pre-seeded delivery channel for the XML Gateway Inbound and outbound queues such as ECX_INBOUND and ECX_OUTBOUND. Even though the Delivery channels are pre-seeded , there is a need to create the queues and the corresponding SQL are as follows.

connect apps/apps

drop type ECXMSG;
/

create type ECXMSG as OBJECT (
MESSAGE_TYPE VARCHAR2(2000) ,
MESSAGE_STANDARD VARCHAR2(2000) ,
TRANSACTION_TYPE VARCHAR2(2000) ,
TRANSACTION_SUBTYPE VARCHAR2(2000) ,
DOCUMENT_NUMBER VARCHAR2(2000) ,
PARTYID VARCHAR2(2000) ,
PARTY_SITE_ID VARCHAR2(2000) ,
PARTY_TYPE VARCHAR2(2000) ,
PROTOCOL_TYPE VARCHAR2(2000) ,
PROTOCOL_ADDRESS VARCHAR2(2000) ,
USERNAME VARCHAR2(2000) ,
PASSWORD VARCHAR2(2000) ,
PAYLOAD CLOB ,
ATTRIBUTE1 VARCHAR2(2000) ,
ATTRIBUTE2 VARCHAR2(2000) ,
ATTRIBUTE3 VARCHAR2(2000) ,
ATTRIBUTE4 VARCHAR2(2000) ,
ATTRIBUTE5 VARCHAR2(2000)
);
/

begin
begin
dbms_aqadm.stop_queue('ECX_INBOUND');
exception when others then null; end;
begin
dbms_aqadm.stop_queue('ECX_OUTBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue('ECX_INBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue('ECX_OUTBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue_table('ECX_INQUEUE');
exception when others then null; end;
begin
dbms_aqadm.drop_queue_table('ECX_OUTQUEUE');
exception when others then null; end;
end;
/

declare
begin
dbms_aqadm.create_queue_table('ECX_INQUEUE','apps.ECXMSG',multiple_consumers=>FALSE);
dbms_aqadm.create_queue_table('ECX_OUTQUEUE','apps.ECXMSG',multiple_consumers=>FALSE);
dbms_aqadm.create_queue('ECX_INBOUND', 'ECX_INQUEUE');
dbms_aqadm.create_queue('ECX_OUTBOUND', 'ECX_OUTQUEUE');
dbms_aqadm.start_queue('ECX_INBOUND');
dbms_aqadm.start_queue('ECX_OUTBOUND');
end;
/

connect system/welcome1
grant execute on apps.ECXMSG to b2b
/

exit;

XML Gateway enques the message to ECX_OUTBOUND queues and pick it from ECX_INBOUND queues. For outbound XML Gateway
should set the following ECX Headers.


MESSAGE_TYPE
MESSAGE_STANDARD
TRANSACTION_TYPE
TRANSACTION_SUBTYPE
DOCUMENT_NUMBER
PARTYID
PARTY_SITE_ID
PARTY_TYPE
PROTOCOL_TYPE
PROTOCOL_ADDRESS
USERNAME
PASSWORD
PAYLOAD
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5

among which TRANSACTION_TYPE, TRANSACTION_SUBTYPE,PARTY_SITE_ID,ATTRIBUTE1 are mandatory attributes. For inbound message, B2B enques the message to ECX_INBOUND queue with consumer name as b2buser, and the consuming application which is
XML Gateway in this case should use the same consumer name.

XML Gateway generates an OAGIS 7.x document, and there is a need to translate it to Edifecs XML before getting this processed in B2B as B2B mandates the incoming document to be Edifecs XML. B2B translates the Edifecs XML to native EDI using the inbuilt XEngine. To translate OAGIS to Edifecs XML use outbound call out and the
same is true in inbound case to translate the Edifecs XML to OAGIS document to be consumed by XML Gateway.


2. IP Queues : This approach used pre seeded queues IP_OUT_QUEUE and IP_IN_QUEUES with corresponding Delivery channel. Typical flow involves B2B Enques the message to IP_IN_QUEUE and BPEL Process consumes the message from IP_IN_QUEUE and send it to Ebiz suite using EBS adapter.

Refer the following Apps adapter documents which talks about various interface types for integrating with Oracle Applications:

http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430241.htm
http://www.oracle.com/technology/products/integration/htdocs/ds_oracleas_ebs_adapter.pdf
http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430340.htm

also refer various samples under 10.1.3.1\OracleAS_3\bpel\samples\tutorials\150.AppsAdapter

1 comment:

Unknown said...

That's pretty good explaination, thanks