cancel
Showing results for 
Search instead for 
Did you mean: 

Access restriction on bottom-up WebService removes web service

patrik_spiess
Participant
0 Kudos

Hi,

I do a bottom up web service on NetWeaver 7.3 by annotating a stateless session bean with

@WebService(endpointInterface = "com.sap.research.meregio.businesslogic.common.UserManagementWeb", portName = "UserManagementPort", serviceName = "UserManagementService", targetNamespace = "http://sap.com/research/meregio/businesslogic/common/")
@AuthenticationDT(authenticationLevel=AuthenticationEnumsAuthenticationLevel.NONE)
@Stateless

to make it only accessible by sending user name and password. As soon as I add the @AuthenticationDT annotation and deploy, the web service vanishes from the server. It cannot be found in web service explorer any more. If I access the address of the WSDL directly, I get a 404 error.

As soon as I remove the @AuthenticationDT annotation again, everything works like a charm. Is this a bug? Is there a workaround?

Regards,

Patrik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patrik,

You have to set the authentication to BASIC:

@AuthenticationDT(authenticationLevel = AuthenticationEnumsAuthenticationLevel.BASIC)

The NONE means the Web Service will be public and anyone can call it. When you deploy the new version. Basic means you can activate autentication with user/paswd. When your Web Service is deployed on the server, you should be able to create the necessary configuration iin the Web Service Explorer.

Regards,

Thibault

patrik_spiess
Participant
0 Kudos

Hello Thibault,

I am sorry, the code I posted was after experimenting, I should have taken more care.

But of course I tried it with BASIC authentication mode. But the annotation, both with NONE and BASIC, consistently deleted my web service.

It seems I discovered a bug.

Regards,

Patrik

0 Kudos

Hi,

It seems you have done only design time changes (by adding @AuthenticationDT). You have to do the runtime changes as well.

Refer http://help.sap.com/saphelp_nw72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/content.htm

Once it is done, the WSDL can be found in 'Single Service Administration'. This WSDL is slightly different from the one where @AuthenticationDT is not used. This WSDL contains entire namespace in the URL. This is the reason you were getting 404.

Hope it helps

Regards,

Gopal

Answers (0)