To do this;
Open the ejb project, double click on the web service configurations, create to configuration by clicking the add button.
First one was standard, named Config1, and it was added when we first create the web service.
The second will be used for reaching the web service via basic authentication with username and password. Create the new configuration by clicking web service configurations, click the web service name and click the add button. After creating the configuration choose security; select HTTP Authentication for Authentication mechanism and Basic Use SAP Logon Ticket from below. Choose operations(your ejb methods) for web service and save. Save it and your configurations look like the below one :