how can I make use of credentials in a soap header? I know how to set them:
BindingProvider bp = (BindingProvider) coreWebService;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "username");
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "password");
But how can I verify them on the webservice side? How can I “extract” them from the request that is send by a client?
As far as I know, the code you posted puts the credentials into the HTTP header, not the SOAP header.
You should be able to access what you need from the WebServiceContext.
For SOAP headers:
http://metro.java.net/guide/ch04.html#accessing-soap-headers-for-incoming-messages
HTTP headers:
http://middlewaremagic.com/weblogic/?p=351