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

Similar Messages

  • Prerequisites for Sender and Receiver FTP adapter

    Hi Experts,
    I am new to PI and configuring simple file to file scenario. I need to know the prerequsites for sender and receiver FTP adapter. Scenario is System A -> XI -> System B .
    What I want to know is:
    1> What ports need to be opened?
    2> Any service that I need to activate?
    3> Do I need to install FTP server in any of the machine?
    If I have missed something, please add.
    Br,
    Nilz

    Hi,
    1> What ports need to be opened?
    mentioned in below link as said its 21.
    2> Any service that I need to activate?
    No
    3> Do I need to install FTP server in any of the machine?
    THere are two ways by which u can pick ur file.
    1) NFS by which u can put the file on XI appplication directory and pick up ur file.
    2) FTP u have to put ur file on FYP server and XI will pick up the file from there. U can use freeware FTP and install it on ur Desktop search on goolge u will get ti FTP installtion.
    refer the below configuration requirement for FIle adapter.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    ALso refer the end to end file to file scenario.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
    chirag

  • WSDL url for sender and receiver SOAP adapter

    Dear Experts,
    I am working on SOAP --> SAP PI --> SAP ECC synchronous scenario. That means I have to create 2 Cc for SOAP i.e. Sender as well as Receiver adapter. I am responsible for creating the Request as well as Response structure in SAP PI. The sender application team is dependent on me to get the WSDL file.
    Please provide the suggestions on the below.
    Sender SOAP adapter.
    1. I will create the WSDL from Sender Aggreement. How to get the url and what is the navigation step? Should I provide the    same url to sender application team to call the service.
    Receiver SOAP adapter:
    2. In the receiver SOAP adapter , Should I have to get the web service parameter of the sender application. As mentioned , I am creating the response structure as well. That means I can not import the WSDL from the sender application. How to get target url in the receiver SOAP Cc.
    I refered to the forum SOAP SENDER - test in soapui but its not clear.
    Regards
    Alice Rebecca
    Edited by: Alice@xi on Dec 20, 2011 5:48 PM

    Dear Bhaskar,
    For synchronous scenario
                                                                Request
    MS Application (SOAP)<--> SAP-PI <--
    > SAP ECC.
                                                                                    Response
    I am creating the Request as well as Response structure in SAP-PI and its agrreement for both
    the ways.
    So for the MS appl team, I will give the WSDL url from the sender agreement to make the request to SAP-ECC.
    Now for receiving the response from SAP ECC, from where I should find the value to enter in the target url of SOAP
    receiver channel.
    1.Should I take the target url value from the MS Application team?
    2.How to know whether  the MS Application or SAP ECC is hosting the web service?
    Regards
    Alice

  • Receiver and Interface Determination, Sender and Receiver Agreement

    Hi Experts,
    Could you please tell me, what Receiver Determination, Interface Determination, Sender Agreement and Receiver Agreement we have to use for the below blog.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken]
    Regards
    Sara

    Hi Sara,
    WS->BP
    Receiver Determination: Sender IF, Sender NS, Sender BS determine the BP
    Interface Determination: Sender IF, Sender NS, Sender BS determine your start msg IF (abstr IF) and IF mapping
    Sender Agreement: SOAP sender channel for that Sender IF, Sender NS, Sender BS
    Receiver Agreement: not reqired
    BP->DB
    Receiver Determination: BP IF (abstr), BP IF NS, BP determine the 3rd party BS (DB)
    Interface Determination: BP IF (abstr), BP IF NS, BP determine Inbound-IF and IF mapping
    Sender Agreement: not reqired
    Receiver Agreement: JDBC receiver channel for that Inbound IF, NS and 3rd party BS
    BP->File
    Receiver Determination: BP IF (abstr), BP IF NS, BP determine the 3rd party BS (File)
    Interface Determination: BP IF (abstr), BP IF NS, BP determine Inbound-IF and IF mapping
    Sender Agreement: not required
    Receiver Agreement: File receiver channel for that Inbound IF, NS and 3rd party BS
    Regards,
    Udo

  • Sender and receiver File Adapter

    Hi ,
    Sender File
    12345566767
    fjwehifh
    09782345sdfgsjghjghhh
    83475 dsf888234  dsfsdf wefrwr
    Question1 : I need to Treat the Complete Message as a Field
    Eg :  MY Source Structure
    Recordset
       record
           Field1 0..1
    I need to read complete file as one field, How can i achive it
    Thanks in advace

    Hi all,
    As my understanding, requirement is that the source file is haphazard and the data type of source has only one field, we should read all the content from the file and convert to the DT which has only one field. and we should map the flat not xml content to target.
    correct if i am wrong,
    anyone has a suggestion for this?
    Regards,
    Kevin Song

  • Code to retrive the sender and receiver interface names using custome adapter module

    Hello Team,
    I want to develop an custom adapter module which could retrieve the names of the sender and receiver interfaces of the scenario and for that i am trying to use com.sap.aii.af.service.administration.api.monitoring.ProcessContextFactory.ParamSet but i don't know whether this API will support or not and also i don't know how to develop the code using this API so please suggest me some code for it so that i could retrieve the names.
    Thanks you all in advance.
    Regards,
    Avinash.   

    Hi,
    Just ASMA setting will do the needful. Are you planning to rename your target file name. If yes then only you will require UDF.
    Update: Since your directory name will be taken from source file name then you have to use mapping for this, else it will not be possible.
    I don't know if creating a new module for this will help you solve the issue, but in that case rather creating adapter module, mapping will be easier.
    Regards,
    Sarvesh
    Edited by: Sarvesh Singh on Dec 7, 2009 3:04 PM

  • BizTalkServer 2010 SFTP Adapter from CodePlex - Configuring send and receive locations with SSH public and private keys

    Hi there,
    I am looking for step by step instrcutions on how to configure SFTP Codeplex adapter for both receive and send ports.
    Out business partner with whom we push/poll the files from wants us to use SSH encryption/decryption etc.
    Just wondering if the following functionality is supported in Codeplex SFTP adatper without having to write any code.
    Appreciate if there is manaul to do this for SFTP. BTW I do have all the our public and private keys and business partners Public key for configuring.
    For Send port: 1. we would need to encrypt the file with our business partners public key
                          2. sign the file with our private key.
                          3. Send the file through to SSH client which eventually transfers to Remote server.
    Receive port:   1. Connect to SSH Server with SSH-2 key and receive the file
                          2. Verify the file's digital signature agaisnt the Business partners PGP public key
                          3. Decrypt the file using our PGP Public key
    Thanks in advance

    Yes it is supported.
    You can find its documentation in this link 
    You can find section X.509 Certificate Identity Keys
    You can set public and private key in property SSH Identity thumbprint  of send and receive port
    I prefer to test it using client tool like
    FileZilla or WinSCP then test it using sftp adapter
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

  • Send and receive UDP data package based on siemens TC65 module

    Everyone:
    I am newer for J2ME. I have a TC65 module, I want to get a sending and receiving UDP data package exeample codes running on TC65. who can help me? thanks!

    Hi deepspace,
    I programmed a demo codes and run it on TC65T, debug trace like :
    at^sjra=a:/NetDemo.jar
    OK
    NetDemo: Constructor
    NetDemo: startApp
    NetDemo: Profile could not be activated
    NetDemo: destroyApp(true)
    // below is demo codes, can you help me where error is?
    package example.netdemo;
    import javax.microedition.midlet.*;
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.io.Datagram;
    import javax.microedition.io.DatagramConnection;
    public class NetDemo extends MIDlet {
    public NetDemo()
    System.out.println("NetDemo: Constructor");
    public void startApp() throws MIDletStateChangeException
    System.out.println("NetDemo: startApp");
    try
    DatagramConnection conn = (DatagramConnection) Connector.open("datagram://58.185.157.91:12003");
    byte[] buffer = new byte[32];
    Datagram dgram = conn.newDatagram(buffer, buffer.length);
    for (int i = 0; i < 30; i++) {
    buffer[i] = (byte)('0' + (i % 10));
    conn.send(dgram);
    catch (Exception e)
    System.out.println("NetDemo: " + e.getMessage());
    destroyApp(true);
    public void pauseApp() {
    System.out.println("NetDemo: pauseApp()");
    public void destroyApp(boolean cond) {
    System.out.println("NetDemo: destroyApp(" + cond + ")");
    notifyDestroyed();
    }

  • XI3 SOAP sender and Receiver

    Hi
    I am stuck with a connecting to scenarios using SOAP channel. In short there is one business scenario that based on some conditions must start other scenarios (each one built around one business process). I am trying to send asynchronous SOAP message within the same XI and treat it as a External XI system to start another Business Scenario (using XI adapter does not work as the system discovers the message as being in a loop).
    Everything would be fine if there would be 1 target scenarios but I have 1:n. For asyncronous transport I have defined different Message Interfaces to be used for on each case. So XI should determine the right business process based on the message interface that uses the communication channel.
    So I have configured a SOAP sender and a receiver channel. As I understood from SOAP adapter FAQ I checked "Use Encoded Headers" and "Use Query String" for both - sender and receiver channel. And ofcourse receiver channel is pointed to http://:/XISOAPAdapter/MessageServlet?channel=:{system name}:{receiver channel name} but when I start the initiating scenario the asyncronous message is sent of but nobody is catching it.
    In RWB Message monitoring / adapter engine I found the the message receives an exeception:
    SOAP: response message contains an error XIServer/UNKNOWN/ModuleUnknownException -
    com.sap.aii.af.mp.module.ModuleException: either no channelID
    specified or no channel found for the specified party, service, and channel name,
    MessageServlet(Version $Id: //tc/aii/30_REL/src/_adapters
    /_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#15 $) at
    com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:427) at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl....
    runServlet(HttpHandlerImpl.java:401) at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl....
    handleRequest(HttpHandlerImpl.java:266) at
    com.sap.engine.services.httpserver.server.RequestAnalizer....
    startServlet(RequestAnalizer.java:387) at
    com.sap.engine.services.httpserver.server.RequestAnalizer....
    startServlet(RequestAnalizer.java:365) at
    com.sap.engine.services.httpserver.server.RequestAnalizer....
    invokeWebContainer(RequestAnalizer.java:944) at
    com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at
    com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at
    com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener....
    process(ApplicationSessionMessageListener.java:33) at
    com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at
    com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at
    java.security.AccessController.doPrivileged(Native Method) at
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at
    com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Any ideas... how to make XI to send SOAP messages so that the same XI system would be able to pick them up?
    Or what have I done wrong?
    Best wishes,
    Heiko

    hi,
    What is the format that u are using for the sender URL....The error message you are getting either because the names that you have mentioned in the sender URL are wrong or the URl format itslef is wrong.....if the format is the one that you have mentioned in the first post then it is not the desired format.
    Use the following format to create the URL to send the request:
    http://<servernameORserverIPaddress>:<portNumber>/XISOAPAdapter/MessageServlet?channel=:<senderservice>:<snederCCname>&version=3.0&Sender.Service=<senderservice>&Interface=<IRnamespace>%5E<senderMI>
    Replace
    with
    & amp;
    (no space inbetween the two words) in the above URL.
    How to configure SOAP communication channels (sender and receiver) so that two XI instances could communicate and (more important) use different message interfaces on the same channel?
    While creating a Receiver communication channel there is no need to specify the interface name and hence it can be used in different scenarios....however a sender communication needs the sender interface to be specified (as in SAP XI.....not in SAP PI).....so a sender channel can be used in different scenarios but with only the same interface.....
    Regards,
    Abhishek
    Edited by: abhishek salvi on Feb 17, 2009 2:50 PM

  • 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() ;

  • Proxy to Proxy Scenario with sender and receiver on same instance

    Hi,
    I have a scenario to integrate Erecruit to HR system usng standard content. Both the Erecruiting and HR are on same instance so my sender and receiver is the same system. Standard ABAP proxies are provided.
    Now I need some help in how to configure the channels and the agreements as both the sender and receiver are on same instance. Do i need to use parties?
    do i have to create a sender communication channel?
    Please let me know the stps required in configuration for this scenario.
    Thanks in advance.

    Hey
    It does not matter if your sender and receiver are same system or different systems,the configuration steps will be the same.
    In your case you would need
    1 Receiver determination
    1 interface determination
    1 receiver agreement
    1 receiver communication channel(of type XI adapter,this will connect to HR system).
    No party or sender communication channel or sender agreement are required.
    You need to have configured 1 business system for HR system in SLD though.
    Thanx
    Aamir
    Edited by: Aamir Suhail on Jul 23, 2008 7:36 PM

  • Need to use only one sender and receiver communication channel.

    Hello Experts.
    I have a scenario where in I have to use only one sender and receiver communication channel to push files from different source directories to different receiver directories.
    For Eg;
    Sender                              
    D://dir1/file1 --->                  E://dir1/File1
    F://dir2/file2 ---->                 G://dir2/file2
    H://dir3/file3----->                 I://dir3/file3.
    Can this be achieved by using pass through scenario?
    Please let me know if the requirement is not clear.     
    Thanks in advance.
    Advit Ramesh

    Hi Advit,
    I think it is possible. You have to use the Advanced Selection for Source file in the sender channel to define multiple files to be picked up. Also, the Dynamic configuration must also be enabled and used in the mapping so you can manipulate the target directory and target file name based on your source files.
    For Polling from multiple directories:
    http://wiki.scn.sap.com/wiki/display/XI/File+Sender+Adapter+-+Polling+Multiple+Directories
    Dynamic Configuration:
    Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integration - SCN Wiki

  • Problem with Stored Procedure exection in Sender and Receiver side of JDBC

    Hi All,
    I am facing problem while executing Stored Procedures using sender and receiver sides of JDBC adapter.
    Here is my SP in Oracle DB :
    PROCEDURE EMP                           
    ( ID IN VARCHAR2,NAME IN VARCHAR2,PROCESSED IN VARCHAR2  ) AS                                                          
    BEGIN                                                         
       INSERT INTO EMPLOYEE VALUES (ID, NAME, PROCESSED);COMMIT;END EMP;
    Now I want to execute this SP using sender JDBC channel and receiver JDBC channel.
    Can anyone please help me executing this SP?
    Regards,
    Soorya

    Hi Soorya,
    The receiver Data type should be like this:
    <StatementName>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
      </StatementName>
    Check the link http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Which DB  are you using?? The sender structure will be like
    <resultset>
    <row>
    <field1></field1>
    <field2></field2>
    <field3></ field3>
    </row>
    </resultset>
    Search SDN you will get lot of examples
    Regards
    Suraj

  • How send and receive XML file from PI 7.0 via SSL

    Hello experts,
    Can you point to some documentation , examples , links where I can get some information on how to send and receive XML files using PI 7.0 via SSL ?
    Thanks in advance.

    Hi,
      refer to the following links.
    Enabling SSL
    http://help.sap.com/saphelp_nwpi71/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    Adapter specific security
    http://help.sap.com/saphelp_nwpi71/helpdata/en/f5/799add57aeee4f889265094a04695c/frameset.htm
    regards,
         MIlan Thaker.

  • Same file name from sender to receiver file adapter with out using UDF

    Hi All,
    I am working on FILE TO FILE. My requirement is same file name from sender to receiver file adapter. Is it possible to do using only Adapter Specific message properties?  i mean with out using UDF.
    Thanks
    Karthik

    Hi,
    >>>Is it possible to do using only Adapter Specific message properties?
    yes
    just enable Adapter Specific message properties in sender and receiver channel for file name
    and you're done
    Regards,
    Michal Krawczyk

Maybe you are looking for