Sending message from oracle to middleware through oracle messaging gateway

Hi,
I am very new to oracle AQ and oracle messaging gateway. I am actually trying to propagate a message from oracle to middleware through oracle messaging gateway.
I have created the link between oracle messaging gateway and middleware(IBM Websphere).
1.*Created an object type with a single attribute of type sys.xmltype*.
create or replace type xpctas_type as object(payload sys.xmltype);
2.*Created a qtable with payload type as xpctas_type, a queue and started the queue.*begin
dbms_aqadm.create_queue_table(
queue_table => 'xpctas_qtab',
queue_payload_type => 'xpctas_type',
multiple_consumers => TRUE
dbms_aqadm.create_queue(queue_name =>'xpctas_q',
queue_table => 'xpctas_qtab',
max_retries => 16);
dbms_aqadm.start_queue('xpctas_q');
end;
3.*Created a transformation that converts user defined type xpctas_type to messaging gateway canonical type sys.MGW_BASIC_MSG_T.*
For this I created a function that converts xpctas_type to messaging gateway canonical type sys.MGW_BASIC_MSG_T.
CREATE OR REPLACE FUNCTION APPS.order_2_basic(my_order in xpctas_type)
RETURN sys.mgw_basic_msg_t
IS
v_xml XMLTYPE;
v_text varchar2(4000);
v_clob CLOB;
v_basic sys.mgw_basic_msg_t;
text_body sys.mgw_text_value_t;
header     sys.mgw_name_value_array_t;
BEGIN
v_xml := XMLTYPE.createXML(my_order,NULL,NULL);
v_basic := sys.mgw_basic_msg_t.construct;
header := sys.mgw_name_value_array_t(sys.mgw_name_value_t.construct_integer('MGW_MQ_characterSet','1208'),
sys.mgw_name_value_t.construct_integer('MGW_MQ_priority', '7'));
IF(LENGTH(v_xml.getstringval())>0 AND LENGTH(v_xml.getstringval())<=4000) THEN
v_text := v_xml.getStringVal();
text_body := sys.mgw_text_value_t(v_text,NULL);
ELSE
dbms_lob.createtemporary(v_clob,TRUE,dbms_lob.session);
v_clob:=v_xml.getClobVal();
text_body := sys.mgw_text_value_t(NULL,v_clob);
dbms_lob.freetemporary(v_clob);
END IF;
v_basic:=sys.mgw_basic_msg_t(header,text_body,NULL);
RETURN v_basic;
END order_2_basic;
begin
dbms_transform.create_transformation(
schema => 'apps',
name => 'order_to_basic',
from_schema => 'apps',
from_type => 'xpctas_type',
to_schema => 'sys',
to_type => 'mgw_basic_msg_t',
transformation => 'Apps.order_2_basic(source.user_data)');
end;
4.     Registered a foreign queue.
declare
v_options sys.mgw_properties;
gv_mq_queue_name VARCHAR2(32);
begin
gv_mq_queue_name := 'MB.O2C.SOFTWARESOLUTION';
v_options := sys.mgw_properties(
sys.mgw_property('MQ_openOptions', '2066') );
dbms_mgwadm.register_foreign_queue(
name => 'destq', -- MGW foreign queue name
linkname => 'mqlink', -- name of link to use
provider_queue => RTRIM(gv_mq_queue_name), -- name of MQSeries queue
domain => dbms_mgwadm.DOMAIN_QUEUE, -- single consumer queue
options => v_options );
end;
5.     Added a subscriber with transformation.
begin
dbms_mgwadm.add_subscriber(
subscriber_id => 'sub_aq2mq', -- MGW subscriber name
propagation_type => dbms_mgwadm.outbound_propagation,
queue_name => 'apps.xpctas_q',
destination => 'destq@mqlink',
transformation => 'apps.order_to_basic');
end;
6.     Added a scheduler
begin
dbms_mgwadm.schedule_propagation(
-- schedule name
schedule_id => 'sch_aq2mq',
-- outbound propagation
propagation_type => dbms_mgwadm.outbound_propagation,
-- AQ queue name
source =>'apps.xpctas_q',
-- MGW foreign queue with link
destination =>'destq@mqlink');
-- The remaining fields currently not used by MGW
end;
7.     Enqueued a user defined data type into the qtable.
declare
l_xmlstring varchar2(2000);
l_payload sys.xmltype;
my_order xpctas_type;
enqueue_options DBMS_AQ.enqueue_options_t;
message_properties DBMS_AQ.message_properties_t;
msgid RAW( 16 );
v_num Number;
begin
SELECT '<?xml version="1.0" encoding="UTF-8" ?>
<Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/XXRFG_PRCS_CNCT_TO_ASSETS_STG" version="3.0.0" verb="Create" locale="en_US.UTF-8" delta="false">
<Q1:STAGING_ID>221</Q1:STAGING_ID>
<Q1:SW_INSTANCE_ID>18595755</Q1:SW_INSTANCE_ID>
<Q1:MC_INSTANCE_ID>194734</Q1:MC_INSTANCE_ID>
<Q1:OPCO>NUK</Q1:OPCO>
<Q1:RELATIONSHIP_FLAG>N</Q1:RELATIONSHIP_FLAG>
<Q1:RELATIONSHIP_TYPE>Connected To</Q1:RELATIONSHIP_TYPE>
<Q1:ObjectEventId />
</Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG>'
INTO l_xmlstring
FROM dual;
SELECT XMLTYPE(l_xmlstring)
INTO l_payload
FROM dual;
my_order:=xpctas_type(l_payload);
dbms_output.put_line(my_order.payload.getstringval());
DBMS_AQ.enqueue( queue_name => 'APPS.xpctas_q',
enqueue_options => enqueue_options,
message_properties => message_properties,
payload => my_order,
msgid => msgid
COMMIT;
END;
As soon as I enqueued the message the subscriber picked the message and sent it to middleware. I found the below message in the middleware
MD            ÿÿÿÿ      ¸  MQSTR         AMQ HBU473QC61  PTÀ+H^                                                                            HBU473QC61                                      mqm                                                                                                        2012112109335869                                       ÿÿÿÿ
*<XPCTAS_TYPE><PAYLOAD><Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/XXRFG_PRCS_CNCT_TO_ASSETS_STG" version="3.0.0" verb="Create" locale="en_US.UTF-8" delta="false">*
*<Q1:STAGING_ID>221</Q1:STAGING_ID>*
*<Q1:SW_INSTANCE_ID>18595755</Q1:SW_INSTANCE_ID>*
*<Q1:MC_INSTANCE_ID>194734</Q1:MC_INSTANCE_ID>*
*<Q1:OPCO>NUK</Q1:OPCO>*
*<Q1:RELATIONSHIP_FLAG>N</Q1:RELATIONSHIP_FLAG>*
*<Q1:RELATIONSHIP_TYPE>Connected To</Q1:RELATIONSHIP_TYPE>*
*<Q1:ObjectEventId/>*
*</Q1:XXRFG_PRCS_CNCT_TO_ASSETS_STG>*
*</PAYLOAD></XPCTAS_TYPE>*
It has some junk data in the begining. How can I remove this junk data?? Any help provided on this would be of great help.
Experts on oracle mesaging gateway and AQ, Please help.
Thanks & Regards,
Sachin

Hello,
your setup of the message gateway seems to be ok.
Did you check the corresponding versions of the client libraries (*.jar) ? These are the libraries on
db server side (e.g. aqapi.jar, based on your CLASSPATH entries in file "mgw.ora") and for the IBM MQ jars.
Kind regards,
WoG

Similar Messages

  • When i try to send email from my ipad i get the message The recipient "£)()&&£)" was rejected by the server. This has only just started to happen and I don't know why. Please help. I have tried lots of things now and cannot solve it.

    When i try to send email from my ipad i get the message The recipient "£)()&amp;&amp;£)" was rejected by the server. This has only just started to happen and I don't know why. Please can someone help. I have tried lots of things now and cannot solve it.

    "Your email account" means to tap on the name of your email account. Whatever it is listed as in the settings.
    In my mail settings, one of my email accounts is a Comcast account. I tap on the Comcast name and it brings up this window.
    Then I tap on the arrow under the Outgoing mail server smtp setting to get to the next window.
    In the resulting window, I then tap on the arrow next to the smtp server under the Primary Server setting.
    That brings up this window in which I check to make sure that my user name and password have been entered correctly. If those items are missing, enter them in the appropriate fields and then tap done.

  • I am unable to receive or send email from my IPAD.  The error message says "Connection to server failed".  Help!! geandreamer44

    I am unable to receive or send email from my IPAD.  The error message says "Connection to server failed".  Help!! geandreamer44

    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    If that doesn't help, tap Settings > General > Reset > Reset Network Settings
    You will have to re enter your Wi-Fi password.
    If nothing above helped, restart your router.
    No data is lost due to a reset.

  • How do i stop my messages from my iPhone coming through to my macbook ?

    how do i stop my messages from my iPhone coming through to my macbook ?

    Follow the instructions under the heading "How to unlink a phone number" on this page.

  • I received a message from another Mac and my original message showed as a crumpled piece of paper.  How do I get that effect?

    I received a message from another Mac and my original message showed as a crumpled piece of paper.  How do I get that effect?

    Open the Disk Utility in the /Applications/Utilities/ folder, select the drive in the list on the left, and push the Enable Journaling button at the top of the window.
    (64969)

  • Query data from MS SQL db through Oracle ? By using JAVA ?

    Hi folks,
    I would like to sync our one table in oracle db with table in different system, stored in MS SQL database.
    What would be the easiest option for connection from Oracle to MS SQL db to be able to query data from MS SQL through some Oracle package?
    If possible, I would like to keep all "tricky steps" within Oracle database. I heard about option with Java, but so far we have no experience with java in Oracle.
    Our database: Oracle 11g Database Standard Edition One
    Many thanks,
    Tomas

    C:\Users\tomeo>dg4pwd HELIOS
    ORACLE Gateway Password Utility
    Constructing password file for Gateway SID HELIOS
    For user account SYSTEM
    OPW-00001: Unable to open password-file (RC=0)
    C:\Users\tomeo>

  • List of Oracle Reports run through Oracle Portal.

    Hi,
    It's possible that I am posting my message to a wrong Forum. If that's so, please let me know (and the correct forum too).
    I have several Oracle Reports that are run through Oracle Portal (when user clicks a link for a report). I want to get a list of all such Oracle Reports in one go as I need to modify all of them. At the moment, to get the actual report name that I need to modify I am following the steps below.
    When I am at 'Oracle Reports Security' page (in the Portal) where there is a section 'Reports Definition File Access',
    1. I click list icon without entering any value in the box. It shows me a list of all report definitions.
    2. After selecting a report definition, and clicking Edit, it shows me 'Manage Component' page. There are several links available. One of them is 'Edit'.
    3. I click 'Edit' and it shows me the actual 'Oracle Reports File Name'. This is the file I need to work on.
    But instead of following the above steps for each of the several reports I need to modify, is there any way, say by running a SQL query, to find out the actual Oracle Reports file names?
    The 'Manage Component' page shows 'Run Link' and links for 'PL/SQL source'. I tried to search for the schema name and package name in the database (by connecting as SYS user). However, I found neither the Schema not the Package.
    Hope my question is clear. In brief, I want to get a list of Oracle Reports file names that are run through Oracle Portal.
    Any questions, please let me know.
    Thanks and regards,
    Manoj.

    Jim,
    Did you ever try to add Reports portlet as an item, so that user can click on each item to customize/schedule the report? You can have 50 of them, if that is what you really need.
    Any reason why you want to create custom user interface, instead of using this vehicle that Portal provided by default?
    You mentioned "The report Portlet ... does not allow customization." Actually, it does. You can do it by clicking on the Customize link of the Reports portlet.
    Hope this helps,
    -Jeff

  • My iPhone 4 is sending texts from my email!! Error message near phone number!

    My iPhone 4 is sending texts from my email and when I go into the settings to fix this it says "Error" next to my phone number and will not allow me to select it to send/receive texts from. So people are telling me they are texting me but I have not received them and they are telling me that I am sending mesages from my email. Please Help!

    Open Settings.
    Go to Messages > Send & Receive.
    Select or unselect as you please.
    Tip: You can un-check your emails if you don't want to send or receive using your email.

  • How to Send pdf from Salesforce to Echosign through REST API?

    I'm trying to send PDF generated from Visualforce page and through Apex REST I'm trying to invoke Echosign REST API. But while invoking "/transientDocument" URL, it says Unsupported content type. Any help on how to construct multipart/form-data in Salesforce?

    I'm afraid it's a bit beyond me, but why not use the ready-made Echosign for Salesforce application you can download from the app exchange?

  • Is there a way to send a message from Mail to an iPhone's Messages?

    Is there a way to send a message from Mail to an iPhones Messages?

    "Send an SMS text message
    You can use iChat to send an SMS (short message service) text message to a buddy’s iPhone or other mobile phone from an AIM, Mac.com, or me.com account.
    Note: SMS messaging is available in the U.S. only. 
    Choose File > New SMS.
    In the To field, type your buddy’s phone number, and then click Chat.
    In the chat window, type a message and press Return.If your buddy’s phone is set up to receive text messages, you see a reply telling you that the message has been sent. If your buddy replies, the reply appears in the chat window.
    To receive text messages, your buddy’s phone must be SMS enabled."

  • Problem in connecting to Oracle 8 database through Oracle 11g client ?

    Database : Oracle 8
    Client Machine :
    Oracle 11g
    Window7
    Microsoft ODBC Driver for Oracle
    Hi,
    I am using Oracle 11g client to connect Oracle 8 database using Microsoft ODBC Driver for Oracle but I am getting error when after entered the password
    Run-time error '40002':
    IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
    I am using VB6 application on Windows 7 and I created DSN using Microsoft ODBC Driver for Oracle but I got the above error when I try to connect to Database.
    Please help me out on this that why this error is coming
    Thanks
    Amit Panwar

    Provided its a 32-bit application, possibly. Microsoft ODBC for Oracle is discontinued and has no 64-bit version, so a 64-bit application won't be able to use it at all.
    I do see it listed as a 32-bit ODBC driver on my Windows 7. The problem is that I think it relies on having an Oracle client installed on the machine, and you've got the same problem of Oracle client 11 not working with 8 server. You could try it and see if it works I suppose, or try installing an older client and see if that makes it work.
    If it's just for testing purposes though you could throw up an Oracle XE server and test against that.

  • Plain Text Message from Outlook being converted to RTF thru Gateway

    Hi,
    I have the GW Gateway running in a Proof of Concept environment.
    When GroupWise users send Plain Text format messages thru to Exchange,
    the message is delivered in Rich Text Format.
    HTML format is honoured through the gateway - i.e. HTML format messages
    from GroupWise are delivered in HTML format.
    Is there any way - switches, etc - that we can stop the conversion to
    RTF thru the gateway? My users noticed this during testing when then
    discovered they can edit the RTF message body in Outlook.
    Thanks for your help
    Phil
    Phil Tuttiett, Palmerston North, New Zealand

    There might be a resolve bug that would effect this positively for you.
    Bug 403443 - Exchange Gateway conversion issue with RTF from Word. and Tid 7001088
    if your code is older then 7-14-08 then it might be worth trying some later code to see if this bug fix helps you.
    There is a Testing build that you can try. There are also several people using this testing code so I am not concerned if you try it and use it.
    The most current version of the gateway can be downloaded at ftp.novell.com/outgoing/groupwise_exch_7.0.1_2008.07.22_us.zip
    good luck!
    >>> Phil Tuttiett<[email protected]> 2008-06-04 6:16 AM >>>
    Hi,
    I have the GW Gateway running in a Proof of Concept environment.
    When GroupWise users send Plain Text format messages thru to Exchange,
    the message is delivered in Rich Text Format.
    HTML format is honoured through the gateway - i.e. HTML format messages
    from GroupWise are delivered in HTML format.
    Is there any way - switches, etc - that we can stop the conversion to
    RTF thru the gateway? My users noticed this during testing when then
    discovered they can edit the RTF message body in Outlook.
    Thanks for your help
    Phil
    Phil Tuttiett, Palmerston North, New Zealand

  • I cannot receive text messages from one friend in a group message. Any hints?

    I am in a group message with all iphones and one nokia. I have recently not been able to receive messages from one of the iphone users in the message. When he tries to respond it sends it in a new message without me (everyone else gets them). Anyone else have this problem or know how to fix it?

    This has nothing to do with entires in Contacts. Tell your friend who's messages don't reach you:
    Settings > Messages > Goup Messages > ON, Send as SMS > ON

  • How do you stop a message filter vacation message from responding repeatedly to a failure message?

    I set up a message filter for a vacation message while I was away. The problem is, every time I get a junk message (like from LinkedIn, Facebook, etc.), it sends the vacation message, then gets a failure message, and then responds to the failure message. This keeps happening until I can get into my settings and shut off the filter. Sometime I come back to over 200 failure messages because it just keeps sending the auto response over and over.
    Any suggestions on how to avoid this?

    the support article [[Vacation Response|here]] says use the setting provided by your service provider on their web site for a reason.
    To answer your specific question, you will need to check the from email is not one of those junk email addresses (perhaps an address book could be created for them and the filter check it accordingly. You filter will also need to check the message is not a delivery failure notification and in truth will still bury someone is vacation responses because it sends them one every time they email you.

  • Ios8 not receiving messages from a member of a group message

    I have a recurring group message with some of my friends. When I updated to iOS8 I stopped receiving messages from one of the members of the group, but everyone else is still receiving them. When I text just that group member though, I receive her messages.  How do I fix that?

    You have both gone into your iMessage settings and made certain that the phone numbers are correct as well as your Apple ID, and email address?

Maybe you are looking for

  • IPOD NOT RECOGNIZED BY WINDOWS...I HAVE TRIED EVERYTIHING  help plz

    i got my ipod nano 4 GB for christmas. middle of march it is already broken. my windows does not recognize ipod. i have tried everything...gone through tons of posts. no help yet........PLEASE HELP MEEEE

  • Connecting a New TV

    I recently purchased a new "smart" tv, but it won't connect to my wireless router.  The onscreen instructions on the tv suggest that i check my router settings, "enable DHCP,"  for example.  Can anyone help me with this?

  • Error when I change the visibility of a context node

    Hi, I had to change the visibility of a context node (ZActivityH) to public (it was private) in the context to access it in the method DO_HANDLE_EVENT. I used transaction BSP_WD_WORKBENCH. I verify and activate it. As a result of changing the visibil

  • Can we post zero dollar invoice (AP)

    Hi I have come across a weired situation. We need to clear the GRIR balance and to clear the quantity, we want to process the dummy invoice with zero dollar.Is it possible ? My system does not allow that. Thanks in advance

  • Can varargs in SessionBeans be deployed in WL9.2? modifier transient

    Hello, We're trying to deploy an ear onto an AdminServer in development mode. We want to declare some local stateless session beans with vararg input parameters. e.g. public String[] getValidIDsOfType(String validOnDate, String... filterTypes); It co