Проблема ясна, как я уже упоминал в заголовке, любая помощь будет оценена ...
Кстати, мои сервисы работают на Jboss 4.2.2GA, и я использую MyEclipse7.5
Более того, вот что я пробовал раньше, но у меня не получилось;
@Stateless
@WebService(name = "BaseService", targetNamespace = "http://base.ws.listingapi.gg.com")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebContext(contextRoot = "/listingapi/ws")
public abstract class BaseService {
..
MessageContext mctx = webServiceContext.getMessageContext();
webServiceContext.getUserPrincipal(); //WITH THIS ONE I could get the username but of course not password..
System.out.println(mctx.get("password"));
Map http_headers = (Map) mctx.get(MessageContext.HTTP_REQUEST_HEADERS);
List userList = (List) http_headers.get("Username");
List passList = (List) http_headers.get("Password");
[РЕШИТЬ]
Я нашел решение, вот оно;
@Context
protected HttpServletRequest request;
Или
@Context
protected WebServiceContext context;
...
request.getUserPrincipal().getName();
//OR
context.getUserPrincipal().getName();
//will return the username used to getting logged in