In this example the Moria2-enabled service, having earlier aquired a
ticket granting ticket (tgt attribute, here
MDA3AAABAVvsT52YvxxKM3yKATVbQtD*sREX80W7cUNXLIvPtvgIYrUc7IjNp9fXQkFpR3fRqkDi0T4
)
through initiateAuthentication
, see separate
Java/Axis example),
requests a proxy ticket for a subservice identified in Moria2's
configuration as subservice_username
.
The SOAP implementation used in this example is Axis.
import javax.xml.namespace.QName; import org.apache.axis.client.Call; ... Call call = new Call("http://localhost:8080/moria/v2_1/Authentication?WSDL")); call.setUsername("service_username"); call.setPassword("service_password"); final Object[] parameters = {"MDA3AAABAVvsT52YvxxKM3yKATVbQtD*sREX80W7cUNXLIvPtvgIYrUc7IjNp9fXQkFpR3fRqkDi0T4", "subservice_username"}; final String proxyTicket (String) call.invoke(new QName("getProxyTicket"), parameters);
The above code assumes that Moria2 is deployed locally. The proxy ticket
proxyTicket
may now be passed on to the subservice
subservice_username
.