Skip to Content
0

SOAP MANAGEMENT HEADER

Mar 14, 2017 at 06:31 PM

30

avatar image

Hello everyone,

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.

Do you have any idea of what I'm doing wrong?

Thx a lot in advance

Kr,

Marc

IF go_obj IS INITIAL.

        CREATE OBJECT go_obj

          EXPORTING

            logical_port_name = 'YSDWCO_IINDIVIDU_SERVICE'.



        ws_header ?= go_obj->get_protocol('IF_WSPROTOCOL_WS_HEADER').

        DATA(lv_header) = ysdw_cl_mwam=>get_header_requests_mijnloon( ).



        l_xstring = cl_proxy_service=>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->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 = xml_element->get_namespace_uri( ).

              ws_header->set_request_header( name = name namespace = namespace dom = xml_element ).

              xml_element ?= xml_element->get_next( ).

            ENDWHILE.

          ENDIF.

        ENDIF.



      ENDIF.
 CALL METHOD go_obj->upload_individus

            EXPORTING

              input  = lv_input

            IMPORTING

              output = lv_output.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi Mar 14, 2017 at 07:47 PM
0

Do a SOAP trace (SOAMANAGER) to make sure the content of the message built/sent. It will be easier to analyze the issue.

Share
10 |10000 characters needed characters left characters exceeded