Extract header information in adapter modules

Hi,
I need to write an adapter module  which will be used to extract information from the soap header of the message.
Please provide some suggestion for this.
Regards,
Meenakshi

Hi Meenakshi,
Check this blog:
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417300%29ID1708152450DB01924696702449628261End?blog=/pub/wlg/4623
Here the dynamic configuration is accessed using modules.. Also hope you are trying to get the soap header in receiver channel
Regards
Suraj
PS: If you search SDN you will get lot of codes (both is wiki and blogs)

Similar Messages

  • How to extract header in Mail adapter

    Hi All,
              I have a scenario where the data is read from a file and sent to another file server iwthout any modifications to the data, so no IR used here.
    but along with this I need to extract header data from the same incoming file and send it to an email using mail adapter. Now is there a way not to involve IR in this too.
    Cause this is a //le communication, for one no IR and for the other we are looking at ways not use IR too.
    Regards,
    XIer

    Hi,
    If you want only the header data of the file (expecting you are having other data also) then it is not possible to do so without mapping. What I would suggest is to do the mapping for header and use this in ID.
    So configure two receivers one for mail and another with file. In the receiver determination for the mail you use mapping and for file you dont use mapping at all. This would resolve your issue.
    Regards,
    ---Satish

  • Access Message header details in Adapter module

    Hi
    I tried to find out solution for accessing sender service and namespace in adapter module...However I couldn't make out correct procedure to access the same. Incase any one aware of accessing sender service details in Module, please let me know...
    Thanks a lot...

    Hi Yadagiri,
    It is possible to acess the Service Name and user Interfaces Please check the API provided for the Module Development.
    https://help.sap.com/javadocs/pi/SP3/xpi/index.html
    Thanks
    Sunil Singh

  • Adapter Module is not Invoking

    Hi
    I have done one adapter module and i have given that in Sender Communication Channel. I have written audit log as well. But its not invoking.I am not getting any thing on Audit Log. My Scenario is working normally. Actually i have to get Host name at destination side but i am not getting
    I ave created on jar file. I have extrancted that jar file and i found the following files
    <javafile>.class
    <javafile>.java
    ejb-j2ee-engine.xml
    ejb-jar.xml
    but i have extract other in built adapter module jar file their i found manifest.mf apart from above mention files.
    I have create the jar files using nwds version 7.0
    My Adapter module is not working. I have done everything fine.Can anyone tell me the solution
    Best Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B

    Hi,
    Ur module name shud b like this
    localejbs/<yourEJBClassName>
    If you specify an incorrect or non-existing module name, it is simply ignored.
    Check the following:
    1. Your stateless session bean should implement SessionBean and Module.
    2. The bean should have the following method
        public ModuleData process()
    Try to create a file in XI Server directory from your adapter module code and this way check whether your module is called or not.
    <i>[Reward if helpful]</i>
    Regards,
    Prateek

  • Read header information from an e-mail that is an attachment to another e-mail

    I've written a macro using VBA code within Outlook 2010 that will extract header information from an e-mail and then save it to a csv file.  The code works well, but unfortunately, the header information I need is within e-mails that are sent to
    me as attachments.  Which means that I am opening the attachment and then running the macro to get the header information.  Is there a way for VBA to open the attached e-mail and read its header?
    Ideally, I would like to write code that will cycle through all of the e-mails in a folder, open the e-mails that are attachments and save off the header information.
    Any help or suggestions would be greatly appreciated.
    Thank you for your time.

    You should try the Exchange Development forum
    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=exchangesvrdevelopment
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com

  • Accessing SOAP header information in a custom adaptor module

    Hi Guys,
    Could anyone point me in the direction of information on how to access the SOAP:Header element when writing a custom adaptor module for a http/ SOAP communication channel?
    I'm trying to add some WS-Security stuff which isn't available in XI 3.0.
    Many thanks,
    John

    The solution is as follows:
    Mark as Do Not Use SOAPEnvelope in the communication channel.
    It may be possible to use the SAP implementation of MessageFactory, SOAPEnvelope etc., I forced XI the Apache Axis implementation, a thread on which can be found here Link: [Accessing SOAP header information in a custom adaptor module;
    The SOAP Envelope is created by
    javax.xml.soap.MessageFactory mf= org.apache.axis.soap.MessageFactoryImpl.newInstance();
    This doesn't work it creates a com.sap.engine.services.webservices.jaxm.soap.SOAPMessageImpl
    org.apache.axis.message.SOAPEnvelope env = new org.apache.axis.message.SOAPEnvelope();
    org.apache.axis.Message iSoapMessage = new org.apache.axis.Message(env);
    SOAPMessage sm = iSoapMessage;
    SOAPBody iBody = se.getBody();
    if(iBody!=null)
         iBody.addDocument(iDoc);
         addDocument failed for some reason when called in XI returning
         Exception caught by adapter framework: Exception in method process.
         The code below is copied straight from the addDocument method, but it works.
         org.w3c.dom.Element iDocRoot= iDoc.getDocumentElement();
         org.apache.axis.message.SOAPBodyElement bodyElement = new org.apache.axis.message.SOAPBodyElement(iDocRoot);
         iBody.addChildElement(bodyElement);
    In order to get a document representation of the Envelope you can use
    Document iEnvelopeDoc = ((org.apache.axis.message.SOAPEnvelope)env).getAsDocument();
    You are now in a position to add or adjust the SOAP Envelope as your require. It enabled me to add WS-Security information to a message.
    It is normally possible to use javax.xml.transform.Transformer on the various classes SOAPEnvelope, SOAPBody etc. as they implement Node. However doing this in XI caused a crash.
    The final document can be then be set in the xmlPayload before being sent out the door.
    Hope this helps someone,
    John

  • Adapter module to check header and footer

    Hello All,
    Is there any standard/custom adapter module to check the presence of header and footer in the Incoming flat file?
    Thanks,
    Regards,
    Moorthy

    Hi Moorthy,
    Check this list of standard modules available
    http://help.sap.com/saphelp_nwpi711/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/frameset.htm
    I didnt find any standard module that you could use for you requirement.
    If you are looking to handle the header and footer of a flat file you can try using the key field parameter in the File content conversion.
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    Regards,
    Aravind

  • Extension of Standard SOAP Header Information in SOAP Adapter

    We are currently trying to call an eBay Web Service via SAP XI and we are using the SOAP Adapter in XI to achieve this.
    The following Authentication Information is required in the SOAP Header for accessing the eBay Web Service:
    - Token
    - ApplicationID
    - DevelopmentID
    - CertificationID.
    Unfortunately, the standard SOAP Adapter supports only certain SOAP Header Information (like User Authentication or Certificate Authentication).
    Is it possible to extend the SOAP Header Information in the SOAP Adapter (or somewhere else in XI) beyond the standard configurations?
    Thanks for your support.
    Alexander Bange

    Hi Jin,
    thanks for your input and sorry for my late reply but I wanted to wait for feedback from SAP who actually confirmed your recommendation.
    I had a second thought about this and it came to my mind that I actually don't want to extend the SOAP Header elements but simply fill the mentioned authentication elements with values. This cannot be done in the message mapping as only the SOAP body elements (i.e. the payload) can be mapped.
    Do you know if and how I can fill the SOAP header elements with values in XI?
    I already tried to include this information as fixed values in the WSDL description and load it into XI. Then I looked into the WSDL description and an error message occured stating that XI could not parse the XML Document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException:  = expected in attlist(:main:, row:18074, col:54)).
    If there is no solution for the latter, I will have to try nosoap solution. Still this would be a little awkward.
    Thanks again for your valuable support.
    Best Regards.
    Alex

  • Reading Dynamic Configuration information in side adapter module.

    Hi All,
    We are writing an adapter module for one of our receiver adapter.
    On the Sender side we have a file adapter whose adapter specific properties are checked. So the message has the file name in the Dynamic configuration.
    Now we need to read this file name from dynamic configuration inside our adapter module for receiver adapter.
    If any one can tell us how to do this we would be really thankful.
    Thanks
    Abinash

    Bhavesh,
    When we use the follwoing code inside mapping
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    the conf object gets populated
    but inside our adapter module we ares using
    Map param;
    DynamicConfiguration conf = (DynamicConfiguration) 
                   param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey key = DynamicConfigurationKey.create
                   ("http://sap.com/xi/XI/System/File","FileName");
                   String ourSourceFileName = conf.get(key);
    Now the question is from where the <b>object of par</b>am will initialize.
    I think we need to get container object from some where, but don't know how to get it as inside mapping the container object is passed as method argument.
    Thanks
    Abinash

  • Dynamic configuration in adapter module

    Hi friends
    I need some information on how to carry out dynamic configuration in adapter module.
    To be precise I want to assign file name dynamically to message header in adapter module, not in runtime mapping.
    Regards
    Akhil

    HI Akhil,
    file adapter dynamic file name
    Problem in dynamic file name in File reciever adapater
    Dynamic  File Name for Receiver File Adapter
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Thax
    Chirag

  • PI 7.1 Adapter Module Development - Identify SOAP Fault Message

    Hi Experts,</br>
    here's a PI 7.1 Adapter Module Development issue I hope you can help me to resolve. It's about identifying SOAP fault messages.</br>
    </br>
    Scenario at a glance:</br>
    Adapter Modules placed in the modules chain at request and response time in a synchronous Scenario:</br>
    - Request: SOAP Axis to RFC </br>
    - Response and Fault Response: RFC to SOAP Axis</br>
    </br>
    The issue is how to identify SOAP fault message in SOAP Axis Adapter Module in the response message:</br>
    The client gets SOAP fault messages like the follwong one:</br>
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <ns1:exception xmlns:ns1="http://typen.geschaeftsstelle.pab.barmer.de">
                   <ns1:errortext>bla bla bla ...</ns1:errortext>
                </ns1:exception>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </br>
    </br>
    But when trying to access the tags faultcode and/or faultstring in the adapter module via xPath expressions I do not get them. Obviously the SOAP Fault tags are built AFTER the adapter module has been passed. So my question is:</br>
    How can I clearly/uniquely detect a SOAP fault response message (and distinguish it from a "normal" response message) in my SOAP Axis Adapter Module?</br>
    </br>
    I tried it the following way:</br>
    </br>
    </br>
    // Check Message Payload for SOAP Fault Message via xPath expressions</br>
    ...</br>
    // SOAP Fault Code</br>
    zv_xPression = zc_constXPattern.replaceFirst("&", "faultcode");</br>
    zv_soapFaultCode = XPathAPI.eval(zv_doc, (String) zv_xPression).toString();</br>
    // SOAP Fault String</br>
    zv_xPression = zc_constXPattern.replaceFirst("&", "faultstring");</br>
    zv_soapFaultString = XPathAPI.eval(zv_doc, (String) zv_xPression).toString();</br>
    // check for SOAP Fault Message</br>
    if (zv_soapFaultCode.equals("") && zv_soapFaultString.equals("")) {</br>
         // Create Audit Log entry - NOT a SOAP Fault Message</br>
         zv_msgText = zc_constModuleName + " 0190: xPath - OK! This message is NOT a SOAP Fault Message";</br>
         zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.SUCCESS, zv_msgText);</br>
         zv_faultCheck = false;</br>
    }</br>
    else {</br>
         ...</br>
         // Create Audit Log entry - SOAP Fault Message</br>
         zv_msgText = zc_constModuleName </br>
              + " 0200: xPath - this message is a SOAP Fault Message. " </br>
              + " - Faultcode is: " + zv_soapFaultCode </br>
              + " - Faultstring is: " + zv_soapFaultString; </br>
         zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.ERROR, zv_msgText);</br>
         ...</br>
    }</br>
    ...</br>
    </br></br>
    But zv_soapFaultCode and zv_soapFaultString are always empty (with other payload tags this coding works fine).</br>
    </br>
    Any ideas? </br></br>
    Thanx very much in advance!</br></br>
    Regards,</br>
    Volker

    Hi Alex!
    Like already mentioned I solved my problem by identifying the SOAP exception with the messageClass attribute of the PI message header. Acess code:
    try {
    String zv_msgClass = zv_piMsg.getMessageClass().toString();
    } catch (Exception e) {
    zv_msgText = zc_constModuleName
    + " E0110: Message processing terminated."
    + " Reason: Error while getting MessageClass "
    + zv_dataSource
    + e;
    // create trace and audit log entry (severity ERROR) for exception
    zv_location.errorT(ZV_SIGNATURE, zv_msgText);
    zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.ERROR, zv_msgText);
    ModuleException me = new ModuleException(e);
    zv_location.throwing(ZV_SIGNATURE, me);
    e.printStackTrace();
    throw me;
    }     // end of try-catch-block
    But I do not think this will solve your problem. I am almost sure, that something in your Axis configuration is wrong/missing. If a handler cannot be instatiated then it really may be missing. Have a look at defaultTrace.trc. Maybe you will find more suitable information about the root cause of your problem. Also have a look at NWA under software components and/or application modules if you can find/see your modules.
    But there is a general issue when trying to catch PI fault messages. If e.g. the requestor tries to login with wrong userid/pasword, then you will have no chance to catch this kind of error - at least as far as I know. Because in this very early stage of PI message processing no module is called.
    One last question: Did you develop your own Adapter or just an adapter module? In the first case: Is your adapter started and healthy? Have a look at RWB -> communication channel monitoring.
    Regards,
    Volker

  • Change Response in Adapter Module

    Hi all,
        In asynchronous senario, there would be a http status 200 response from the receiver if the message has been arrived the receiver system. I'm wondering, is it possible to change the response manually by develop a adapter module?
    Thanks and B'Rgds,
    YiNing

    I'm using a soap adapter.
    Q: What should my web service return to the adapter for asynchronous calls?
               A: Currently, the receiver adapter expects an HTTP 200 with a SOAP envelope with an empty content for successful delivery. Any other response will result in a XI system error and triggers retries of the message. When you want to check duplicates, you should configure your receiver channel to pass the XI message header information to the server.
               Prior to SP11, a SOAP fault resulted in the application or system error, depending on whether the SOAP fault contained a detail child element or not. This behavior contradicted the communication model. Therefore, it has been changed so that the adapter generates the system error for any SOAP fault in asynchronous calls.
               When you want to check duplicates in your web service, you should configure your receiver channel to pass the XI message header information to the server. When your web service indeed find a duplicate, assuming that the previous message was simply lost, your web service should return an HTTP 200 with an empty SOAP envelope.

  • In Adapter,  MODULE tab, there is CallSAPAdapter :  What is that?

    In most of my Communication Channel (adpater configuration) in IB Directory,
    under the MODULE tab, there is CallSAPAdapter (Local Enterprise Bean),
    what does it actually mean,
    I tried removinf it from the sender channel, and the scenario was working as well,
    but i dont what role it plays in the <b>sender and receiver channel</b>

    Hi,
    We use the module porcessor to specify generic module that give Adapter extra functionality.
    Some standard module are default provided by sap each of then for diff purpose.
    PayloadSwapBean : You can swap the main payload of the XI message with another payload of the message that is an attachment
    StrictXml2PlainBean:You can convert an XML document in the main payload of the XI message to text format
    XMLAnonymizerBean: You can anonymize XML elements and attributes.
    PayloadZipBean:You can compress one or more payloads or extract payloads from a compressed file.
    TextCodepageConversionBean:You can swap the code page of the main payload of the XI message and convert the content using the new code page.
    DynamicConfigurationBean:You can edit the message header for adapter-specific message attributes.
    MessageTransformBean, Migrating Dispatcher Classes
    Apart from these you can develop ypur own adapter modules depending on the requirement.
    This blog will give you a clear picture.
    /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
    <b>Cheers,
    *RAJ*</b>

  • 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

  • Handling header information present in flat file

    Hi All,
    We have an option to ignore flat file header information present in a flat file while cerating the flat file module.
    We need to extract the file creation date from the header information.Is there any way to make use of that header information?
    Thanks
    Avanish

    We have an option to ignore flat file header information present in a flat file while cerating the flat file module.
    Do not ignore the header
    We need to extract the file creation date from the header information.Is there any way to make use of that header information?
    Take the creation date value from the header, remaining wouldnt be matching so as it will be rejected the remaing values from the header

Maybe you are looking for

  • How do I Export a -section- of a sequence?

    I have an hour-long sequence that was recorded one take without breaks. I've chopped it using the blade tool into smaller "chapters" Is there any way to export just one section of the sequence? Or, is there any way to export these chopped "chapters"

  • Macbook dvd not working since update, macbook dvd not working since update

    Hi, can anyone help, since preforming an update at the weekend on a macbook (2 year old) the DVD / CD drive has stopped working, everytime you insert a disk it keeps ejecting it. Has anyone else had the same problem? if so is there a fix? Thanks Lee

  • Static array has to be static but cant be. AGH

    I'm completely stuck on this. I have two classes ChatClient and ChatClientListenThread. On ChatClient I have an enter button(enters text into chat) and an exit button(closes connection to server). I have to have the array as static, to pull it into a

  • Security update and ENTOURAGE

    Yesterday I did the last update for the Apple security in OS 10.3.9. Today my eMail program Entourage would not start and just tell me it can't find its database.

  • Again: No scroll bar in Adobe readers

    The missing scroll bar in Adobe reader is a common topic. However, none of the descriptions I have found seem to resolve the problem. or they start so deep inside the settings so that a less experienced user can follow. Example, when I open a pdf ins