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

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

  • 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

  • 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

  • Is it possible to send error message from Adapter Module to CCMS?

    Hi
    Is it possible to send error message from Adapter Module  to CCMS...?I have written on adatper module from there i have to send error message to CCMS or SXMB_MONI. Is it possible if yes please send me the related documents
    Best Regards
    Ravi Shankar B

    Hi
    I have written following User Defined Exeption in my Module program
    class DuplicateFileException extends ModuleException{
              DuplicateFileException(String message){
                   super(message);
    I am throwing my Exception like this
    try{
         throw new DuplicateFileException("Duplicate File");
    }catch(DuplicateFileException e){
         throw e;
    But i am not getting this exception in SXMB_MONI. In adpater monitoring i am getting the following exceptions
    <b>
    2007-05-16 15:51:30 GMT+05:30: Retry interval started. Length: 5.000 s
    - 2007-05-16 15:51:30 GMT+05:30: Error: java.lang.NullPointerException
    - 2007-05-16 15:51:30 GMT+05:30: An unknown error occured.
    - 2007-05-16 15:51:30 GMT+05:30: Processing started
    - 2007-05-16 15:51:25 GMT+05:30: Error: java.lang.NullPointerException</b>
    can any one give me the idea how to send error from module program to SXMB_MONI
    Thanks & Regards
    Ravi Shankar B

  • 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

  • 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 Crets

    Hi 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

  • 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

  • Retrieve App Instance Name in Adapter

    Hi,
    I am trying to get App Instance Name in the adapter, was not able to achieve this using standard set of Adapter Variable.
    Could someone provide your input on this.I tried mapping using Request Info but was not able to get thru it.  Appreciate your input on this.
    What I am looking for is, I have a connected App Instance created attached to RO/IT res. I have attached a custom adapter, i am trying to get the App Instance name that I am requesting in the adapter.
    Use Case is as below:
    1. User Requests App Instance in Catalog Search Screen
    2. Upon successful submission of the request, I am invoking adapter where I need to get the app instance that user requests.
    Thanks
    Raj

    Using the Process Instance Key and Resource Object Name:
                Account instance = null;
                SearchCriteria search = new SearchCriteria(ProvisioningConstants.AccountSearchAttribute.OBJ_NAME.getId(), resourceName, SearchCriteria.Operator.EQUAL);
                List<Account> accountsProvisionedToUser = getProvSvc().getAccountsProvisionedToUser(userKey, search, null, true);
                ACCOUNTS:
                for (Account account : accountsProvisionedToUser) {
                    if (account.getProcessInstanceKey().equalsIgnoreCase(processInstanceKey)) {
                        instance = account;
                        LOGGER.log(Level.INFO, "Account Instance Found: OIU Key:" + account.getAccountID());
                        break ACCOUNTS;
    The name is instance.getAppInstance().getApplicationInstanceName()
    -Kevin

  • Parameters retrieval in adapter module

    I want to retrieve following details in an adapter module
    1) Sender Service : message.getFromService().getName()
    2) Sender Interface :
    3) Sender Namespace :
    4) Reciever Service : message.getToService().getName()
    5) Reciever Namespace :
    6) Reciever Interface :
    How can i retrieve 2,3,5 & 6?
    Regards,
    Amol

    My suggestion it´s to write the information you need on specifig tag in the payload, during the message mapping, with a custom function like this:
    String namespace;
    java.util.Map map;
    map = container.getTransformationParameters();
    namespace = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    return namespace;
    For more information:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    After this you can read the informations in the adapter module, and delete the added tag in order to have a clean payload without the additional parameters

  • Setting interface name dynamically from client for SOAP Adapter...

    Hi,
    does anyone have experience in setting the sender interface name in the HTTP-SOAP request dynamically? I have followed the instructions in "How To Use the XI 3.0 SOAP Adapter" on page 17 (see also SAP Note 856597) which say:
    "If you select Use Encoded Headers and Use Query String,
    [...]The sender SOAP adapter creates the XI message header according to the
    information provided in the query string. [...] In the sender SOAP adapter, you can use only some of the parameters, but the first
    parameter must always be the version. For example, you send from the Web service client to the following URL: http://<host>:<j2ee-port>/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>&version=3.0&Interface=http%3A
    %2F%2Fsap.com%2Ftest%5ETest
    This will overwrite the default interface and namespace of the sender channel."
    This is exactly what I need! However, what I actually get as a response following this description is a SOAP:Fault with a java.lang.StringIndexOutOfBoundsException: String index out of range: -1.
    Has anyone got this to work properly?
    Thanks in advance.

    Thank you for your input. I am using the following format for the call (with "x" standing for one letter each):
    http://xix.xxx.xx.xxx:5xx00/XISOAPAdapter/MessageServlet?channel=:xx_xxx_xxx_xxxx:xx_xxx_x_SOAP_S&version=3.0&Interface=http%3A%2F%2Fxxxxxxxx.xx%2Fxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxx%5Exxxxxxxxxxxxxxxxxxxxxx
    Anything wrong with that? With unchecked "Use Encoded Headers" and "Use Query String" it works fine (default interface) but as soon as I set these flags I get the SOAP-Fault response.
    We are on XI 3.0 SPS18.

  • How to send input parameters to a file adapter module

    Hi all,
    i have a requirement like , i need to pick a file from a file server based on a condition. that condition we write in adapter module (in file sender channel).
    the condition needs some input , so how can we send input parameters to adapter module.
    please suggest me some way,
    thanks in advance
    jhansi

    hi jhansi,
    u define the parameters to send to a module in 'module configuration' (in module tab) by giving the key to identify the module for which u r giving giving the parameters.
    for details refer this:
    Adapter module
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    This is all u have to do
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
    [reward if helpful]
    regards,
    latika.

  • 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

  • Receiver Time error in adapter Module in PI 7.31

    Hello Team,
    I am trying working on adapter module that accomplish Message id, Sender Interface name,Receiver Interface name sent time and receiver time.
    I got all values in my file except receiver time .I have failed to get exact receiver time.
    sent time shows as 2014 04 24 05:28:57
    receiver time as 1969 12 31 19:00:00
    when ever message triggers  its shows same receiver time(1969 12 31 19:00:00) ,I have placed my adapter module in JMS and File adapters,but i am getting same time in message receiver time .
    Please help me how to get exact message receiver time.
    Here is code.
    Message msg1=null;
    obj=md.getPrincipalData();
      msg1=(Message)obj;
    msg1=(Message)md.getPrincipalData();
    Date date = new Date();//For dynamic date file generation
      //time sent
      Long timesent=msg1.getTimeSent();
      Date sdate = new Date(timesent);
      Format Tformat = new SimpleDateFormat("yyyy MM dd HH:mm:ss");
      String SentTime=Tformat.format(sdate).toString();
      //time receive
      Long timerecev=msg1.getTimeReceived();
      Date rdate = new Date(timerecev);
      String ReceiveTime=Tformat.format(rdate).toString();
    Thanks
    Ganesh

    Hi ,
    For file you can get it as below
    String sentTime = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "SourceFileTimestamp"); 
    For JMS try the below and let me know.
    String sentTime = msg.getMessageProperty("http://sap.com/xi/XI/System/JMS", "DCJMSTimestamp"); 
    Regards
    Venkat

Maybe you are looking for

  • I can't open CS5 in windows 7 it tells me "Programm is locked or you are not legitimated". Bridge and Camera draw are working ok

    I can't open CS5 in Windows 7. It tells me "application is locked or you don't have legitimation". Bridge and Camera Raw are OK.

  • Sorry, a serious error has occured

    I worked on a project for several hours yesterday. Now it will not open. I tried opening another project from last week. WILL NOT OPEN. In fact, none of my Premiere CC projects will open. They are all corrupt. Well done Adobe. I'm missing Final Cut P

  • HP Update unable to install HP Printer Diagnostic Tools

    Today the HP Update application prompted me to install three updates related to my Deskjet 3520. Two of them seemingly installed OK, but the third one ("HP Printer Diagnostic Tools") downloads but immediately fails after installation has started. The

  • MacBook Pro & iChat

    I am noticing a problem when using MacBook Pro with iChat. If I am invited as a 2nd or 3rd participant in an iChat Video Conference then all I see is myself in a preview window. The other participants do not appear on my screen until minutes later, i

  • How is submit a form using ahref  in a JSP

    I have a form inside a iframe. It has 2 buttons. On clicking one button resultant page should open in the parent window(i.e target = parent). On clicking another button resultant page should open in same window (i.e target = self). In bith case i nee