DynamicConfiguration to Message Header

Hello XI SDN'ers,
Does any one tried of reading or writing parameters to Header fields from Dynamic Configuration? If so, please advise me How to read and write the parameters.
Note: I am interested in parameters like SOAPAction, Cookie
Thanks & Regards,
Satish.

Hello Stefan,
I tried the way you described, I am still getting "NULL" value.
I did as follows:
Processing Sequence:
1    AF_Adapters/axis/AFAdapterBean                afreq
2    AF_Adapters/axis/HandlerBean                     xireq----------------------O/B Handler
3    AF_Adapters/axis/HandlerBean                     dcreq---------------------- This is for Dynamic Configuration (write)
4    AF_Adapters/axis/HandlerBean                     rem------------------------- Header Removal handler 
5    AF_Adapters/axis/HandlerBean                     dcres----------------------This is for Dynamic Configuration (read)
6    AF_Adapters/axis/HandlerBean                     trp--------------------------- HTTPSender
7    AF_Adapters/axis/HandlerBean                     xires------------------------O/BHandler
8    AF_Adapters/axis/AFAdapterBean                afres
Module Configuration looks as follows:
handler.type   java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler
key.a             write http://sap.com/XI/System/HTTP SetCookie (here, I want to read the Set-Cookie field from HTTP
                     Response header, so I used "read" previously and also I am not sure of the "NameSpace", because the
                     namespace in my repository looks "http://sap.com/xi/XI/System/HTTP" )
location.a       header
value.a           Set-Cookie
If you have any other suggestions, please let me know.
Thanks & Regards,
Satish.

Similar Messages

  • Message Header value is not written to DynamicConfiguration

    Hi Forum,
    I have a scenario on a PI 7.11 SP06, where a SOAP message is sent via HTTP to a SAP WAS Java.
    The response contains in header a  parameter"set-cookie" which has to be written in dynamic configuration.
    For example: Set-Cookie: JSESSIONID=DF4D3F35636D8E3549490B678SAP9403229; Path=/
    Therefore, i use SOAP adapter with axis extension, but the "set-cookie" content is not written to dynamicconfiguration.
    Here is my axis adapter configuration. Do you see something wrong here?
    **Processing Sequence**
    1    AF_Adapters/axis/AFAdapterBean                afreq
    2    AF_Adapters/axis/HandlerBean                     xireq----------------------O/B Handler
    3    AF_Adapters/axis/HandlerBean                     trp--------------------------- HTTPSender
    4    AF_Adapters/axis/HandlerBean                     dcres----------------------This is for Dynamic Configuration (read)
    5    AF_Adapters/axis/HandlerBean                     xires------------------------O/BHandler
    6    AF_Adapters/axis/AFAdapterBean                afres
    **Module Configuration**
    dcres          handler.type     java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler
    dcres          key.1          read http://sap.com/xi/XI/System/HTTP SetCookie
    dcres          location.1      header
    dcres          value.1          set-cookie
    trp             handler.type     java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    trp             module.pivot     true
    xireq          handler.type     java:com.sap.aii.axis.xi.XI30OutboundHandler
    xires          handler.type     java:com.sap.aii.axis.xi.XI30OutboundHandler
    I followed the [How To Guide|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b092777b-ee47-2a10-17b3-c5f59380957f] which is unfortunately for 7.0.
    Also i tried with "set-cookie" and "Set-Cookie" without success. I have written a small java test which is accessing
    this service and I can see parameter "set-cookie" in the header. So with small letters should be okay.
    I have also read this very similar [sdn thread|DynamicConfiguration to Message Header;.
    Tests with writing constants to dynamicconfiguration works without any problem.
    I'm not sure if i have the correct handler classes. Is there any documentation about the handlers?
    Any help is very appreciated.
    Thanks in forward and best regards,
    Sigi

    Hi all,
    thanks for response.
    I'm aware of these functions so I tried the test to create a dummy entry in header and read it from there.
    So first i used which wrote constant to ASMA
    dcres1     key.1    insert http://sap.com/xi/XI/System/HTTP dummy
    dcres1     value.1 12345
    Then  I used write to move that constant from ASMA to header
    dcres2     key.1   write http://sap.com/xi/XI/System/HTTP dummy
    dcres2     location.1  header
    dcres2     value.1  dummy
    Finally i used read on that dummy value, creating a new entry in ASMA based upon that dummy entry
    dcres3     key.1   read http://sap.com/xi/XI/System/HTTP SetCookie
    dcres3     location.1  header
    dcres3     value.1  dummy
    So the "read" entry is correct in my origin settings. So now I know that the "set-cookie" header parameter from Java WAS response is not passed through SOAP Axis adapter.
    Does anybody know if there are settings which have to be changed in system? Or is that a design as usual, that the set-cookie parameter is not passed to SOAP AXIS HTTP-header params?
    Thanks in forward and best regards,
    Sigi
    Edited by: Siegfried Ertl on Apr 13, 2011 3:06 PM

  • How to acces the filename from Message Header during variable substitution

    Hi,
    We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of Message Header
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if we want to specify the interface name from the message header in the target directory or in the file name scheme, we enter message:interface_name as the reference.
    In the same way i need to access the filename which we get in the Message Header(which we get in the Message Header when we check the Adaptor specific message properties and filename in sender CC).Any suggestions on the same
    Thanks and Regards,
    Bhargav
    Message was edited by:
            bhargav gundabolu
    Message was edited by:
            bhargav gundabolu

    Hi Bhargav,
    Use this UDF to retreive the file name from the Dynamic Configuration Payload in the mapping.
    getFileName(UDF) -
    > Filename(node in the target structure).
    public String getFileName(Container container)
       //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Create a node in the target structure top hold the filename returned by the UDF.
    Now your payload will have the filename along with the actual data.
    U can use the variable substution now as u use for the other data in the payload since the filename is now a part of your payload.
    Regards
    San

  • Retrieve the message put in message header using variable substitution

    hi,
    i am using dynamic configuration to put some information in the message header.is it possible to retrieve the message using variable substitution and if it is possible then how it be done using variable substitution.
    regards,
    Meenakshi

    Variable Substitution does not allow you to read all the messaeg header elements only some of them can be read/ access....for more info on how to read the message header elements refer: /people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
    From the above blog:
    When using Variable Substitution, only certain standard message header attributes can be used/accessed (e.g. sender_party,
    sender_service, receiver_party, receiver_service, interface_name, interface_namespace, message_id)
    Better use Dynamic Configuration to read the parameters.
    I am wondering why you need to read the message header parameters when you are putting them using Dynamic Configuration.....cant you just get the details from the dynamic configuration UDF itself?
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 10, 2009 1:18 PM

  • Accessing SAP:HopList element in message header from JAVA-mapping

    Dear Experts,
    Is it possible to access the SAP:HopList element from message header in JAVA-mapping? 
    I need this to get the list off all receivers of current message (I have a ReceiverDetermination with two receivers, without any conditions, so both receivers are receiving each message and in InterfaceDetermination to one of the receivers I have a JAVA-mapping, in which I need to know the name of another receiver. And the SAP:HopList is containing this information).
    Or maybe where is some other solution?
    Best Regards,
    Artsiom Anichenka

    That's tricky, since the proper way of doing it would be through BPM.
    Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
    But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
    Regards,
    Henrique.

  • Blank messages in Apple Mail, only message header seen

    Blank messages in Apple Mail, only message header seen.
    But not all messages.. and not for mails from apple domain.
    I am using,
    1. OS X 10.6.8
    2. Mail Version 4.6 (1085)
    Tried all suggestions available in the web.
    Did not help..
    Any solution, thanks in advance.

    Nevermind, the problem fixed itself. I don't know what happened; I think I restarted my computer, and the problem was gone. Nevermind!

  • Reading Message Header and mapping

    Hi,
    If a userId is coming in the message header of the source message and I want to map it with one of the fields in the destination structure then How can it be done ?
    Can dynamic configuration be of any use here? I have RFC receiver and proxy sender.
    Please suggest.

    >
    neelansha singh wrote:
    > Hi,
    > If a userId is coming in the message header of the source message and I want to map it with one of the fields in the destination structure then How can it be done ?
    > Can dynamic configuration be of any use here? I have RFC receiver and proxy sender.
    >
    > Please suggest.
    my understanding is your sender is a proxy (ABAP???).
    There is a user id as part of the message header and you want to access it during mapping.
    Dynamic configuration will not help in this case for a proxy sender. hence the best way is to have that user id stored as a field in the proxy structure itself so that it will be easily used for your mapping. This is the simplest solution.

  • MessageId missing in SOAP message header

    I am trying to execute a SAP (IDoc) -> XI -> SAP (ABAP Proxy). The SAP machines are 6.2, the XI machine is 6.4. I have generated and tested the ABAP proxy, works without issue. Per previous threads I also tested the message mapping in the repository, also works successfully. When I review the SXI_Monitor in XI, the message is received successfully, mapped successfully, but errors in the Adater Call step. There is no message listed as received in the sxi_monitor on the recevier SAP system. Error Message is as follows:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIProtocol</SAP:Category>
      <SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
      <SAP:P1>/MessageHeader/MessageId</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>XML tag /MessageHeader/MessageId missing in SOAP message header (SAP XI Extension)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Looking at the message in the monitor it does have a message id assigned. Only other interesting thing is in the trace section where it says :
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    All other messages are successful in this persistence(send to file, Idoc, etc).
    What is the issue?

    Hi Darin,
    Check your receiver communication channel.  Make sure that the protocol is set to XI 2.0 for 6.2.
    Hope that helps.
    Best Regards,
    Doo

  • How to configure message header in receiver http adapter?

    Hi all
    I need the outgoing message payload from receiver http adapter to backend system with below form.
    POST http://222.222.33.22 /HTTP1.0
    content-type:application/x-www-form-urlencoded
    USERID=xxxxxx&PASSWORD=xxxx&SRCID=10&CDDATE=20070601...........................................................................
    ×POST http://222.222.33.22 /HTTP1.0
    ○content-type:application/x-www-form-urlencoded
    ○USERID=xxxxxx&PASSWORD=xxxx&SRCID=10&CDDATE=20070601...........................................................................
    Is there a parameter to enable POST method as a part of message header outputing?
    thanks in advance.

    The parameters available in HTTP adapter for message header are:
    HeaderFieldFive     http://sap.com/xi/XI/System/HTTP
    HeaderFieldFour     http://sap.com/xi/XI/System/HTTP
    HeaderFieldOne     http://sap.com/xi/XI/System/HTTP
    HeaderFieldSix     http://sap.com/xi/XI/System/HTTP
    HeaderFieldThree     http://sap.com/xi/XI/System/HTTP
    HeaderFieldTwo     http://sap.com/xi/XI/System/HTTP
    HTTPDest     http://sap.com/xi/XI/System/HTTP
    TargetURL     http://sap.com/xi/XI/System/HTTP
    URLParamFive     http://sap.com/xi/XI/System/HTTP
    URLParamFour     http://sap.com/xi/XI/System/HTTP
    URLParamOne     http://sap.com/xi/XI/System/HTTP
    URLParamSix     http://sap.com/xi/XI/System/HTTP
    URLParamThree     http://sap.com/xi/XI/System/HTTP
    URLParamTwo     http://sap.com/xi/XI/System/HTTP

  • Header missing in SOAP message header (SAP XI Extension)

    Hi Experts,
    We are implementing interface MasterDataUpdateConfirmation_Out between 2 SAP ERP systems. The middleware is SAP PI.
    SAP PI team requested a change in this interface Stack - Replace Stack ABAP by Stack Java. The changes were made.
    However, now we get an error in the interface in the SAP ERP sender system, but the message arrives to SAP PI where is processed without errors and also arrives to SAP ERP receive system and the message is also processes without errors.
    The error we have in XML message in SAP ERP sender system is:
    XML element {http://schemas.xmlsoap.org/soap/envelope/}Header missing in
    SOAP message header (SAP XI Extension)
    Exception of class CX_XMS_SYSERR_PARSER
    Can anyone please help us? We have no ideia what to do.
    Thanks in advance,
    RS

    Hi again,
    I don't know if it is important, but the communication is asynchronous and the sender system is SAP ECC 6.0.
    Thanks!

  • Envelope missing in SOAP message header (SAP XI Extension)

    I have scenario where in I am sending a file from XI to PCK. BUt i am getting a following error.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIProtocol</SAP:Category>
      <SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
      <SAP:P1>Envelope</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>XML tag Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I am enclosing the file i am trying to send.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:CFP_SENDER_MT xmlns:ns0="HTTP://PCKXI.WORLDBANK.ORG">
    - <SEND>
      <TF_Number>12</TF_Number>
      <TF_Desc>1212</TF_Desc>
      </SEND>
      </ns0:CFP_SENDER_MT>
    Can somebody please enlighten me about this error? Points would be rewarded immediately
    Regards,
    Manish

    Dear Manish,
    quite often the reason for this kind of error
    is the fact that the receiver of the XI message is
    returning a http response to the Integration Server.
    As of XI3.0 SP21 / PI7.0 SP13 this response
    is also properly parsed and visible in the error
    header of the XI message.
    For almost all prior support package levels an
    advanced correction is available as per OSS note:
    1064346 Improved error output for connection problems
    Please check whether this applies to your system.
    If so, you will see detailed information on the error
    in the error header object of the XI message as soon
    as this issue re-occurs.
    Best Regards,
    Harald Keimer
    XI Development Support
    SAP AG, Walldorf

  • Wrong value in message header on target system | "test" -- "production"

    Hi all,
    need some help with this.
    When sending a message with RNIF Adapter to target system there's something wrong with the Message Header.
    GlobalUsageCode has the value "test" but should say "production".
    Any ideas where i can change that value on PI side ?
    Cheers
    Lars

    may be u can change it in the mapping . it should be definitely possible using abap mapping

  • Exchange 2007 - content-language in message header

    Exchange 2007
    The Regional Settings on client computer is set to Bulgarian (Formats/Location/non Unicode/System Account)
    The Regional Settings in Outlook Web Access for user1 is set to Bulgarian.
    On the exchange server, the language of mailbox of user1 is set to Bulgarian with powershell command
    Set-Mailbox -Identity "user1" -Languages "bg-BG"
    And the check shows
    [PS] C:\Windows\system32>$Mailbox = Get-Mailbox -Identity "user1"
    [PS] C:\Windows\system32>$mailbox.languages
    LCID             Name             DisplayName
    1026             bg-BG            Bulgarian (Bulgaria)
    If user1 sends a new message using Outlook, the message header contains:
    Accept-Language: bg-BG, en-US
    Content-Language: en-US
    But if user1 sends a new message to same recepient using Outlook Web Access, the message header contains:
    Accept-Language: bg-BG, en-US
    Content-Language: bg-BG
    The recepient uses some Blackberry smartphone.
    The problem comes with cyrrilic text in the message:
    If the messaqge is sent using OWA, the recepient can visualize and read cyrillic text.
    But if the message is sent from Outlook, the recepient see symbols "????...?" instead cyrillic text
    Is there a way when use Outlook the message header to be
    Content-Language: bg-BG
    This problem with incorrect cyrrilic text can be observed only on this Blackberry smartphone. There are not any problems if recepient uses computer with correct regional settings and various mail clients

    Hi,
    Have you resolved this issue?
    If there is any update, please feel free to post here for further research.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Static information to be added in  message header of the XI message  in JMS

    Hi Friends ,
    Is it possible to add some customer specific internal information to message header of the XI message in PI 7.1 level.. If so how ?
    customer wants to add some info and to verify whether it would be handled in PI itself or not..
    Business case :  SAP -
    > PI7.1 -
    > IBM MQ
    All inputs will be appreciated .
    Thanks.,
    V.Rangarajan

    Hi preetak ,
    Thanks for your info .Since i have not worked on JMS adapter
    As per the Link it says as follows
    If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (10 Maximum).
    ·        In the table, enter the Name and Java Type of the JMS message properties whose values are to be included in the message header of the XI message.
    Under Java Type, you define the JMS Java message type for the attribute in the created JMS message. The following are possible entries:
    boolean , init , String etc.,
    Question
    1. How to pass the value to this parameter  will it be XML file with parameter name and value ?
    2. Any other blogs to refer ?
    Thanks .,
    V.Rangarajan

  • URGENT ::: How to add UserName Token to SOAP Message Header.

    Hi,
    I created a webservice client using CLIENTGEN utility of weblogic from the WSDL file. When I am trying to call a webservice which is hosted on TOMCAT server, I am getting the following exception::
    5/12/2008 06:09:02 com.sun.xml.wss.impl.filter.DumpFilter process
    INFO: ==== Sending Message Start ====
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://settlementService.au.db.com/types">
    <env:Body>
    <env:Fault>
    <faultcode xmlns:ans1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ans1:FailedAuthentication</faultcode>
    <faultstring>Message does not conform to configured policy [ AuthenticationTokenPolicy  ]: No Security Header found</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    ==== Sending Message End ====
    The webservice ic configured as secured webservice, there is some certificate file which was provided to me from client. Useing java KEYTOOL command I have created the keystore from that certificate and configure it in the weblogic server console.
    Issue is the SOAP message header is blank I need to add the USERNAME TOken profile to this header, in order to access this webservice. The current CLIENT code snippet is shown below:
              try{
                   String WSDLUrl = "https://shappzu2.au.db.com:8297/settlementService-ws/settlementService?WSDL";
                   String wsUserName = "tracer-us";
                   String wsPassword = "R0na!do#11";
                   InputStream[] policies = new InputStream[]{Client.class.getResourceAsStream("/wl-unt-policy.xml")};
                   SettlementService_Impl settlementServiceObj = new SettlementService_Impl(WSDLUrl);
                   SettlementServiceFacade port = settlementServiceObj.getSettlementServiceFacadePort(policies, policies);               
                   List credProviders = new ArrayList();
                   CredentialProvider cp = new ClientUNTCredentialProvider(wsUserName.getBytes(), wsPassword.getBytes());
              credProviders.add(cp);
              Stub stub = (Stub)port;
              // Set stub property to point to list of credential providers
              stub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
                   if(sharesXMLString != null && sharesXMLString.length() > 0) {
                        port.loadEquityTrade(sharesXMLString);
              }catch(Exception e){
                   //throw new SystemException(e.getMessage());
                   e.printStackTrace();
    Can any one help me in this?

    1) Use something like TCPmon https://tcpmon.dev.java.net/ or verbose logging to see the actual message content on the wire that the client is sending
    2) Inside the WLS samples there is a UNT sample in the INSTALL_DIR/wlserver_10.0(or equivalent)/samples/server/examples/src/examples/webservices/security_jws
    If that works correctly and puts the UNT in the header, then I would compare that code with yours.

Maybe you are looking for