public static String getAuthToken(Publish securityService, String pubId, String cred) throws DispositionReport, RemoteException { if (!TckPublisher.isUDDIAuthMode()) return null; org.uddi.api_v2.GetAuthToken ga = new org.uddi.api_v2.GetAuthToken(); ga.setGeneric("2.0"); ga.setUserID(pubId); ga.setCred(cred); org.uddi.api_v2.AuthToken token = securityService.getAuthToken(ga); return token.getAuthInfo(); }
@Override public AuthToken getAuthToken(GetAuthToken body) throws DispositionReportFaultMessage, RemoteException { org.uddi.api_v2.GetAuthToken authToken = new org.uddi.api_v2.GetAuthToken(); authToken.setGeneric(MapUDDIv3Tov2.VERSION); authToken.setCred(body.getCred()); authToken.setUserID(body.getUserID()); try { org.uddi.api_v2.AuthToken authToken1 = publishService.getAuthToken(authToken); AuthToken r = new AuthToken(); r.setAuthInfo(authToken1.getAuthInfo()); return r; } catch (DispositionReport ex) { throw MapUDDIv2Tov3.MapException(ex); } catch (SOAPFaultException ex) { throw MapUDDIv2Tov3.MapException(ex); } }