Get/set message interface name in adapter module

Hello,
From an adapter module, I'd like to get or even set the Message Interface name of the message that is handed over to the function "process" of the adapter module.
I've got two context's, sessioncontext and modulecontext. With both contexts, you can get values from that context. I'm not sure which context has the message interface name of the message currently being processed, and I'm also not sure what that value is called (moduleContext.getContextData("name");).
The reason for this is that sometimes you'd like to do something different depending on the type of message being processed.
If anyone knows how to do this, I'd be glad to hear.
Thanks in advance for any advice!
Greetings, Walter.

Hi Walter,
It is fairly easy to get the interface name. When you have extracted the XIMessage there is a parameter, which allows you get the Action, where you can get the interface name.
I have tried to change the interface name. You need to create a new message an copy the content from the old message over to this. This is a little tricky and I'm not able to get any code samples for you.
/daniel

Similar Messages

  • How to read Sender Interface name in adapter Module in PI 7.31

    Hello All,
    I am working on Adapter module .it accomplish to generate file with message id,message key ,sent time,received time,FromService(Business system names),toServiece(Business system name),sender interface name,receiver interface name .
    i got all details in my file by calling module data by method get principal data,but i am fail to get sender interface in that file .
    can you please guide me how to get sender interface name in adapter module.
    I am getting some information from this following blogs
    https://scn.sap.com/thread/1583665
    How to read Sender Interface name in Adapter module
    but i am facing same error what they faced.
    Please guide me to how to get sender interface name in adapter module.
    Thanks
    Ganesh

    Hi Ganesh
    Write a module in the sender adapter and use this piece of code
    Message mes = null;
    mes = (Message) inputModuleData.getPrincipalData();
    String SI = mes.getAction().getName();
    Also you can read the same by creating a UDF in message mapping
    Following is the code
    InputHeader inputHeader = container.getInputHeader();
    String SI = inputHeader.getInterface() ;

  • How to read Sender Interface name in Adapter module

    I have a need to read the Sender Interface name in an adapter module that will be attached to a Sender SOAP channel. Any ideas on how this can be done.
    I am familiar with the following code construct from the docs
    Hashtable mp = (Hashtable)inputModuleData.getSupplementalData("module.parameters");
    fileName = (String) mp.get("FileName");
    What is the key name (in the hashtable) for Sender Interface name ? The docs seem to be silent on this
    I dug around some and found references to "mp.context" and "message.interface". I guess I could just test this out but I dont have deploy access and I dont want to keep asking the BASIS group to deploy the module while I play around with different combinations...
    So would the following work
    Hashtable mp = (Hashtable)inputModuleData.getSupplementalData("mp.context");
    interfaceName = (String) mp.get("message.interface");
    Thank you
    Anil

    Hi Anil,
    I am not sure of how to get the Sender interface name. I even tried the code that you suggested above. It gave me a null pointer exception.
    I think instead of Sender Interface name you can decide upon the Sender System/Service.
    To get the Sender System Name:
    Object obj = null;
    Message msg = null;
    obj = ModuleData.getPrincipalData();
    msg = (Message) obj;
    String SenderSystem = msg.getFromService();
    Here based on the sender system you can do your partner specific processing in Proxy. Instead of Sender Interface Name.
    Hope this helps
    Regards,
    Aravind

  • Retrieving sender Interface name in adapter module

    Hi Gurus
    Is there ne way we can retrieve interface name in the adapter module which is on the sender side?
    I was thinking about using dynamic configuration in adapter module but I guess since container element cant be used inside adapter module.....it will be futile...
    Regards
    Akhil

    The Receiver Determination step will be executed only after the message comes out of the Sender Adapter / Module and so , the Receiver Interface will obviously be unavailable in the Sender Module.
    Regards
    Bhavesh

  • Interface name in Adapter module

    Hi Gems,
        In my adapter module , i have a bean class and an other class extends AbstractTransformation with transform method.
        public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException {
            strReceiverInterface = (String) in.getInputHeader().getReceiverInterface();
            strSenderInterface = (String) in.getInputHeader().getSenderInterface();
            inTime = in.getInputHeader().getTimeSent();
       From my Bean class i created an Object  and fetched the interface name.. ..  but at runtime interface name comes null.
      Can any one tried this ever??  Please let me know ASAP..
    Thanks
    Prabhakar

    Have a look at this:
    http://help.sap.com/javadocs/NW04/current/pi/constant-values.html#com.sap.aii.mapping.api.StreamTransformationConstants.INTERFACE
    and
    http://help.sap.com/javadocs/NW04/current/pi/constant-values.html#com.sap.aii.mapping.api.StreamTransformationConstants.INTERFACE
    Regards,
    Ravi

  • Setting Adapter-Specific Message Attributes in an Adapter Module

    Hi!
    I want to set Adapter-Specific Message Attributes in an Adapter Module. Is it possible to configure the Variable Transport Binding in this way?
    Best regards,
    Daniel

    I'd like to know it as well.
    I've checked out the XI AF API but didn't find much.
    One thing that I've observed is that since Module API can treat any Message Class (not only XI Messages), I guess it won't have any specific methods for XI messages (hence, no dynamic configuration). But you could try to get the message object and then treat it as an XI Message (you would be doing the steps that the Java Mapping API do before it calls a Java Mapping class) to get the Map objects (which include the parameters).
    Good luck on it, and let us know if you have any progress!
    Regards,
    Henrique.

  • Wrong Reciever message interface name in SXMB_MONI in PI7.1

    Hi All,
    Some of the interfaces that are getting executed in PI7.1 have wrong reciever message interface name in SXMB_MONI view.
    In SOAP Envelope
    1.Reciever message interface name is getting populated in <SAP:Sender> tag and 
    2. Sender message interface name is getting populated in <SAP:Receiver> tag.
    But the end to end message flow is getting executed succesfully.
    It is not particular to any one of the interfaces. It is occuring randomly.
    Did any one encounter this problem earlier?Please share your inputs to resolve the same.
    Thanks,
    Younus.

    Hi,
    The SAP note mentioned - contains details specific to SOAP Adapter.
    The problem which we have mentioned is occurring across adapters.
    Even in SICF transaction. All the details have been correctly maintained.
    Any further steps to resolve the issue will be helpful.
    Thanks,
    Younus

  • TS1424 I keep getting the message (song name) was not copied to IPod Ipod because it cannot be played on this ipod.  Could someone tell me what this means?  I have never had this problem.

    Hi, I have been trying to down load some music to my Ipod.  I keep getting the message: (Song name) was not copied to IPod IPod because it cannot be played on this I pod.
    Can anybody help?  I have never had this problem before.

    brackenfromrincon wrote:
    Is it something about "I Shot the Sheriff" that my iPod has a moral disagreement with? It had no issue importing and installing Body Count's "Kop Killa"...
    Not really likely, is it?
    First of all, look on the iPod to see if the song is actually on there. (The last Sync of my Classic resulted in "song not copied... because it cannot be found." The song had previously been on the iPod. I checked and despite the fact that iTunes could not find the file, the song was still on my iPod. I checked the folder and the song was exactly where t was supposed to be. So I simply set iTunes to find it again. What happened? I don't know, iTunes simply threw a wobbly!)
    Second, try another Sync. Does this change anything? If the song was on the iPod, does a second Sync remove the message?  If the song was not on the iPod after the first Sync, does the second one put it on there?
    What happens?

  • Keep getting error message "user name or password for aol is incorrect". I have reset both username and password and still can't get my mail.  This problem only seems to exist in the evening.

    Keep getting error message "user name or password for aol is incorrect
    ". Have reset both and problem still exists.  Problem appears to be in the evening hours only.

    reset the password to re confirm that that isn't the issue

  • Get/set message Queue ID in PI 7.1 Adapter module

    Hello,
    I have a special requirment to  get and set message Queue ID in PI 7.1 adapter module.
    I tried to use the method setConversationID  for the Message Class, but this doest seem to available any more.
    Any pointers to which class and method can be used.
    Thanks in advance
    Regards,
    Abhishek

    Hi, try [setSequenceId|http://help.sap.com/javadocs/pi/pi711sp03/com/sap/engine/interfaces/messaging/api/Message.html#setSequenceId(java.lang.String)]. Maybe you have to use setDeliverySemantics before in order to set EOIO.
    regards, Martin

  • Get Message details in custom adapter module

    Hello,
    Could you please let me know how can we retrieve following parameters in custom adapter module?
    Message size
    Message Mapping name
    Operation Mapping name
    Sender and Receiver Interface names
    Thanks!
    Regards,
    Shweta

    Hi Shweta
    Not all the information is available directly from the adapter module.
    Message size
    Retrieve the input stream of the payload, convert the stream to bytes and count the bytes length.
    Message msg = (Message) inputModuleData.getPrincipalData();
    XMLPayload payload = msg.getDocument();
    InputStream inStr = payload.getInputStream();
    // Convert inStream to bytes
    int size = bytes.length;
    Sender and Receiver interface names
    You can only get Sender interface in sender module, and receiver interface in receiver module. You can get the from the getAction() method.
    Message msg = (Message) inputModuleData.getPrincipalData();
    String interfaceName = msg.getAction().getName();
    Operation Mapping name
    This is not directly available from the Adapter Framework. One workaround is to access this via the Integration Directory API. With the Interface Determination Service API, you can read the Interface Determination object to get the associated mapping. To do this you have to make a SOAP call to the API.
    Message Mapping name
    I'm not sure how this can be retrieved as this is only available in ESR.
    If the module is on the receiver side, another option is to extract the information during mapping and store it into Dynamic Configuration, then in the receiver module, to extract it from Dynamic Configuration.
    Rgds
    Eng Swee

  • How to get file name in adapter module

    Hi all
    Is it possible to get the file name in a adapte module? If so how can I achieve this?

    Hi,
    Check below thread. it shows code for file name.
    [Re: Query regarding Adapter Module development]
    -Gouri

  • HT2155 Ive been trying for days now to set up gmail.  I always get the message "user name or password for imap.gmailcom is in correct" I know for a fact that my onfo is correct.

    I have been trying for a long time to set up my gmail account.  So far to no avail.  I get a message that says "User name or password for Imap.gmail.com is incorrect.  Any sugesstions?
    thanks

    Try unlocking your account here: https://accounts.google.com/DisplayUnlockCaptcha.

  • Incompatible with interface - Exception in Adapter Module

    Hi Experts,
    I have a custom adapter module deployed on PI 7.1. Once i post any message, i am getting below exception in CC monitoring.
    Message processing failed. Cause: java.lang.ClassCastException: class $Proxy3125_10002:sap.com/ClearModule_EAR @ com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 6daa7537 @ alive incompatible with interface com.sap.aii.af.lib.mp.module.ModuleLocal:library:com.sap.aii.af.lib @ com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 15d75e80 @ alive
    I used NWDS 7.1 to develop the module.
    the EJB is stateless.
    Can any one have any idea about the exception.
    Please help me out here.
    Thx in advance,
    Brian

    Hello,
    i forgot to modify the four interfaces' name when i create the EJB, ie my Bean class is "ss.cod.de.EjdBean", then the "Remote Interface" & "Home Interface" are setted respectively and defaultly as "ss.cod.de.EjdRemote" & u201Css.cod.de.EjdHomeu201D, the u201CLocal Interfaceu201D & "LocalHome Interface" are the same to the two interface above.
    everything was well while i rectified all the interfaces as "com.sap.aii.af.lib.mp.module.ModuleHome", "com.sap.aii.af.lib.mp.module.ModuleLocal", "com.sap.aii.af.lib.mp.module.ModuleLocalHome" and "com.sap.aii.af.lib.mp.module.ModuleRemote".
    hope its help 4 u.
    good luck.
    thx & br,
    Brian

  • Setting the charset from an adapter module

    Hi folks,
    I'm trying to set the charset encoding of a payload using an adapter module (I know there is a TextCodepageConverterBean, but I want to set the charset for a message that hasn't one yet). The problem is probably more clear using an example.
    I output a UTF-8 flat string from my message mapping to the adapter framework (mail adapter in my case). Afterwards I want to convert this UTF-8 string to an ISO-8859 encoding with the TextCodepageConverterBean. But if I set the charset using the setContentType() function of my TextPayload object the information gets cut away. I'm using the format
    setContentType("text/plain;charset=utf-8;name=Test.txt")
    . But everything after the first semicolon is dropped. Setting the charset using the MessageTransformBean works, but I want to avoid this by all means, as I need to set the mime type from the adapter module.
    This is running on NW2004 with SP 16 and the latest patch.
    Any idea, why the MessageTransformBean works and not the setContentType call?

    This bug will be fixed with SP20.
    Regards
    Stefan

Maybe you are looking for