AQXmlNotification no payload

Hi,
db v9.0.1.3
os solaris 5.6
I've created a queue and registered a PLSQL callback procedure. This procedure sends a notification email (setup using dbms_aqelm). I'm not using the AQ servlet, just PLSQL.
Couple of questions:
As i understand it, the payload is only included in the (email) XML if the message queue is non-persistent. Is there any way of including the payload for a message from a persistent queue in the mail notification?
Assuming the payload is included in the notification....
Is it possible to specify an XSL stylesheet to be applied to the mail notification before sending (to do XSL transformation of message into html email) so that the recipient has something more intuitive to look at? And if so, any pointers how i can apply the transformation stylesheet from within db? (from PLSQL using XDK for instance?)
Many thanks
James

Here is an example from Oracle XDK samples of how to apply XSL stylesheet to an XML document.
This example uses files present on the Operating System to apply the XSL Transformation.
You could change it to use a CLOB or a VARCHAR2 string depending upon your queue payload type.
-- This file demonstates a simple use of XSLT transformation capabilities.
-- The XML and XSL files that are given to the application are parsed,
-- the transformation specified is applied and the transformed document is
-- written to a specified result file.
-- The use of setting the parser options is demonstrated.
set serveroutput on;
create or replace procedure xslsample(dir varchar2, xmlfile varchar2,
xslfile varchar2, resfile varchar2,
errfile varchar2) is
p xmlparser.Parser;
xmldoc xmldom.DOMDocument;
xmldocnode xmldom.DOMNode;
proc xslprocessor.Processor;
ss xslprocessor.Stylesheet;
xsldoc xmldom.DOMDocument;
docfrag xmldom.DOMDocumentFragment;
docfragnode xmldom.DOMNode;
xslelem xmldom.DOMElement;
nspace varchar2(50);
xslcmds xmldom.DOMNodeList;
begin
-- new parser
p := xmlparser.newParser;
-- set some characteristics
xmlparser.setValidationMode(p, FALSE);
xmlparser.setErrorLog(p, dir || '/' || errfile);
xmlparser.setPreserveWhiteSpace(p, TRUE);
xmlparser.setBaseDir(p, dir);
-- parse xml file
dbms_output.put_line('Parsing XML document ' || dir || '/' || xmlfile);
xmlparser.parse(p, dir || '/' || xmlfile);
-- get document
xmldoc := xmlparser.getDocument(p);
-- parse xsl file
dbms_output.put_line('Parsing XSL document ' || dir || '/' || xslfile);
xmlparser.parse(p, dir || '/' || xslfile);
-- get document
xsldoc := xmlparser.getDocument(p);
xslelem := xmldom.getDocumentElement(xsldoc);
nspace := xmldom.getNamespace(xslelem);
-- print out some information about the stylesheet
dbms_output.put_line('XSL Root element information');
dbms_output.put_line('Qualified Name: ' ||
xmldom.getQualifiedName(xslelem));
dbms_output.put_line('Local Name: ' ||
xmldom.getLocalName(xslelem));
dbms_output.put_line('Namespace: ' || nspace);
dbms_output.put_line('Expanded Name: ' ||
xmldom.getExpandedName(xslelem));
xslcmds := xmldom.getChildrenByTagName(xslelem, '*', nspace);
dbms_output.put_line('A total of ' || xmldom.getLength(xslcmds) ||
' XSL instructions were found in the stylesheet');
-- make stylesheet
ss := xslprocessor.newStylesheet(xsldoc, dir || '/' || xslfile);
-- process xsl
proc := xslprocessor.newProcessor;
xslprocessor.showWarnings(proc, true);
xslprocessor.setErrorLog(proc, dir || '/' || errfile);
dbms_output.put_line('Processing XSL stylesheet');
docfrag := xslprocessor.processXSL(proc, ss, xmldoc);
docfragnode := xmldom.makeNode(docfrag);
dbms_output.put_line('Writing transformed document');
xmldom.writeToFile(docfragnode, dir || '/' || resfile);
-- Free XML Documents
xmldom.freeDocument(xmldoc);
xmldom.freeDocument(xsldoc);
-- Free XSL Stylesheet and Processor
xslprocessor.freeProcessor(proc);
xslprocessor.freeStylesheet(ss);
-- Free the xmlparser
xmlparser.freeParser(p);
-- deal with exceptions
exception
when xmldom.INDEX_SIZE_ERR then
raise_application_error(-20120, 'Index Size error');
when xmldom.DOMSTRING_SIZE_ERR then
raise_application_error(-20120, 'String Size error');
when xmldom.HIERARCHY_REQUEST_ERR then
raise_application_error(-20120, 'Hierarchy request error');
when xmldom.WRONG_DOCUMENT_ERR then
raise_application_error(-20120, 'Wrong doc error');
when xmldom.INVALID_CHARACTER_ERR then
raise_application_error(-20120, 'Invalid Char error');
when xmldom.NO_DATA_ALLOWED_ERR then
raise_application_error(-20120, 'Nod data allowed error');
when xmldom.NO_MODIFICATION_ALLOWED_ERR then
raise_application_error(-20120, 'No mod allowed error');
when xmldom.NOT_FOUND_ERR then
raise_application_error(-20120, 'Not found error');
when xmldom.NOT_SUPPORTED_ERR then
raise_application_error(-20120, 'Not supported error');
when xmldom.INUSE_ATTRIBUTE_ERR then
raise_application_error(-20120, 'In use attr error');
end xslsample;
show errors;

Similar Messages

  • Filename in Attachement payload

    Hy,
    I have to detach an email attachement on my file System.
    That's works but I'm not able to maintain the same filename.
    Can anybody help me.
    Thanks
    Mat

    Hi Mattia,
    If your file name is a part of your email atttachment ( the payload ), then you can dynamically create your file name.
    To do this,in the filename of the receiver file adapter, give the filename a <b>%var%</b>.
    Anything between % is treated as a varibale by XI. Now, under variable name substitution, you will have to give the value of var and this will act as the filename.
    You can access the payload using <b>payload:</b> and the XPATH.
    For info on how to do this, check the topic<b> VARIABLE SUBSTITUTION</b> in this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    hope this helps,
    Regards,
    Bhavesh

  • Filename in payload

    Hello experts,
    Is there anyway I can get filename and populate in the payload so I can see it as an additional tag in SXMB_MONI? This is from sender file adapter that I want to capture file name. If possible, I would also like to populate interface name, message ID in the payload in SXMB_MONI. I have read Dynamic Configuration blogs but that brings the filename in the Dynamic Configuration but I would like to get them in payload.
    Thanks,
    John

    John,
    I think, this it is possible by implementing
    1. Java Mapping
    2. UDF
    Please refer this help link which clearly explains how to access message id, interface name etc.
    [http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm]
    Regards
    Ramesh

  • Error while assigning Payload to container variable, Activate SXI_Cache

    Hi experts,
    I have a BPM-Szenario. There is a ContainerOperation where I want to fill a Container Variable with a Payload variable. Unfourtunately I get an error in TA sxi_cache: "The value of expression "&.....&" cannot serve as the source of an Assignment.
    My question is, is it really unpossible to do this?
    By the way: After them my bpm in sxi_cache is blocked. Also if i delete the container operation it is a lot of luck to activate my bpm.
    My actions to activate the BPM are:
    IR - F7 = all is ok
    ID - Delete IP and Create the IP new
    SLD-Cache - Activate in IR and ID
    SXI_Cache - Delta and Full Cache Refresh
    TA SWWL - There are no error work items
    All actions do have no influence to the sxi_cache.
    Are there any ideas from the experts?
    Best
    Mathias

    Hello Mathias,
    How do you assign the container varaible? Are you sure, that your XPath-expression is correct? Is your target container a simple typed container?
    Best regards
    Joachim

  • Dynamic file name from input payload (RFC 2 flat file)

    Hi,
    I have an RFC to flat file scenario. The output flat file has not an XML structure, it's just a plain text file generated with abap mapping.
    In my source interface (RFC), I have a field called <FILENAME>, I want to use the value of that field to create the target file using dynamic file name. But if  in variable substitution I use payload:ZRFC_NAME,1,FILENAME,1 It doesn't work because the dynamic variable substitution try to access to output payload, not the source one...
    What can I do?

    Hi Marshal,
           You can add a extra node to your target strucutre like
    FileName- Node
    --FileName - Element.
    do the mapping from the field filename of RFC to FileName field in u r target strucure. And use this  field path at Refrence in variable subtituion.
    In the Content converison add the Name & Values as below
    FileName.fileldNames -- FileName
    FileName.fieldFixedLengths -- 0
    FileName.fixedLengthTooShortHandling -- Cut
    So the extra field in u r target structure would not populate in u r target text file.
    Cheers
    Veera

  • Setting the JMS Header from Payload

    Hi Experts,
    My requirement is to send the payment data coming from ECC to non sap system.Sender adapter is proxy and receiver is JMS.ECC will be sending the filename in one field and payload content as a string in another field.PI has to set the filename coming from ECC in JMS header property.What configuration changes should i need to make in JMS adapter to achieve it?
    Converting the XML to string is possible in PI.But my question is converting the string XML data into XML fields is possible in SAP PI?If so how to do that?
    Please provide your suggestion.
    Regards,
    Karthiga

    Hi Karthiga,
    The UDF is there in blog
    DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
                DynamicConfigurationKey dynamicconfigurationkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "DCJMSMessageProperty0");
                String s = dynamicconfiguration.get(dynamicconfigurationkey);
                CorrID.append(s);
    Please let me know if you have any issue.
    regards,
    Harish

  • File Receiver - Dynamically create filename from data in payload

    Hi there.
    Can anyone tell me the approach I need to take to be able to use the data in one field to determine the filename in the file receiver adaptor.
    I have a requirement that requires that I save a file with the following mask:
    xxxx_xxx<b><date extracted from field in payload></b>.csv
    I would appreciate any help on this.
    Thanks in advance.
    Mick.

    Hi Mick,
    you just need to use adapter specific parameters
    and you will be able to set the name in your mapping
    (from your payload)
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Processing the filename in the payload

    Hi,
    I am getting the filename in the payload, I want to read that file.
    How do I achieve this..
    Regards,
    Varun

    Hi,
    For Example if we want to get the Input file name & Directory Details into Target message.
    Ex:
    I/P File name is :::::231004.xml  Ftp Serve Path : //xideveloper/Test_XI/PO
    O/P File name can be :::Any thing
    Input File :  231004.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_TEST_AGCO xmlns:ns0="http://tafe.test.com">
       <Header>
          <NAME>giri</NAME>
       </Header>
    </ns0:MT_TEST_AGCO>
    Output File : Out.xml
    Here in this output we are able to get the Filename & Directory Info in the FileName_1 Field.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_target xmlns:ns0="http://test.com">
    - <Header>
      <Name_1>giri</Name_1>
      <File_Name_1>231004.xml //xideveloper/Test_XI/PO/</File_Name_1>
      </Header>
      </ns0:MT_target>
    You should capture the Source File name & Directory Info into Target Message.
    1)     Write One UDF & Map Like Constant(u201Cu201D)---UDF----FileName_1
    2)            In Advanced mode check the check box Set Adapter-Specific Attributes
    3)     Check the ASMA Parameters in Sender Adapter Alone
    4)             No need to check the check box ASMA in the receiver side
    UDF Code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //for getting filename
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //for getting directory
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    /similarly for getting filetype, filesize you need to specify in the above code instead of filename or directory/
    String FileName = conf.get(key1);
    String Directory = conf.get(key2);
    String Cat = FileName+ " "+Directory;
    //return FileName;
    //return Directory;
    return Cat;
    Regards
    Seshagiri

  • Accessing the filename in the payload

    Hii
      I want to process the filename (eg:sample.xml) from the payload of the message.
    <Message>
          <Method/>
          <Source>sample.xml</Source>
          <Target/>
       </Message>
    And use the filename in other scenario.
    Regards,
    Varun

    Hi Varun
    Use variable substitution
    File name : %FileName%
    Enable variable substitution in Receiver File adapter.
    Variable name = FileName
    Reference = payload:Message,1,Method,1,Source,1
    For more info refer
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Thanks
    Gaurav

  • Sender filename in receiver payload without using mapping.

    hi Experts,
    I have a File to RFC scenario. wherein i need to pass source filename and filepath as parameter to RFC whenever file arrives at source directory.
    I am not using IR contents. What could be the simplest way to achieve this.
    One way ofcourse is to write an adapter module to generate Receiver payload with the required information.
    Can we have even more easier way to achieve this. Can something be done in Content conversion to get the receiver xml payload with filename and filepath?
    Regards,
    Girish

    Hi Girish
    You can use  IR mapping for a binary source data, but it must be a Java class, not an abap or graphical mapping.
    Regards,
    Carme.

  • Filename extension in Payload Swap bean

    Hi Experts
    I have a scenario Proxy to FTPS , where I have to send an excel attachment. I have used payload swap bean in receiver channel and it is working fine as I am now able to see attachment in final destination folder however since the file name is coming from ECC and we are using dynamic configuration in PI to handle this. excel attachment is missing the extention .xls when it is being triggered from ECC and therefore in FTP folder file is getting generated but with no extention.
    I have added the extention .xls (as per the MIME header) in dynamic config and also tried to use concat function to achieve this extention to be added as final name of the file but when I did above adjustments I can see the correct name being generated in Main payload in SAP PI receiver channel monitoring but not in final destination folder, file still looks same as earlier (without any extention) , I believe since I am using payloadswapbean in module whatever I am getting in Mainpayload is being swapped by excel attachment values but not sure why the correct extention is not being shown up at final destination folders.
    Please suggest how can I get the correct file name in destination folder with the help of SAP PI, I know I can do this if ECC will add .xls in attachment name.

    Hi Mohit,
    I have tested the same scenario and it is working with PayloadSwapBean and DynamicConfiguration in the mapping and the file name correctly placed in the target.
    Receiver File CC:
    Dynamic Configuration:
    Target Directory:
    If your file name correctly set in dynamic configuration then the target file will be created correctly.
    Regards,
    Praveen.

  • Sender mail adapter : How to get mail in both payload AND attachment ?

    Hi,
    I need to get the mail content both ways every time :
    -In attachment in order to store it later.
    -In payload in order to use it.
    I don't see any way to do this. Any ideas ?
    JB.

    Thanks for that fast answer.
    But I have no problems with reading the payload content or accessing any attachment.
    My issue is the following : I need to push the payload content as an attachment before sending the message to the Abap Proxy.
    Scenario is the following :
    Mail box --> PI --> ECC/Abap Proxy.
    I already store all the attachment during the proxy execution, I would like to be able to do the same withe the mail content.
    Edited by: JB CABIRO on Jan 13, 2012 4:12 PM

  • No Payload in the soap receiver call adapter ?

    Hi Guys,
    configured Proxy-SOAP Asynchronus process and in the sxmb_moni, i am unable to see the payload under call adapter in sxmb_moni, but i am able to see the payload under RWB in MDT. The message is checked successful in monitor.
    I am not understanding why i am unable to see the payload under call adapter in sxmb_moni.  I am not getting the data into my receiver system.
    Do i need to mention the QOS as EO in the soap url in the soap receiver adapter configuration ?
    any help would be really appreciated
    Thanks,
    srini

    Hi,
    You can only see the Payload(both with and without transformation) in MONI. message that is handling by adapter can only seen in Adapter Framework using RWB-Message Monitoring or using Communication Channel Monitoring.
    Regards,
    Farooq.
    <b>
    Rewards points if you find it usefull.</b>

  • Lookup in own payload

    Hi all,
    during mapping I have to use entries of another node of the same payload as lookup table? Is this possible with graphical message mapping, may be advanced functions, or should I use XSLT?
    Regards
    Mathias

    hi,
    sure it's possible:
    you can use global variables (global arrays for example)
    /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    the easiest way
    you can also use containers but go for global variables
    Regards,
    michal

  • Ns0 in xml payload

    Hi,
    I have a file that SAP PI has to pick, which doesnt have namespace prefix in payload, that gives me mapping error; target can not be created
    <?xml version="1.0" standalone="yes" ?>  
    <SLL_SPL_DATA_FILE xmlns="http://sap.com/xi/GTS">
      <SLL_SPL_DATA_FILE>
    but if put nsO as below the file works fine and mapping generates target structure.
    <?xml version="1.0" standalone="yes" ?>
    <ns0:SLL_SPL_DATA_FILE xmlns:ns0="http://sap.com/xi/GTS">
      </ns0:SLL_SPL_DATA_FILE>
    is there a config settings in PI, or i have to ask sender to send the file with namespace prefix?
    Thanks.
    Prema

    Thanks Praveen,
    i tried adding bean in sender file adapter, yes it adds prefix to all nodes, but in the help it just adds where it is required, any inputs?
    http://help.sap.com/SAPhelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm
    Example
    The anonymizer.acceptNamespaces parameter has the following value:
    urn:sap-com:document:sap:rfc:functions rfc urn:sap-com:document:sap:soap:functions:mc-style rfc
    ●      Payload before using the XMLAnonymizerBean:
    <Z_PAYMITEM_GET_LIST
      xmlns="urn:sap-com:document:sap:rfc:functions"
      xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <I_ACCOUNTIDENT xmlns="">
        <ACCOUNT_NUMBER>0080000094</ACCOUNT_NUMBER>
        <BANK_COUNTRY>DE</BANK_COUNTRY>
        <BANK_COUNTRY_ISO>DE</BANK_COUNTRY_ISO>
      </I_ACCOUNTIDENT>
    </Z_PAYMITEM_GET_LIST>
    ●      Payload after using the XMLAnonymizerBean:
    <?xml version='1.0' encoding='utf-8'?>
    <rfc:Z_PAYMITEM_GET_LIST
      xmlns:rfc='urn:sap-com:document:sap:rfc:functions'>
      <I_ACCOUNTIDENT>
        <ACCOUNT_NUMBER>0080000094</ACCOUNT_NUMBER>
        <BANK_COUNTRY>DE</BANK_COUNTRY>
        <BANK_COUNTRY_ISO>DE</BANK_COUNTRY_ISO>
      </I_ACCOUNTIDENT>
    </rfc:Z_PAYMITEM_GET_LIST>

Maybe you are looking for

  • How do I sync my Blackberry Tour calendar to my Google calendar?

    I just upgraded my phone from a Blackberry Tour to a Droid Razr M.  (The trackball stopped working so I my alarm clock still sounds and my reminder alerts still work, both in volume and on the screen, but I can't answer the phone or clear the screen.

  • How can I add enhancement points in a function module

    Hi,   I want to create the Z Enhancement implementation in ABAP. We are on ECC 6.0. I want to add a Z enchancment in funciton module MRM_FINAL_CHECK can you please let me know how Thanks for reading.

  • Oracle MRP - Soft Pegging - Pegging Order?

    Hi Guru's Version : Oracle 11i Have a quick question on pegging – order of precedence. Lets take one example – Assume there is SO with Dec 2012 Sch. Ship date and PO's are released in July(current month) 2012 to procure required material for Dec 2012

  • Moving row in Jtable

    Hi, what i want is to move row UP and DOWN. I have my own Abstract table model. Im looking for the easyest way to do this. public void moveRow(int i, int j){     Vector v = new Vector();     v = (Vector)data.get(j);     data.add(j, data.get(i));    

  • No accessable label --code inspecter error

    Hi, Here the part of my selection screen., parameter XYZ radiobutton group rad1 default 'X'. selection-screen comment 4(30) text-066. ...Every thing is working fine., But, while doing the code inspecter check I am getting Radio button XYZ related err