I thought i replied to this already :
Is that an EJB WebService ?.
There are multiple ways :
SOAP Message Security
------------------------------
1. Add some Security Policies to the WSDL (see this for a servlet example) :
http://netbeans.org/kb/docs/websvc/wsit.html
2. Use the legacy Security Provider in glassfish, in this case and the Client would need to be an Application Client.
http://download.oracle.com/docs/cd/E18930_01/html/821-2435/ablrn.html#ablrz
3. Enable Basic Auth if it is a Servlet WebService
On 28-Jul-2011, at 5:33 PM, Florian Kirchner wrote:
> Hi,
>
> I have a Webservice (SOAP) running on Glassfish 3.1. I configured a JDBCRealm, added some role annotations and added the role mapping and realm to glassfish-application.xml. When I call the annotated methods I now get an exception saying "Client not authorized ...". Everything as expected.
>
> My problem is the client side (Java application). How do I login and call the Webservice? I couldn't find anything in the Glassfish documentation.
>
> Thanks,
>
> Florian
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone