cancel
Showing results for 
Search instead for 
Did you mean: 

WS CONSUMER - SOAP HEADER AUTHENTICATION ERROR

0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member306083
Participant
0 Kudos

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

Sandra_Rossi
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

ThankYou :D....

0 Kudos

Sandra, can you say me how create to template? please!

ThankYou.

Sandra_Rossi
Active Contributor
0 Kudos

In SOAMANAGER, you have a menu "create logical port with template".

0 Kudos

It's true, but not can find the required template, know you if is posible create a new template? or download others templates?

ThankYou.

Sandra_Rossi
Active Contributor
0 Kudos

There are a few SAP notes, for instance

1900894 - Downport of Single CFG UI, WSDL flavours and CFG templates

Some explain how to update SAP tables:

  • SRT_CFG_TPLS_DIR
  • SRT_CFG_TPLS_DAT

Respective tables for clients:

  • SRT_CFG_TPLC_DIR
  • SRT_CFG_TPLC_DAT

0 Kudos

Thanks a lot. I will check it.

SimoneMilesi
Active Contributor
0 Kudos

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?