JMS Adapter modules source code available?
Hi Experts,
we have to build some modules for the JMS adapter. Is the source code for the existing modules/JavaBeans available somewhere?
e.g. for the
AF_Modules/RequestOnewayBean
AF_Modules/NotifyResponseBean
Thanks in advance
Peter
Hi,
>>>Is the source code for the existing modules/JavaBeans available somewhere?
1. no - not in standard
2. yes - if you decompile the archive
Regards,
Michal Krawczyk
Similar Messages
-
How to search for a string in ALL Function Modules source code
Hello,
I want to search for the string "HELLO" in all FUNCTION MODULES source code(FM, no reports/programs).
Is this possible? How?
Cheers,
Andyhi,
Execute RPR_ABAP_SOURCE_SCAN to search for a string in the code ... Press where-used-list button on the program which takes to the function group or the function module where it is used ..
Regards,
Santosh -
JMS Adapter module content conversion
Hi,
I'm developing a module for the jms adapter(sender). My requirement is to parse the XI message(text) using some XML parsing api and do some formatting, logic etc and to make the jms adapter create a xml file with the processed information. Jms File Content Conversion does not suit our requirement and thats the reason we are trying this option.
My understanding is: Access the payload in the "process" method of the local ejb, apply XML parsing using JDOM etc, make a xml which should be the output of the jms adapter. This xml will be the xml with my user defined tag elements after content conversion. Can i form this xml and assign to the inputModuleData? Will the jms adapter use this string to create the xml and send to IS? Are there any other parameters to be set or processes to be done?
Also in which sequence should I put my adapter module in communication channel.
================================================
My code snippet:
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
throws ModuleException
Object obj = null; // Handler to get Principle data
Message msg = null; // Handler to get Message object
try
obj = inputModuleData.getPrincipalData();
msg = (Message)obj;
AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---efore reading payload");
try
XMLPayload xmlpayload = msg.getDocument();
String messageStr = xmlpayload.getText();
String inputStr = null;
String tags[] = new String[2];
String values[] = new String[2];
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before content conversion");
String tagvalue1 = messageStr.substring(messageStr.indexOf("BEGIN+"), messageStr.indexOf("'");
String tagvalue2 = messageStr.substring(messageStr.indexOf("'"), messageStr.lastindexOf("ENDING");
tags[0] = "tag1";
tags[1] = "tag2";
values[0] = tagvalue1 ;
values[1] = tagvalue2 ;
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---after content conversion");
Document xmldoc = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
DOMImplementation impl = builder.getDOMImplementation();
org.w3c.dom.Element e = null;
Node n = null;
xmldoc = impl.createDocument(null, "MT940", null);
org.w3c.dom.Element root = xmldoc.getDocumentElement();
for(int i = 0; i < tags.length; i++)
e = xmldoc.createElementNS(null, tags<i>);
n = xmldoc.createTextNode(values<i>);
e.appendChild(n);
root.appendChild(e);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before dom creation");
DOMSource domSource = new DOMSource(xmldoc);
ByteArrayOutputStream myBytes = new ByteArrayOutputStream();
Result dest = new StreamResult(myBytes);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer serializer = tf.newTransformer();
serializer.setOutputProperty("indent", "yes");
serializer.transform(domSource, dest);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before setting principal data");
byte[] docContent = myBytes.toByteArray();
if (docContent != null) {
xmlpayload.setContent(docContent);
inputModuleData.setPrincipalData(msg);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---after setting principal data");
catch(ArrayIndexOutOfBoundsException e)
e.printStackTrace();
catch(StringIndexOutOfBoundsException e)
e.printStackTrace();
catch(TransformerException e)
e.printStackTrace();
catch(Exception e)
e.printStackTrace();
catch(Exception e)
ModuleException me = new ModuleException(e);
throw me;
return inputModuleData;This is for sender channel. The doubt in adapter module is in the process block how will I get the main data being read by the jms adapter from the text file.As I am reading text file from websphere MQ, the content of the text file can be obtained thru xmlpayload.getText() or is there any other way.
obj = inputModuleData.getPrincipalData();
msg = (Message)obj;
XMLPayload xmlpayload = msg.getDocument();
String messageStr = xmlpayload.getText();
At present I am using my adapter module before call sap adapter, but before sap adapter there are two other modules(toBinary and to Xmb), so shld I place it before both or after both the modules.
Thanx in advance
Rachit -
JMS adapter and Websphere MQ availability issue
Hi,
My customer uses XI 3.0 and JMS adapter to communicate with WS MQ.
They have several MQ Server instances in separate physical machines, for availability purpose.
the intention is, in case of MQ Server failover, the secondary MQ Server try to connect with the XI-JMS adapter.
The question is:
Is this mechanism possible in an automatic way or is it needed some manual process or configuration of JMS adapter?. Also, is there any alternative more recommendable from the SAP XI adapter point of view?
Thanks in advance,Thanks Bhavesh and Satya,
Very helpful your answers.
I have another question related with XI and JMS adapter. The scenario is several MQ nodes in separate physical machines sending and receiving messages to/from the same XI-JMS adapter (centralized).
Is this supported by XI-JMS adapter confguration? If not, does anybody knows an alternative way to implement it?
Thanks again in advance, -
Hi ,
I am using an adapter module in JMS sender communication channel
it is throwing an exception :
NameNotFoundException: Object not found in lookup of TrimMessageIDBean in RWB
I have deployed the EAR file on XI server and in the module tab of communication channel :
localejbs/AF_Modules/TrimMessageIDBean
what parameters should I enter in Module Configuration ??
Regards
KLKHi KLK,
Check these on Adapter module dev:
http://help.sap.com/saphelp_nw04s/helpdata/en/96/f04142099eb76be10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/32/43d84072378031e10000000a1550b0/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3
Regards,
Subhasha -
RealSim Source Code Available to End Users
Since NI is not going to support the RealSim Product Line or support AC-104's, Will NI make available the source code to End Users that wish to continue using AC-104's and RealSim?
If not, when will there be an announcment of the third party that will be offering support on these features?NI does not intend to make available RealSim source code to end users and is directing customers who wish to continue to use RealSim software/hardware to 3rd parties.
NI plans to make it easy for customers to target NI hardware, including real-time PXI, with MATRIXx in the future. For information on PXI, please refer to the PXI section www.ni.com/pxi.
The list of NI Alliance Members (3rd parties) that can provide RealSim support and the parts list for RealSim hardware are now available our online KnowledgeBase. You can access the KnowledgeBase at www.ni.com/support.
Ash Razdan
National Instruments
[email protected] -
PI 7.1 Adapter Modules not longer available/moved?
Hi everybody,
in our file sender cc on XI 3.0 we got the following adapter modules to transform special (german) characters:
localejbs/AFModules/MessageTransformBean_
localejbs/AFModules/TextCodepageConversionBean_
When I try to use this modules in PI 7.1 I got an error in cc-monitoring:
Error: javax.naming.NamingException: Unable to obtain EJB home interface (Root exception is java.lang.NoSuchMethodException: com.sap.engine.services.jndi.implclient.ClientContext.create())
I searched SDN to adjust the modules but can't find any useful information.
Thanks regards
Mario
Edited by: Mario Müller on Feb 5, 2009 1:38 AMHi Mario,
Have a look into these wikis for your solution.
Example of Adapter Module Development
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/adaptermoduleexampleforPI+7.1
Adapter Module Development Libraries for PI 7.1
https://wiki.sdn.sap.com/wiki/display/XI/XIlibrariesfor+development
Regards
Aashish Sinha -
hi, i am just wondering if and when you might release the
source code so we can have a look? thanks, kevin<< deleted by myself... I spoke before checking.... those are .class files in coherence-mock.jar >>
-
Signle columnar transposition chiper source codes available?
I've tried searching google all i can find is codes in C++ i was wondering if there was a java version of any columnar transposition algorithm available.
-
View the module/source code...
Hi,
In the variable screen after execution of a query, then the selection of required variables is done which redirects to the output report when executed it. There will be a module which takes the user inputs and gives the output. Please help me how to view/edit the module which is called after submitting the field values in the report.
Regards,
Koundinya.Check my weblog <a href="/people/alvaro.tejadagalindo/blog/2006/05/17/tasting-the-mix-of-php-and-sap--volume-5 the mix of PHP and SAP - Volume 5</a> It has some custom FM's to use with the SBWP....Maybe they could help you a little bit -;)
Greetings,
Blag. -
How to write JMS provider independent source code
As the subject says i need to write a client/server which is independent of the JMS provider.
I dont know how to do that, can any 1 help me on this?
or
Is there any place where i can look for it.
Thank yourefer http://www-128.ibm.com/developerworks/java/library/j-jmsvendor/
-
Timer in Applet - Source code available
Hello,
I have this timer class which works. How do I include it in an Applet so that my applet
displays time?
Thanks
Mathew
import java.util.*;
public class TimeTest implements Runnable
Calendar time;
int hour, minute, second;
Thread thread = null;
public TimeTest()
time = Calendar.getInstance();
hour = time.get(Calendar.HOUR_OF_DAY);
minute = time.get(Calendar.MINUTE);
second = time.get(Calendar.SECOND);
if(thread == null)
thread = new Thread(this);
thread.start();
public void run()
try
Thread t = Thread.currentThread();
while(thread == t)
thread.sleep(1000);
second++;
if(second > 59)
minute++;
if(minute>59)
hour++;
formatTime();
while(thread != t)
thread.suspend();
catch(Exception e)
e.printStackTrace();
public void formatTime()
second = (second > 59? 0 : second);
minute = (minute > 59? 0 : minute);
hour = (hour > 23? 0 : hour);
System.out.println(hour+":"+minute+":"+second);
public static void main(String[] args)
new TimeTest();
public void stop()
thread.stop();
}How about this:
import java.util.*;
import java.text.*;
import java.awt.event.*;
public class Timer
javax.swing.Timer timer;
SimpleDateFormat timef = new SimpleDateFormat("HH:mm:ss");
public Timer()
timer = new javax.swing.Timer(1000, new ActionListener()
public void actionPerformed(ActionEvent e)
String s = timef.format(new Date(System.currentTimeMillis()));
System.out.println(s);
timer.start();
public static void main (String[] args)
new Timer();
while (true){}
} -
Determine Sender and Receiver in adapter module?
All,
Non-XML messages from different senders are received via the same JMS queue. In the text payload, the ID of the sender and receiver is contained.
Would it be technically possible to develop a JMS adapter module that sets the Sender Party, Sender Service, Receiver Party and Receiver Service based on the content of the message payload? Is it possible to influence sender and receiver in an adapter module?
Kind regards, Guy CretsHi Steven,
It seems like you can not convince XI to pick up a new message. The code below works when you use "inputModuleData.setPrincipalData(msg);" but not with "inputModuleData.setPrincipalData(msgnew);".
The error in the Runtime Workbench is: "Catching exception calling messaging system' found, cause: javax.transaction.InvalidTransactionException: Cannot invoke call from within a transactional context.".
I tried to set the RefToMessageId on the new message, but this does not work either.
Does anybody know why the InvalidTransactionException is thrown?
Here is the example code:
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException
try {
Message msg = (Message) inputModuleData.getPrincipalData();
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup(
com.sap.aii.af.ra.ms.api.ConnectionFactory.JNDI_NAME);
MessageFactory factory = cf.createMessageFactory("XI");
Message msgnew = factory.createMessage(
msg.getFromParty(),msg.getToParty(),
msg.getFromService(),msg.getToService(), msg.getAction());
msgnew.setConversationId(msg.getConversationId());
msgnew.setDocument(msg.getDocument());
inputModuleData.setPrincipalData(msgnew);
catch (Throwable t)
ModuleException me = new ModuleException("MyException");
throw me;
return inputModuleData;
Best regards,
Simon -
JMS Adapter Content conversion using Webspear MQ
Hi All,
I have a scenario where I have to pick a flat file from WebSpear JMS Q.In turn I should convert flat structure into xml structure to parse to the RFC structure(YOTCS_I090_INV_S) and map to the traget structure.
Below is the Source structure:
Messages
->Message1
-->YOTCI_I090_INV_SYNC
--->YOTCS_I090_INV_SYNC
>item
>ZDATE
>TIME
>TZONE
>WERKS
>MATNR
>LGORT
>CHARG
>SOBKZ
>INSMK
>LIFNR
>ZMENGE
>ZMEINS
>LOT_NUMBER
>CODE_DATE
Source file look's as below:
YOTCS_I090_INV_S 4928
YOTCS_I090_INV_S 3
YOTCS_I090_INV_S 3
YOTCS_I090_INV_S 1
I am doing the file contact conversion as below in JMS Adapter:
Module Key ParameterName ParameterValue
Plain2XML Transform.Class com.sap.aii.messaging.adapter.Conversion
Plain2XML Transform.ContentType text/xml;charset=utf-8
Plain2XML xml.conversionType StructPlain2XML
Plain2XML xml.documentName YOTCI_I090_INV_SYNC
Plain2XML xml.documentNamespace urn:sap-com:document:sap:rfc:functions
Plain2XML xml.item.fieldFixedLengths 8,8,6,4,18,4,10,1,1,10,13,3,10,8
Plain2XML xml.item.fieldNames ZDATE,TIME,TZONE,WERKS,MATNR,LGORT,CHARG,SOBKZ,INSMK,LIFNR,ZMENGE,ZMEINS,LOT_NUMBER,CODE_DATE
Plain2XML xml.processFieldNames fromConfiguration
Plain2XML xml.recordsetStructure item,*
Can any one help me in configuring the Content conversion? Hope you got my issue.
Thanks in Advance.
Best Regards,
JoseJoseph,
Go thru the Below Link
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
Cheers
Agasthuri Doss -
Adapter Module Error-Sending excel file as an attachment of the mail
Hi ,
My scenario is as follows
1)I am sending an excel file as an attachment of the mail.I need to read that excel attachment as a payload.
So mail adapter is used in sender side.
To configure this, have used standard PayloadSwapBean module with proper module key.
Next to convert excel to XML another custom adapter module is being used.
Both this adapter module , I configured into the CC of sender mail adapter.
The order in which adapter modules are being used in the sender CC are as follows
1)localejbs/AF_Modules/PayloadSwapBean
2)localejbs/MDPExcelToXMLConversion
3)sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
MDPExcelToXMLConversion-Custom adapter module written to convert excel to xml.
I am getting the following error
exception caught during processing mail message [4899]com.sap.aii.af.lib.mp.module.ModuleException
And also,
no messages in coming MONI of PI.
Pls suggest what to do.
Thanks
AyanShabarish,
Will the ordering in which the adapter modules(In this case there are two-PayloadSwapBean & MDPExcelToXML) are appearing into Module tab of sender adapter matter?
Firstly, what is happenning
1)If I take out the custom adapter module MDPExcelToXML and put only PayloadSwapBean then it is successfully converting mail attachment into the main Payload i.e PayloadSwapBean module is working.
2)Nextly, my local code( i.e java code without including standard Module specific method like ejbActivate(),ejbPassivate(),process() etc etc.)) for MDPExcelToXML is successfuly converting the excel file into the XML file.Then I am making the local code into adapter module specific code and deploying that.
A few question arises here,
Do I need to do any specific configurations here in PI for this particular things.Maybe both the adapter module is clashing with each other.
And also using tracing and logging into my custom adapter module code.Getting the following error,
java.io.IOException: Unable to read entire header; 116 bytes read; expected 512 bytes#
Thanks
Ayan
Maybe you are looking for
-
How to display swf in full screen mode and how to redirect to a url
Hi, I have 2 questions : Question 1 - I have a flash swf file and I want to display it in the browser in full mode meaning it should fit the browser, I have tried adding fscommand("fullscreen", "true"); in the first frame of a lyaer but it does not w
-
Is it possible to create a simple website like this in Muse?
Take a look at this website: Shaun Weaver - A fullstack developer and digital creative from London, UK aiming to bridge the gap between great code & - I have designed my website and it works in a very similar way - one pager with full screen graphics
-
hi all, I want to install OFBIZ at windows XP. I have deployed the database successfully.but now i am facing a problem i.e java.lang.nosuchmehoderror exception error: java.nio.bytebuffer.array()i shall be thankfull if someone solves my problem wasim
-
IMac "Retina" VRAM is it enough for Photoshop CC 2014?
I want to get the new Retna iMac, but don't know how much video ram (VRAM) I need. I only do photo processing, not video. Does anyone have any experience yet? Thanks, Steve
-
OS X Yosemite - the Internet gets a bit sleepy
Congratulations on the most irritating status message ever! I'm travelling in the US and on multiple networks Skype Version 7.7 (335) shows this amazingly useless information message. As a software engineer who's written routing software I have no cl