<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SOAP MANAGEMENT HEADER in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-management-header/m-p/483616#M15999</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have added a Header in my request like I saw in many blogs but each times I call the webservice, it asks me my user and password with a popup.&lt;/P&gt;&lt;P&gt;Do you have any idea of what I'm doing wrong?&lt;/P&gt;&lt;P&gt;Thx a lot in advance&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF go_obj IS INITIAL.

        CREATE OBJECT go_obj

          EXPORTING

            logical_port_name = 'YSDWCO_IINDIVIDU_SERVICE'.



        ws_header ?= go_obj-&amp;gt;get_protocol('IF_WSPROTOCOL_WS_HEADER').

        DATA(lv_header) = ysdw_cl_mwam=&amp;gt;get_header_requests_mijnloon( ).



        l_xstring = cl_proxy_service=&amp;gt;cstring2xstring( lv_header ).

        IF NOT lv_header 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-&amp;gt;get_root_element( ).

            xml_element ?= xml_root-&amp;gt;get_first_child( ).

* add header element by element to soap header

            WHILE NOT xml_element IS INITIAL.

              name = xml_element-&amp;gt;get_name( ).

              namespace = xml_element-&amp;gt;get_namespace_uri( ).

              ws_header-&amp;gt;set_request_header( name = name namespace = namespace dom = xml_element ).

              xml_element ?= xml_element-&amp;gt;get_next( ).

            ENDWHILE.

          ENDIF.

        ENDIF.



      ENDIF.
 CALL METHOD go_obj-&amp;gt;upload_individus

            EXPORTING

              input  = lv_input

            IMPORTING

              output = lv_output.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Mar 2017 18:31:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-03-14T18:31:57Z</dc:date>
    <item>
      <title>SOAP MANAGEMENT HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-management-header/m-p/483616#M15999</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have added a Header in my request like I saw in many blogs but each times I call the webservice, it asks me my user and password with a popup.&lt;/P&gt;&lt;P&gt;Do you have any idea of what I'm doing wrong?&lt;/P&gt;&lt;P&gt;Thx a lot in advance&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF go_obj IS INITIAL.

        CREATE OBJECT go_obj

          EXPORTING

            logical_port_name = 'YSDWCO_IINDIVIDU_SERVICE'.



        ws_header ?= go_obj-&amp;gt;get_protocol('IF_WSPROTOCOL_WS_HEADER').

        DATA(lv_header) = ysdw_cl_mwam=&amp;gt;get_header_requests_mijnloon( ).



        l_xstring = cl_proxy_service=&amp;gt;cstring2xstring( lv_header ).

        IF NOT lv_header 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-&amp;gt;get_root_element( ).

            xml_element ?= xml_root-&amp;gt;get_first_child( ).

* add header element by element to soap header

            WHILE NOT xml_element IS INITIAL.

              name = xml_element-&amp;gt;get_name( ).

              namespace = xml_element-&amp;gt;get_namespace_uri( ).

              ws_header-&amp;gt;set_request_header( name = name namespace = namespace dom = xml_element ).

              xml_element ?= xml_element-&amp;gt;get_next( ).

            ENDWHILE.

          ENDIF.

        ENDIF.



      ENDIF.
 CALL METHOD go_obj-&amp;gt;upload_individus

            EXPORTING

              input  = lv_input

            IMPORTING

              output = lv_output.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Mar 2017 18:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-management-header/m-p/483616#M15999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-14T18:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP MANAGEMENT HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-management-header/m-p/483617#M16000</link>
      <description>&lt;P&gt;Do a SOAP trace (SOAMANAGER) to make sure the content of the message built/sent. It will be easier to analyze the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 19:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-management-header/m-p/483617#M16000</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-03-14T19:47:47Z</dc:date>
    </item>
  </channel>
</rss>

