}
}
}
logger.info("Updating homeNode server using jUDDI specific API..");
Transport defaultTransport = WebHelper.getTransport(session.getServletContext());
JUDDIApiPortType juddiApiService = defaultTransport.getJUDDIApiService();
//making sure our node info is there and up to date.
SaveNode saveNode = new SaveNode();
saveNode.setAuthInfo(userAuthToken);
saveNode.getNode().add(clerk.getApiClerk().getNode());
juddiApiService.saveNode(saveNode);
//making sure our clerk info is there and up to date
SaveClerk saveClerk = new SaveClerk();
saveClerk.setAuthInfo(userAuthToken);
saveClerk.getClerk().add(clerk.getApiClerk());
juddiApiService.saveClerk(saveClerk);
//making sure our node info is there and up to date.
SaveNode saveToNode = new SaveNode();
saveToNode.setAuthInfo(userAuthToken);
saveToNode.getNode().add(toClerk.getApiClerk().getNode());
juddiApiService.saveNode(saveToNode);
//making sure our clerk info is there and up to date
SaveClerk saveToClerk = new SaveClerk();
saveToClerk.setAuthInfo(userAuthToken);
saveToClerk.getClerk().add(toClerk.getApiClerk());
juddiApiService.saveClerk(saveToClerk);
logger.debug("Updating default UDDI server completed.");
SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
saveClientSubscriptionInfo.setAuthInfo(userAuthToken);
ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
clientSubscriptionInfo.setSubscriptionKey(modelSubscription.getSubscriptionKey());
clientSubscriptionInfo.setFromClerk(clerk.getApiClerk());
clientSubscriptionInfo.setToClerk(toClerk.getApiClerk());
saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo);
//save clientSubscription to the listening UDDI default server.
juddiApiService.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
logger.debug("Saved ClientSubscriptionInfo to the default UDDI server");
//the listening server is ready; now add the subscription
Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
List<org.uddi.sub_v3.Subscription> subscriptionList = new ArrayList<org.uddi.sub_v3.Subscription>();
org.uddi.sub_v3.Subscription subscription = new org.uddi.sub_v3.Subscription();
if (!"".equals(modelSubscription.getBindingKey())) {
subscription.setBindingKey(modelSubscription.getBindingKey());
}