There's lots of ways to do authentication.
"basic authentication" suggests authentication at the HTTP layer rather
than in the SOAP layer. Is that really what you want?
Googling for java soap "basic authentication" throws up some results but
I expect their usefulness depends on what web-services tools you are
Is WS-Security of no interest to you?