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

Similar Messages

  • 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

  • Read SOAP Header Information

    Hello All,
    We want to read SOAP header from incoming message. We followed blog from William to use the option "Do not use SOAP Envelop". However, we are not sure if we need to modify Sender Interface to include Envelope / Header in the message structure itself.
    How to Read SOAP Header Information
    If we modify the message structure , it changes the WSDL as well and generating request message something like below :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aif="urn://transport.nsw.gov.au/test/poc/aif">
       <soapenv:Header/>
       <soapenv:Body>
          <aif:Envelope>   <------- Added by Modifying the structure
             <Header>
                <FileType>?</FileType>
             </Header>
             <Body>
                <MessageHeader>
                   <!--Optional:-->
    How can we use  "Do not use SOAP Envelop" feature without modifying the WSDL structure?
    If we don't modify the message structure , it is failing to identify the receiver and also we would not be able to see the fields while doing graphical mapping.
    Thanks !!

    Hi,
    Did you check the namespaces in your receiver determination? In interface determination, this could be solved by creating another mapping. Which PI version are you using?
    Regards,
    Mark

  • SOAP header information [continued]

    Dear,
    It all started here Get SOAP header information
    The fact is that I get the WSDL delivered and I need to upload that into the ESR.
    Next step is to create/generate a Service Interface.
    What I see in the WSDL binding
    After I generated a Service Interface
    Where is my SOAP header part? It seems to be gone in the Service interface?
    I tried this for both SOAP 1.1 and 1.2. Both the same phenomenon.
    Any suggestions?
    Thanks a lot
    Kind regards, Dimitri

    Hello Dimitri,
    Have you got any solution of the issue ?
    I think William's blog answer's that :
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/07/30/how-to-read-soap-header-information
    However, It suggests to modify XML structure for sender interface as well. By doing so , it gives other challenge as described below :
    If we modify the message structure , it changes the WSDL as well and generating request message something like below :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aif="urn://transport.nsw.gov.au/test/poc/aif">
      <soapenv:Header/>
      <soapenv:Body>
          <aif:Envelope>   <------- Added by Modifying the structure
             <Header>
                <FileType>?</FileType>
             </Header>
             <Body>
                <BusinessPartner>
                   <!--Optional:-->
    How can we use  "Do not use SOAP Envelop" feature without modifying the WSDL structure?
    If we don't modify the message structure , it is failing to identify the receiver and also we would not be able to see the fields while doing graphical mapping.
    Let me know if you got any other alternative.
    Thanks & Regards,
    Dijesh Tanna

  • How to access SOAP header without using SOAP message handler

    I have a requirement to retrieve SOAP header information within each web services operation. So I can't use SOAP message handler. Is there any way to do that? BTW, I am not using workshop.
    Thanks.

    Howeve how can I put data into soap header in UDF? DynamicConfiguration won't work for soap header, right?
    Which data do you want ot put into the Header section.
    ASMA or Dynamic Configuration is used to read/ put the details from/ into the header elements.....
    Refer: http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/frameset.htm
    From the help section:
    This information is not located in the payload of the message, but in additional message header fields.
    Regards,
    Abhishek.

  • Soap Header information

    Hi All,
    We are doing a CRM->XI->webservice(SOAP) scenario. I need to put in 2 headers in the SOAP envelope. The 2 headers are like identfiers (eg: trading partner). Is it enough if I set this in the adapter configuration Variable Header Name? If so How do I set the values.?
    For example: If need to set tradingpartner = “Dell” in the header of the SOAP envelope, how can I go about setting this?
    Thanks,
    Teresa

    Hi,
    You will have to create the SOAP envelope manually in your mapping!
    1. In the receiver SOAP adapter , select the option ,  "<b>Do Not Use SOAP Envelope."</b> When you select this option, the SOAP adapter will not embed your XML message with the SOAP envelope. Instead, it will expect the output of the mapping to have the SOAP envelope.
    2. Now, use a Java or XSL mapping and create the entire SOAP message out of your mapping. JAVa and XSL mapping do not validate the target message against the XSD.
    Regards
    Bhavesh

  • Get SOAP header information

    Dear,
    In our synchronous scenario SOAP <-> SAP PI <-> ABAP proxy, I face a problem reading the SOAP header from the incoming message.
    PI version used is 7.11
    This is how the incoming SOAP header looks like
    What I need is the content of field UserId.
    Already tried a lot and also ticked this option in the sender SOAP adapter: Do Not User SOAP Envelope.
    If I do that, I get an error saying premature end of file.
    Any lead is welcome.
    Thanks a lot!
    Dimitri

    Hi Dimitri,
    Have you tried to set a technical name in the ASMA attributes (Configuring the Sender SOAP Adapter (SAP Library - SAP NetWeaver Exchange Infrastructure) and later take this variable with the dynamic configuration during the mapping?
    I havent tried it, it's only an idea.
    Regards.

  • Adding WS Security in SOAP header for calling soap services from PI

    When i am calling a wss enabled webservice from soapui with the header parameters
    Username , Password and Password Type - PasswordText , it is able to get results. The soapui tool automatically adds the following in the soap header -
         <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <wsse:UsernameToken wsu:Id="UsernameToken-9368150" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>xxxxx</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxxx</wsse:Password>
                <wsse:Nonce>aOA1P6t2hJPRyuraQ/IliQ==</wsse:Nonce>
                <wsu:Created>2009-07-10T14:58:33.781Z</wsu:Created>
             </wsse:UsernameToken>
          </wsse:Security>
    However , in PI when the following configurations are made -
    Web Services Security option selected in soap receiver adapter
    In Receiver Agrrement -
    Security Standard -  http://docs.oasis ....
    Security Procedure (Request) - None
    Security Procedure (response) - None
    the user tokens don't seem to generated and it is giving an authentication error . Is there any process of generating this in the outgoing soap header from PI.
    SOAP Axis framework is not installed at present  and working on PI 7.1 SP6.
    Looking forward for your replies

    same issue for me too.
    Try using WS adapter on receiver side .
    If you are able to attach SOAP header with WSSE fields using SOAP adapter at reciever channel let me know how you did it.

  • Overriding Soap Header using Axis(SOAP) Receiver

    Hi Experts,
    I am having a problem in including the SOAP Header in the XML using the SOAP Axis Receiver Adapter. Well I am not sure on how to place this structure in the header:
    <SoapHeader>
        <Header1>
            <child1>
            <child2>
        </Header1>
        <Header2>
            <child1>
            <child2>
        </Header2>
    </SoapHeader
    I have already tried overriding the SOAP Header via Java Mapping but it is not working when I send it to the third-party. I believe this header should be directly encoded using the axis module, but I can only find examples for simple headers and not nested ones...
    Please help.
    Edited by: Mark Dihiansan on Sep 7, 2010 5:15 PM

    Hi,
    you simply place your header template in the handler configuration. If you need to set some values of the header dynamically, you can pass each value in the dynamic configuration header. The axis handler will fill the header with the supplied values.
    The Axis Note 1039369 describes a few header insertion examples that you should look at.
    regards, yza

  • Access to SOAP header in synchronous SOAP response?

    Hi,
    Scenario: message received via synchronous SOAP adapter call.
    In the response which is sent back to the sender i can influence the SOAP body but not the SOAP header.
    Is there a possibility to manipulate/add/map the SOAP header in synchronous response messages?
    Thank you very much in advance for your hints.
    Greetings
    Michael

    Hi Christophe,
    per default PI is sending back something like this
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
         <SOAP:Header/>
         <SOAP:Body>
              Payload, which can be accessed via mapping
         </SOAP:Body>
    </SOAP:Envelope>
    but required are some fields in the Header tag like:
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
         <SOAP:Header>
                                   <SOAP:ABC>date</SOAP:ABC>
         </SOAP:Header>
         <SOAP:Body>
              Payload, which can be accessed via mapping
         </SOAP:Body>
    </SOAP:Envelope>
    Greetings
    Michael

  • How to convert the Variable with soap header to non soap variable.

    I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
    Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
    Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.

    HI,
    In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
    Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
    Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
    Thanks,
    Venugopal sss Raja

  • Error in soap header when use webservice consumer proxy

    Hi all,
    I create a webservice consumer proxy to external server. the webservice provider is .Net  and it required a message level security.
    The soap message should include a soap header, like this:
    <SOAP-ENV:Header>
    <m:AuthHeader xmlns:m="http://tempuri.org/">
    <m:Username>test1</m:Username>
    <m:Password>test</m:Password>
    </m:AuthHeader>
    </SOAP-ENV:Header>
    I have found many information from here. Now I used  IF_WSPROTOCOL_WS_HEADER in my program, like this:
    REPORT  zws_jp_test01.
    DATA: lo_zws_jp_co_service_soap TYPE REF TO zws_jp_co_service_soap .
    DATA: lo_fault TYPE REF TO cx_ai_system_fault.
    DATA: lo_appl_fault TYPE REF TO cx_ai_application_fault.
    TRY.
        CREATE OBJECT lo_zws_jp_co_service_soap
          EXPORTING
            logical_port_name = 'ZWS_JP_LP4'.
      CATCH cx_ai_system_fault INTO lo_fault.
        MESSAGE lo_fault TYPE 'I'.
    ENDTRY.
    DATA: output TYPE zws_jp_create_job_ad_soap_out .
    DATA: input TYPE zws_jp_create_job_ad_soap_in .
    DATA: lr_ws_header TYPE REF TO if_wsprotocol_ws_header.
    DATA: lv_name TYPE string,
          lv_namespace TYPE string.
    DATA l_xstring TYPE xstring.
    DATA l_string TYPE string.
    DATA: ixml TYPE REF TO if_ixml,
         xml_document TYPE REF TO if_ixml_document,
         xml_root TYPE REF TO if_ixml_element,
         xml_element TYPE REF TO if_ixml_element,
         xml_node TYPE REF TO if_ixml_node.
    lr_ws_header ?= lo_zws_jp_co_service_soap->get_protocol(
                                               if_wsprotocol=>ws_header ).
    CONCATENATE
      '<SOAP-ENV:Header>'
        '<m:AuthHeader xmlns:m="http://tempuri.org/">'
          '<m:Username>test1</m:Username>'
          '<m:Password>test</m:Password>'
        '</m:AuthHeader>'
      '</SOAP-ENV:Header>'
    INTO l_string.
    l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
    CALL FUNCTION 'SDIXML_XML_TO_DOM'
      EXPORTING
        xml           = l_xstring
      IMPORTING
        document      = xml_document
      EXCEPTIONS
        invalid_input = 1
        OTHERS        = 2.
    IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
      xml_root = xml_document->get_root_element( ).
      xml_element ?= xml_root->get_first_child( ).
      WHILE NOT xml_element IS INITIAL.
        lv_name = xml_element->get_name( ).
        lv_namespace = xml_element->get_namespace_uri( ).
        lr_ws_header->set_request_header(
            name            = lv_name
            namespace       = lv_namespace
            dom             = xml_element
            must_understand = SPACE
        xml_element ?= xml_element->get_next( ).
      ENDWHILE.
    ENDIF.
    input-job_ad-id = 0.
    input-job_ad_text-id = 0.
    input-job_ad-publish_location = 1.
    TRY.
        CALL METHOD lo_zws_jp_co_service_soap->create_job_ad
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault INTO lo_fault .
        MESSAGE lo_fault TYPE 'I'.
      CATCH cx_ai_application_fault INTO lo_appl_fault.
        MESSAGE lo_appl_fault TYPE 'I'.
        WRITE: output-create_job_ad_result-id.
    ENDTRY.
    But there is error when I run this program. the error is "SoapFaultCode:1"
    In tcode ST11, I see this log:
    E SOAP_RUNTIME 20100624004837.9280000 : CL_SOAP_RUNTIME_CLIENT
    ->EXEC_PROCESSING SOAP Fault Exception caught: : SOAP header To
    was not understood.
    btw the release is  701.
    Any one can navigate me to solved the problem?

    Hi,
      I have the same problem as you did before and I posted my code in this [thread|Change SOAP Header: Consuming Webservice;.
      In order to to solve your problem, I need to know what is the header that you want to add into the header, what is WSDL, and have you try testing that web service using other tool such as SOAPUI or XMLSPY and what is the result of testing tool?
    Regards,
    Chaiphon

  • Creating Custom SOAP header in the Sender soap scenario

    Hello Experts,
    Currently i have a SOAP to RFC scenario . In which in the request parameter i have single input parameter. But as per the requirement we need to have some xml parameters in the soap header .
    So i want the soap request looks like below,
    <?xml version="1.0"?>
    -<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    -<SOAP-ENV:Header>
    -<ns0:TestHeader xmlns:ns0="http://testcustomer.com">
    -<MessageDetails>
    <ServiceType/>
    <ServiceAction>String</ServiceAction>
    <MessageRole rtype=""/>
    -<MessageSource>
    <SourceName/>
    <SourceID idtype=""/>
    </MessageSource>
    -<MessageDestinations>
    -<MessageDestination>
    <DestinationID idtype=""/>
    <DestinationName/>
    </MessageDestination>
    </MessageDestinations>
    <Property Name=""/>
    </MessageDetails>
    </ns0:TestHeader>
    </SOAP-ENV:Header>
    -<SOAP-ENV:Body>
    -<m:MT_CERT_IP xmlns:m="http://mydzit.gov.sa/zakat">
    <INPUT1>102140000007</INPUT1>
    </m:MT_CERT_IP>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Kindly let me know the steps, how can i achieve this ??
    I have referred the AddSOAPHeaderBean  module but still not received the needed output.
    Best Regards,
    Amit

    Hi Amit,
    My few cents.
    You have an example in Dimitri Sannen's blog Read SOAP header information doing the mapping with XSLT.
    Also, you have an other example like Dev Noronha suggestion, in William Li's blog How to Read SOAP Header Information
    Regards.

  • How to modify the soap header of ebxml control?

    I need to change the soap header information of the ebxml control
    from
    <eb:CPAId>http://www.openuri.org/cpa</eb:CPAId>
    to
    <eb:CPAId>MyString</eb:CPAId>
    and I want to add some additional information to the header such as the wsse feature
    <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
    <wsse:UsernameToken>
    <wsse:Username>1234</wsse:Username>
    <wsse:Password>5678</wsse:Password>
    <Organization>abc</Organization>
    <Domain>DEFAULT</Domain>
    </wsse:UsernameToken>
    </wsse:Security>
    Does anyone know where I can change the type value?
    Thanks, Kun

    Your code works. But if I place the TextInput in the formItem
    and form tags, the Y value becomes 0. You can try this one:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Form paddingBottom="0" paddingTop="0"
    paddingRight="0">
    <mx:FormItem label="Title:">
    <mx:TextInput width="275" id="newSongTitle"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button id="submitSongData" label="Add Song"
    width="150"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Text text="{newSongTitle.x}" width="322"/>
    <mx:Text text="{newSongTitle.y}" width="322"/>
    <mx:Button label="set Y" click="{newSongTitle.y =
    newY.value}"/>
    <mx:NumericStepper id="newY" value="50" minimum="0"
    maximum="400"/>
    </mx:Application>

  • Dynamic Receiver Determination using Soap header

    Hi ,
       I am trying to use a field in SOAP Header to determine the receivers dynamically.
    1, Using XPATH gives me only values in the Payload and not the SOAP header. Is it possible to pull the value from the SOAP header to the payload and then do dynamic receiver determination.
    2. Using Context Object is it possible to transfer the value of the field in SOAP header to variable header Xheadername1 and then use it to determine the receiver. I am having problems in passing the value of the field in soap header to XHeadername1.
    Any help is appreciated and points will be awarded.
    Joe Vellaiparambil

    Hi Joe,
    This is a good blog by William, hope this is helpful.
    /people/william.li/blog/2009/07/30/how-to-read-soap-header-information
    Let us know if you need more information.
    Regards,
    Neetesh

Maybe you are looking for

  • Unable to manage volume with my bluetooth car kit

    I have a bluetooth car kit Parot CK-3000 and the volume is very low and I can't change it with my new Nokia phone 6120. With my previous phone (Sony-Ericsson, SPV) it was running well but with my new phone I can't change the volume of my bluetooth ca

  • Automatic Payment Program payment proposal

    Hi All, I am running APP (F110) for vendor's. I want to select only those line items which are required instead of selecting all open items from the account. So in Parameters on 3rd tab page FREE SELECTION  Field Name - Posting date Value field - res

  • Where condition in select query

    my requirement is this. I want to fetch some records from DB table. The field objnr has 12 characters. i will supply a substring of this field. the substring starts at the 3rd location of field. SELECT objnr FROM cosp INTO TABLE gt_itab              

  • "You cannot authorize more than five computers"

    I am unable to play any of my music that I have bought from iTunes music store because when I try to play my music on my new computer it says "You cannot authorize more than five computers". In fact, I only have four computers using my iTunes music a

  • Macbook Pro mouse touchpad in Vista?

    I just bought a Macbook Pro and because of certain applications that I need for work I have Vista Ultimate x64 running on Bootcamp. Everything works great except for the built in mouse touchpad. I can move the cursor fine but I can't tap on the touch