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

Similar Messages

  • 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.

  • Mapping SOAP Fault during synchronous SOAP call

    We are building a mediated service scenario where PI is brokering a synchronous SOAP call, without changing any of the information being sent or received (the mappings use the same source and target data types with no transformations).  When the service is successfully executed everything works as expected, but when the target service returns a SOAP fault, PI appears to be wrapping the fault in a separate fault before returning it to the client.  Why is this happening?  Is there a way to simply return the SOAP fault to the client without adding the additional wrapper?
    Here is the fault received from the target service when called directly:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header/>
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode>Missing_Required_Data</faultcode>
             <faultstring>**Required data is invalid : Dealer Country**</faultstring>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    Here is the fault received from the mediated PI service call:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>ADAPTER.JAVA_EXCEPTION</code>
                   <text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIAdapterFramework:GENERAL:com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: **Required data is invalid : Dealer Country**
         at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1161)
         at sun.reflect.GeneratedMethodAccessor948.invoke(Unknown Source)
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    Why aren't they the same?

    are diferents coz the first is a fault message and the second is a exception message.
    to send back the fault message define a fault message for both structure and map them in a new message mapping. later in the operation mapping or interface mapping  (depends of the pi version) under fault message or fault mappinng (i dont remember) tab assisg the fault message mapping.
    thats all you need.

  • 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.

  • 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

  • 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

  • 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

  • How do I access the DCJMS* variables in my response SOAP:Header ?

    Hi all,
    I have set up a sync / async Integration Process in XI
    This is initiated by a SAP R/3 transaction that calls a synchronous function to enter XI
    Once in the Bridge, a JMS receiver adapter sends out an asynchronous request message from XI to MQ
    A correlation allows the JMS sender adapter to return an asynchronous response message from MQ to XI back into my the Integration Process
    I have set up the JMS sender adapter configuration to return the DC (dynamic configuration) variables in the <SOAP:Header> of the XI response message along with the payload
    You can see that the DCJMS* variables are returned below
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Response
      -->
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <SOAP:Header>
    + <SAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
    + <SAP:ReliableMessaging xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    + <SAP:HopList xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    + <SAP:RunTime xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    + <SAP:PerformanceHeader xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSCorreleationID">40D982A0-B19D-11DB-9508-0002A5D5916B</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSTimestamp">1170297456940</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageID">ID:414d5120514d4430312020202020202045c12b962001dd02</SAP:Record>
      </SAP:DynamicConfiguration>
    - <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information
    <b>Question</b>
    I want to access the DCJMS* variables but am not sure how to go about it as the
    variables exist in the <SOAP:Header>?
    I followed the SAP documentation to access adapter-specific attributes (refer to link http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm )
    I have used the following code to create a user-defined function for the accessing adapter specific attributes (similar to the link)
    public String Get_Msgid(Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
    (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create
    ("http://sap.com/xi/XI/System/JMS","DCJMSMessageID");
    String jmsMsgID = conf.get(key);
    return jmsMsgID;
    <b>Question</b>
    Do I use message mapping to extract the DCJMS* variables?
    <b>Question</b>
    If so then which message is used for the source message so that I can access the <SOAP:Header>?  Eg do I use the response message type or is there a trick to accessing the SOAP:Header?
    <b>Question</b>
    Do I use the user-defined function (like above)?
    I performed the following steps
    •     Opened the message mapping in edit mode
    •     Created the user-defined function using the graphical editor
    •     Saved the message mapping
    •     I have not connected the user-defined function to any of the xml tags in either the source or target messages
    When I go to test the message mapping I am getting the following error
    Compilation process error : CreateProcess: null\bin\javac -J-Xmx256m @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/O1170817003886.txt @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/S1170817003886.txt error=2
    STACKTRACE:
    com.sap.aii.ib.core.mapping.exec.ExecuteException: Compilation process error : CreateProcess: null\bin\javac -J-Xmx256m @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/O1170817003886.txt @E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd79a7bf0b65611dbaf390002a5d5916b/S1170817003886.txt error=2
    at  com.sap.aii.ib.server.mapping.exec.ServiceUtil.compileSourceCode(ServiceUtil.java:207)
    at com.sap.aii.ib.server.mapping.exec.ServiceUtil.compile(ServiceUtil.java:156)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.compileSourceCode(ServerMapService.java:361)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.compileSourceCodeWithoutAndWithArchives(ServerMapService.java:301)
    at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:153)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:259)
    at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
    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)
    A thread in the SDN (Error while Activating Message Mapping, Posted: Jan 9, 2007 3:32 PM) suggests checking the java path on the XI machine
    This is JAVA_HOME=C:\j2sdk1.4.2_08 and seems ok
    <b>Question</b>
    Do you know why I would get the compilation error?
    Any assistance would be appreciated
    Regards,
    Mike

    Jin,
    My compilation issue has gone via a SAP recommendation to specify the JDK home directory in the instance profile
    Back to the mapping - I can now run my scenario
    <b>Source message</b>
    The response message has the following <SOAP:Header> from which I want to extract the DCJMSCorreleationID (note that it's misspelt)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSCorreleationID">40D982A0-B19D-11DB-9508-0002A5D5916B</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSTimestamp">1170297456940</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageID">ID:414d5120514d4430312020202020202045c12b962001dd02</SAP:Record>
      </SAP:DynamicConfiguration>
    <b>Grahpical mapping</b>
    LHS - Response message with occurrance 0..1 so it is not connected to my UDF
    UDF Get_Corrid with no inputs
    RHS - The UDF output is connected to the Acknowledgement msg tag <ACK>
    <b>UDF</b>
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
    (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create
    ("http://sap.com/xi/XI/System/JMS","DCJMSCorreleationID");
    String Corrid = conf.get(key);
    return Corrid;
    <b>Target message</b>
    The idea is to copy the correlation id of the response message into the acknowledgement message.  But as you can see the result is NULL
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns2:AWB0020_MARKET_DATA_RESPONSE_ACK xmlns:ns2="http://awb.com.au/mq/tx/MarketData">
      <ACK>null</ACK>
      </ns2:AWB0020_MARKET_DATA_RESPONSE_ACK>
    Please advise
    Thanks Mike

  • Access to SOAP Header/SOAP Envelope in OSB

    We have a need where we need to copy the SOAP header request to SOAP header response. Is there a way to access SOAP Header/SOAP Env in OSB ?
    Thanks,
    Pavan
    Edited by: user10413378 on Mar 6, 2010 7:14 AM

    There is $header variable with headers:
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1093911
    You can pass all headers through using "Get All Headers" option in Proxy settings and Transport Headers - Pass all Headers in your flow:
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125345

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        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.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          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( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • OSB Delete Entire Node (SOAP:header) in Proxy service

    Hi
    I am wanting to delete the SOAP:header node in the response in the SOAP proxy service.
    I am using the Delete action with the following settings
    Xpath: .
    In Variable: header
    All this is doing is deleting the contents of the "Header" node when I want to Delete the entire node.
    What am I doing wrong?
    Thanks in advance
    Edited by: cool.br33ze on 05-Feb-2013 01:40

    The reason for why I need to get rid of the SOAP:header is because the consuming application, SAP, is unable to handle a SOAP:header.If the consuming application is a SOAP client then there is no reason why it cannot handle it. If consuming application is not a SOAP client then better change the type of your proxy service to Any XML service or Messaging Type Service (with request and response type as XML)
    Regards,
    Anuj

  • 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

  • Adding soap header in java

    Can anyone please tell me how to add following security header in Webservices (WS 1.0 ) client using java code? (I m using axis 1.4)
    <soap:Header>
    <wsse:Security soap:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>[email protected]</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
    token-profile-1.0#PasswordText">adminOnDemand</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>

    XML snippit
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:con="urn:crmondemand/ws/contact/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:con1="urn:/crmondemand/xml/contact">
    <soapenv:Header>
    <wsse:Security>
    <wsse:UsernameToken>
    <wsse:Username>your_site/your_login</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">your_password</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    This isn't exactly what you are looking for but you can use this to add a header to a axis web service call.
    SOAPHeaderElement header = new SOAPHeaderElement("http://your.xsd", "your tag");
    SOAPHeaderElement header1 = new SOAPHeaderElement("http://your other.xsd", "your other tag");
    header1.setAttribute("Id", "your value");
    header.addChild(header1);
    SOAPElement node = header1.addChildElement("more text");
    node.addTextNode("more text");
    SOAPElement nodepwd = header1.addChildElement("another tag");
    nodepwd.addTextNode("more text");
    nodepwd.setAttribute("Type", "http://another url");
    ((Stub)service2).setHeader(header);
    Hope this is more helpful than confusing.

  • OSB: Attach SOAP Header for SOAP Fault

    Hi,
    Is there a way to return OSB SOAP Fault with custom SOAP Header?
    Currently, when SOAP Fault happens, SOAP Header is not returned. I would like to insert some elements in the SOAP header and return when SOAP Fault happens.
    Thanks.

    Hi Eric,
    Thanks for your tips. It was helpful!
    I've managed to insert custom SOAP header to a SOAP fault.
    In service error handler,
    1. Construct custom header and replace header variable content
    2. Replace body content with fault variable
    3. Reply with failure
    Thanks.

  • Help! SOAP Header problem

    Hi, I want to create a SOAP Header like below
    <soap:Header>
    <token xmlns="http://xxx.yyy.zzz/aaa/bbb">
    <sessionId>123456789</sessionId>
    </token>
    </soap:Header>
    I created a java class for token object but i dont know what to do next
    i am new to webservices, so how can I create such a header?
    A sample java code would be great...
    Thanks...

    This may help...
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/soapheader/index.html

Maybe you are looking for

  • How to disallow use of my camera?

    With the new update my camera is constantly on and I want to know how to shut that off

  • Manual Email Retrieve being Ignored??

    I am in Thailand, and I just got a message from AT&T that my data bill is $500 after 30 days. I have had Data Roaming turned "OFF" for the majority of my trip. I have Email retrieval set to MANUAL at all times. I have turned on Data Roaming for a spl

  • HD 4870 x2

    I did a quick search and could not find an answer so I thought I'd post. I have an ATI HD 4870 X2 card and I was wondering if it will work with my Early 2009 Mac Pro. I saw a few posts about the 4870, but I could not find any about the 4870 X2 http:/

  • Exit or Enchancement for TCode FBCJ

    Hi, I have a requirement to copy the Document number field  to Reference number field in TCODE - FBCJ on click of save selection button. Can anybody please suggest any enchancement(User_Exit, BADI, Enchancement spot) which gets triggered io click of

  • Request a certificate for iPhone

    Hi, Guys! I need to generate a csr file for a enterprise certificate, but this CA cannot be for an user, has to be for an iOS device. How can I generate a certificate request for an iOS?