Please refer to http://oracleappstoday.blogspot.in/2014/06/create-custom-queue-in-oracle-and-use.html to learn to use JMS queue as a XML payload holder before it is enqueued to ECX_INBOUND queue.
In order to populate the ECX_INBOUND queue from backend you need to do the following
Create a ECX_MSG
Enqueue the ECX_MSG to the standard ECX_INBOUND queue
The code below achieves both the above points
Please feel free to reach out to me
set serveroutput on;
DECLARE
v_destination_queue VARCHAR2 (100) := 'APPLSYS.ECX_INBOUND';
v_enqueue_options SYS.DBMS_AQ.ENQUEUE_OPTIONS_T;
v_enqueue_properties SYS.DBMS_AQ.MESSAGE_PROPERTIES_T;
v_enqueue_payload SYSTEM.ecxmsg;
x_enqueue_msgid RAW (16);
v_protocol_add VARCHAR2(100) := 'https://XXAB.dev1.XXAB.com:4443/oa_servlets/oracle.apps.ecx.oxta.TransportAgentServer';
v_xml_message CLOB := '<HEADER><NAME>Hello World</NAME></HEADER>';
BEGIN
v_enqueue_payload :=
SYSTEM.ecxmsg (
message_type => 'XML',
message_standard => 'OAG',
transaction_type => 'XX_TRX_TYPE_EBS', -- Transaction Type
transaction_subtype => 'XX_SUB_TRX_TYPE_EBS', -- Transaction Sub Type
document_number => '110', -- Doucument Number is a Unique Number
partyid => NULL,
party_site_id => 'XXRHESB',
party_type => NULL,
protocol_type => NULL,
protocol_address => v_protocol_add,
username => 'apps',
password => 'apps',
payload => v_xml_message
);
sys.DBMS_AQ.enqueue (
queue_name => v_destination_queue,
enqueue_options => v_enqueue_options,
message_properties => v_enqueue_properties,
payload => v_enqueue_payload,
msgid => x_enqueue_msgid
);
COMMIT;
dbms_output.put_line(x_enqueue_msgid);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlerrm);
END;
In order to populate the ECX_INBOUND queue from backend you need to do the following
Create a ECX_MSG
Enqueue the ECX_MSG to the standard ECX_INBOUND queue
The code below achieves both the above points
Please feel free to reach out to me
set serveroutput on;
DECLARE
v_destination_queue VARCHAR2 (100) := 'APPLSYS.ECX_INBOUND';
v_enqueue_options SYS.DBMS_AQ.ENQUEUE_OPTIONS_T;
v_enqueue_properties SYS.DBMS_AQ.MESSAGE_PROPERTIES_T;
v_enqueue_payload SYSTEM.ecxmsg;
x_enqueue_msgid RAW (16);
v_protocol_add VARCHAR2(100) := 'https://XXAB.dev1.XXAB.com:4443/oa_servlets/oracle.apps.ecx.oxta.TransportAgentServer';
v_xml_message CLOB := '<HEADER><NAME>Hello World</NAME></HEADER>';
BEGIN
v_enqueue_payload :=
SYSTEM.ecxmsg (
message_type => 'XML',
message_standard => 'OAG',
transaction_type => 'XX_TRX_TYPE_EBS', -- Transaction Type
transaction_subtype => 'XX_SUB_TRX_TYPE_EBS', -- Transaction Sub Type
document_number => '110', -- Doucument Number is a Unique Number
partyid => NULL,
party_site_id => 'XXRHESB',
party_type => NULL,
protocol_type => NULL,
protocol_address => v_protocol_add,
username => 'apps',
password => 'apps',
payload => v_xml_message
);
sys.DBMS_AQ.enqueue (
queue_name => v_destination_queue,
enqueue_options => v_enqueue_options,
message_properties => v_enqueue_properties,
payload => v_enqueue_payload,
msgid => x_enqueue_msgid
);
COMMIT;
dbms_output.put_line(x_enqueue_msgid);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlerrm);
END;
Does your method use a transaction map if it's tied to the TP at the time that you enqueue the message?
ReplyDelete