Skip to Content

WS CONSUMER - SOAP HEADER AUTHENTICATION ERROR

Hi gurus,

during the consuming WS calling, i got this error: SoapFaulCodeName: InvalidSecurity |SoapFaulCodeNamespace: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd An error occurred when verifying security for the message.

That's the calling:

  DATA: lv_ist TYPE REF TO zep_co_iconfiguration_service.
  DATA: oref TYPE REF TO cx_root.
  DATA: text1 TYPE string.
  DATA: text2 TYPE string.
  DATA: text3 TYPE string.
  DATA: text4 TYPE string.
  DATA: text5 TYPE string.
  DATA: text6 TYPE string.
  DATA: text7 TYPE string.
  DATA: ls_input TYPE zep_iconfiguration_service_ge1.
  DATA: ls_output TYPE zep_iconfiguration_service_get.

  TRY.
      CREATE OBJECT lv_ist
        EXPORTING
          logical_port_name = 'ZBIZ_ANAG_WS_P'. "porta creata in SOAMANAGER
    CATCH cx_ai_system_fault INTO oref.
      text1 = oref->get_text( ).
  ENDTRY.

  ls_input-customer_code = 'XXXXXXXXX'.

  TRY.
      CALL METHOD lv_ist->get_travels_accounting_data
        EXPORTING
          input  = ls_input
        IMPORTING
          output = ls_output.
    CATCH cx_ai_system_fault INTO oref.
      text2 = oref->get_text( ).
    CATCH zes_cx_iconfiguration_servic87 INTO oref.
      text3 = oref->get_text( ).
    CATCH zes_cx_iconfiguration_servic86 INTO oref.
      text4 = oref->get_text( ).
    CATCH zes_cx_iconfiguration_servic85 INTO oref.
      text5 = oref->get_text( ).
    CATCH zes_cx_iconfiguration_servic84 INTO oref.
      text6 = oref->get_text( ).
    CATCH cx_ai_application_fault INTO oref.
      text7 = oref->get_text( ).
  ENDTRY.

The receiver system gets this log:

but they expect this:

the username and password ( "soapenv:Header" tag ) is missing.

That's the logical port configuration:

that's the method i use

please, what's missing?

how can i do a call with SOAP Header "tag" in the log?

Thanks,

Antonio.

0-1.png (41.3 kB)
0-2.png (26.1 kB)
1.png (27.8 kB)
2.png (29.0 kB)
3.png (26.6 kB)
4.png (40.0 kB)
5.png (33.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Nov 22, 2016 at 03:45 PM

    You must create the logical port using the configuration template WSSE_USERPASSWORD or WSSE_USERPASSWORD_DIG. In SOAMANAGER, you have a menu "create logical port with template". You can't update an existing one if it was not created with this Template; you must recreate it from scratch.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 19, 2018 at 07:54 PM

    Hi, I consuming a WS with the security in the header, I complete the header using IF_WSPROTOCOL_WS_HEADER, but I have a problem with the pasword, it is sending as in ‘hide mode’, any idea how to change this?

    <wsse:Password>********</wsse:Password>

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2016 at 12:30 PM
    -1

    Hi Antonio

    Did you check Thomas Jung' s reply in this thread?

    It explains how to add headers in SOAP services.

    As well, i found this note in a really old thread

    look at the documentation on interface IF_WSPROTOCOL_WS_HEADER. There you can find an example code on how to add SOAP header.

    If you already did it, could you show what exactly did you do and the result?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.