Hi,
I`m using Geronimo 2.1.4.
i want to add security to my WebService.
So I added the following code into my openejb-jar.xml File:
<?xml version="1.0" encoding="UTF-8"?>
<ejb:openejb-jar xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0
" xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0
" xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pers="http://java.sun.com/xml/ns/persistence
" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0
" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<dep:environment>
<dep:moduleId>
<dep:groupId>org.apache.geronimo.samples.jaxws</
dep:groupId>
<dep:artifactId>jaxws-converterejb</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
</dep:environment>
<ejb:enterprise-beans>
<ejb:session>
<ejb:ejb-name>Test</ejb:ejb-name>
<ejb:web-service-security>
<ejb:security-realm-name>geronimo-admin</ejb:security-
realm-name>
<ejb:transport-guarantee>NONE</ejb:transport-guarantee>
<ejb:auth-method>BASIC</ejb:auth-method>
</ejb:web-service-security>
</ejb:session>
</ejb:enterprise-beans>
</ejb:openejb-jar>
But nothing changed.
I can call the webservice without any password.
Here is my Client code:
Converter conv = new Converter();
ConverterPortType port = conv.getConverterPort();
BigDecimal result = port.dollarToRupees(new BigDecimal(3));
System.out.println("result "+ result);
What have I to change that the webservice is secured?
And how can I give the webservice username and password from the client?
Thanks
Chris