cancel
Showing results for 
Search instead for 
Did you mean: 

How to test a secured Web Service.

Former Member
0 Kudos

Hello,

I configured security for a custom web service using [this |https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e08627de-9816-2a10-02b7-cbd60f7e4b2c&overridelayout=true]. I configured section

3.2 Configuring Document Authentication

Basic (Username/Password)

How should I go about testing this. I tried using Web Service Navigator, I get this error:

00118565098B00220000011400001D8C00047182FEC71535 : Authentication using a wsse:Username token failed. The error was com.sap.security.core.ws.wss.NoSecurityHeaderException No wsse:Security header has been defined for role soap:finalActor. Please verify the policy configuration..

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi srinivas,

1. For each operation in the Web service, select the WS Security template for request and response from the list in the SAP Netweaver Developer Studio. A WS Security Template describes the security (i.e. XML Signature) used to protect the message.

2. For each of the used WS Security templates specified at design time, a profile with runtime configuration settings, such as.509 certificate data, is required.

3. After creating the WS Security profiles, the profiles need to be assigned to the operations. One profile may be assigned to multiple operations - that is, when the same certificate is to be used for an XML Signature, or different profiles of the same template are used for operations with different XML Signatures.

Regards,

Sunaina Reddy T

Former Member
0 Kudos

Hi Sunaina,

Thanks for your detailed explanation. The fact is, I have already configured security using "Document Authentication

Basic (Username/Password)".

The regular testing via "Web Service Navigator" and "Enterprise Portal Web Service Checker (in NWDS) ", won't work, as it gives me an error:

00118565098B00220000011400001D8C00047182FEC71535 : Authentication using a wsse:Username token failed. The error was com.sap.security.core.ws.wss.NoSecurityHeaderException No wsse:Security header has been defined for role soap:finalActor. Please verify the policy configuration..

Is there a wiki page on how to consume secured web service in java (like a simple java class) ?

Thanks

Srinivas

Former Member
0 Kudos

I see you marked the question answered. How did u fix the issue?

Former Member
0 Kudos

All I did was "recreate" the Enterprise Application Project. I still have some other error while accessing the servlet itself from URL.

Has anybody come across this issue ?

Thanks

Srinivas

former_member192434
Active Contributor
0 Kudos

Hi

ITs look like an configuration issue. There are two way for doing security for SOAP: either based on the transport (i.e. HTTP over SSL) or by protecting the document itself using XML Signature and XML Encryption.

[Use this web service Security|http://help.sap.com/saphelp_nw04/helpdata/en/50/a5d13f83a14d21e10000000a1550b0/frameset.htm]