How can I get SessionID from SOAP Header in MessageMapping

Hello experts,
I've got a Abap Proxy --> PI --> WebService scenario. I do the call to the web service and it returns me the data and a SessionID in the SOAP header. I've got a message mapping for the response, and in this message mapping I need to get this sessionID because I have to use it later.
I have tried with a UDF with this code:
String headerField = "";
try
  String key="SessionID";
  java.util.Map map;
  // get runtime constant map
  map = container.getTransformationParameters();
  // get value of header field by using variable key
  headerField = (String) map.get(key);
catch(Exception e){}
if(headerField==null)
    headerField = "";
return headerField;
But it returns me nothing.
In sxmb_moni I can see the sessionID (see attached file), so It should be possible to access it.
How can I do to get this data????
Many thanks.

Thanks Indrajit.
I have found a solution. I have to use the option: Do Not Use SOAP Envelope in my communication channel.
But as I am using web services I have to create the SOAP Envelope in my mapping (in request and in response).
I have created 2 xslt mapping files: one for request and one for response. The xslt mapping for the request it is placed in second position in my operation mapping. This xslt maping just move the fields and add the soap envelope (header and body, and inside the body places the data from 1st mapping).
The response xslt mapping it is placed directly in my operation mapping (in response area). It transforms the SOAP response into my Message Type.
Here you can find my xslt for request (sessionID, in0, in1 and in2 are fields from my source message type):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope">
      <SOAP:Header>
     <ses:sessionIDHeader xmlns:ses="http://xml.apache.org/axis/session">
             <sessionID><xsl:value-of select="*/sessionID"/></sessionID>
         </ses:sessionIDHeader>
      </SOAP:Header>
      <SOAP:Body>
      <ser:invokeService xmlns:ser="http://www.w3.org/2003/05/soap-envelope">
         <in0><xsl:value-of select="*/in0"/></in0>
         <in1><xsl:value-of select="*/in1"/></in1>
         <in2><xsl:value-of select="*/in2"/></in2>
      </ser:invokeService>
      </SOAP:Body>
    </SOAP:Envelope>
  </xsl:template>
</xsl:stylesheet>
Here is xslt for response (invokeServiceReturn,sessionIDare fields from my target message type):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <ns1:MT_invokeServiceResponse xmlns:ns1="http://saras.com/pi/creditoycaucion">
        <invokeServiceReturn><xsl:value-of select="/*/*/*/invokeServiceReturn"/></invokeServiceReturn>
        <sessionID><xsl:value-of select="*/*/*/sessionID"/></sessionID>
    </ns1:MT_invokeServiceResponse>
  </xsl:template>
</xsl:stylesheet>
Kind Regards.

Similar Messages

  • How can I get values from listbox?

    Hi all,
    I need to get price values from Price List (Inventory -> Item Master Data screen). It's important to get values from field 'Price' BEFORE item will be added/updated.
    How can I get values from Pricelist listbox?
    Thanks for any suggestions or short sample code.
    Best regards,
    Andy

    Hi Andy
    Here is som sample code that will get the description of the price list and also the price that is displaying at the time. The item master must be open for this snippet of code
      Public Sub GetItemPriceFromOpenWindow()
            'this is assuming item master is open
            Dim oEdit As SAPbouiCOM.EditText
            oEdit = SBO_Application.Forms.GetForm("150", 1).Items.Item("34").Specific
            SBO_Application.MessageBox(oEdit.Value)
            Dim oCmb As SAPbouiCOM.ComboBox
            oCmb = SBO_Application.Forms.GetForm("150", 1).Items.Item("24").Specific
            SBO_Application.MessageBox(oCmb.Selected.Description)
        End Sub
    Hope it helps

  • HT203167 lost my hard drive how can i get songs from ipod back to new computer

    I lost my hard drive and want to get my music back on my new computer. How can I get songs from my ipod to my computer? I am afraid to sync it and losing what is on my ipod. Any help would be appreciated.

    It has always been very basic to always maintain a backup copy of your computer for this very occasion.
    Use your backup copy to put everything back.
    If for some reason you have failed to maintain a backup, not good, then you can transfer itunes purchases from your ipod:  File>Transfer Purchases

  • How can I get Data from the Sound cart in Labview? Does a VI exist?

    How can I get Data from the Sound cart in Labview? Does a VI exist?

    Yes, there are VIs for acquiring data from Sound cards. And examples too. If you don't have LabVIEW yet, do a search on NI's site for example VIs.
    Khalid

  • How can i get contacts from my old Nokia phone to iphone 4S

    how can i get contacts from my old Nokia phone to iphone 4S?

    Appreciate the reply thank you
    Issue being is I don't have the lead for the samsung any longer but have the memory card?
    An yes I know I need to get them onto my MAC but how is what i'm struggling with?
    Any help would be appreciated.
    Many thanks

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can I get music from old mac to new mac?

    How can I get music from old mac to new mac please?
    Can't seem to make Migration Assistant work. Doesn't ask about or transfer files.

    I just migrated into a new MBP from an old one.
    It did not bring the music over.  Apple's instructions are to use the Home Sharing feature of iTunes.
    Open iTunes on your old Mac.  Select Home Sharing under the Advanced menu.  Sign in.  Do the same on your new computer.  Then when the library appears under Home Sharing on the left-hand panel on your new computer's iTunes, you can select all and Add To Library.
    That's what Apple says, anyway.

  • How can I get sound from tv or stereo when watching netflix on MacBook Air?

    I have my macbook air hooked up to my tv and want to watch netflix but the only sound is from my macbook.  How can I get sound from other sources ie tv or stereo?

    Check with Netflix for their system requirements.

  • How can i get data from a maintance view?

    Hi all.
        Can you give me some suggestion about 'How can i get data from a maintance view?'?
         Thanks
         Best regard

    hi
    good
    go through this link
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ecdf446011d189700000e8322d00/content.htm
    thanks
    mrutyun^

  • How can you get pics from your Camera roll to you photo stream

    How can you get pics from your Camera roll to you photo stream

    iCloud: Photo Stream FAQ
    iCloud: Photo Stream
    iCloud: Set up Photo Stream

  • How can i get input from user in Workflows

    Hello professionals,
    I'm new to SAP B1 Workflow, i have created some workflows and they all worked fine.
    But, I am wondering, How can i get input from user?. For example, i want to display list of options to choose between them and route the workflow based on the selected option. I don't want to use the exclusive gateway and check for some conditions, i want to get input from user.
    How can i do that?
    Thanks in advance,
    Kareem Naguib

    Hi,
    Please refer SAP help file:
    http://help.sap.com/saphelp_sbo900/helpdata/en/b8/1f9a1197214254b79bcf8f93f9fff9/content.htm?frameset=/en/44/c4c1cd7ca22…
    Thanks & Regards,
    Nagarajan

  • I purchased a song (Awaara Hoon (instrumental)) from itune store but it gives me a non-protected m4a file. I need a protected m4p file. How can i get it from itune store??? thanks in advance

    I purchased a song (Awaara Hoon (instrumental)) from itune store but it gives me a non-protected m4a file 
    I need a protected m4p file.
    How can i get it from itune store???
    thanks in advance

    All the music from iTunes Store aren't protected. You can search the web for a site that sells protected music.

  • HT201302 Hi People! please help...I want to know how can i get photos from ipad to the computer, that were synchronized previously to ipad but from another pc that i dont have access anymore and these pics are now only found in this ipad and no other plac

    Hi People!
    Please help...I want to know how can i get photos from ipad to the computer, that were synchronized previously to ipad but from another pc that i dont have access anymore and these pics are now only found in this ipad and no other place.

    Hi Alan,
    Thanks for the help, but i've actually done that before.
    It does not help, because it only shows the photos on the camera roll and do not show the photos synchronized with that pc that i dont have access anymore.
    The photos/albums all appear on the ipad, i can see it without problems but i cant get them out of the ipad to save onto pc for backup.
    And i reaaly need it, as it is the only place that i actually have these photos now...

  • How to get information from SOAP header in weblogic without handlers

    I need to retrieve information from SOAP header without handlers.
    Any ideas how to do that?

    Just wondering if Filter can be used here, though I never tried that.

  • How can I get songs (from CDs) on my Nano onto my laptop?  Do I have to rip all the CD's again just becasue I'm using a different computer?

    How can I get all my songs (from CDs) onto my laptop from my Nano?
    Do I have to rip all those CDs again even though they are on the Nano?
    I thought I was allowed to have multiple PCs and use the sync feature.  Yet when I plug in the Nano the message says it will sync to what's on my laptop which are only a few songs I've purchased!!
    I thought Apple was better than that?!  And to think I was going to purchase an iPad!  But if I can't synch my music to other devices, why bother.
    In order to get my music to iCloud via iMatch, I guess I have to rip them all again!  What a pain in the butt...:(

    See Recover your iTunes library from your iPod or iOS device.
    tt2

Maybe you are looking for

  • Report for login and logout time

    Dear All, Please can some one help me urgently. I have to find out users login and logout time over the last six months. I need to find out how many hours per user are being used.  What report do I need to run to find out ?

  • Error While executing Process Flow

    Hello All, We created one process flow it contins 14 mappings in sequence to execute...7th mapping is getting failed with the below errors: CursorFetchMapTerminationRTV20007 MAP_FRPDTA_F4801LA Warning ORA-01002: fetch out of sequence ORA-02063: prece

  • HR - staffing percentage

    hi genius How to find the staffing percentage for a particular pernr(personnel number),it specifies what percentage of the person's working time is spent in the specifid position(it comes under organizational assignments)and tell me the table name fo

  • To change description on release appraisal form

    Hi Gurus, I am facing an issue related to the appraisal form which is already released and employees using the appraisal form. Now client wants to change some description in the appraisal document. I am trying to make the appraisal document to unrele

  • Invoking runtime parameter form from Oracle forms 10g.

    Hi all, I am using Oracle 10g DS. I have cretaed a form containing a button. when i pressed that button the rdf has to be called and runtime parameter form has to be invoked. In that i will give parameters. In that button the path is already is there