Skip to Content
0

WS CONSUMER - SOAP HEADER AUTHENTICATION ERROR

Nov 22, 2016 at 12:06 PM

217

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Simone Milesi 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?

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Nov 22, 2016 at 03:45 PM
0

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.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

ThankYou :D....

0
Former Member

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

ThankYou.

0

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

0
Former Member
Sandra Rossi

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

ThankYou.

0

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
Former Member
Sandra Rossi

Thanks a lot. I will check it.

0