T2-1084 retagging ui-activities-1.0 and ui-components-1.0
git-svn-id: https://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/tags/ui-activities-1.0/wsdl-activity-ui@9595 bf327186-88b3-11dd-a302-d386e5130c1c
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
index 9899b68..f83b76d 100644
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
+++ b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
@@ -112,42 +112,54 @@
*/
private void addPressed()
{
-
- String wsdlURLString = wsdlLocationField.getText();
-
- // Only add the service provider for this service if service URL starts with 'http'
- // or if it starts with 'https' and user explicitly said they wanted to trust this service.
- /*if (shouldTrust(wsdlURLString)){
- addRegistry(wsdlURLString);
- } */
- try {
- URL url = new URL(wsdlURLString);
- URLConnection connection = url.openConnection();
- try {
- // If the url starts with 'https' - security hook for https connection's trust manager
- // will be engaged and user will be asked automatically if they want
- // to trust the connection (if it is not already trusted). If the urls starts with 'http' -
- // this will not have any effect apart from checking if we can open a connection.
- connection.connect(); // if this does not fail - add the WSDL
- // service provider for this service to
- // the registry
- } finally {
+ final String wsdlURLString = wsdlLocationField.getText();
+ new Thread("Adding WSDL " + wsdlURLString) {
+ public void run() {
+ // Only add the service provider for this service if service URL
+ // starts with 'http'
+ // or if it starts with 'https' and user explicitly said they
+ // wanted to trust this service.
+ /*
+ * if (shouldTrust(wsdlURLString)){ addRegistry(wsdlURLString);
+ * }
+ */
try {
- connection.getInputStream().close();
- } catch (IOException ex) {
+ URL url = new URL(wsdlURLString);
+ URLConnection connection = url.openConnection();
+ try {
+ // If the url starts with 'https' - security hook for
+ // https connection's trust manager
+ // will be engaged and user will be asked automatically
+ // if they want
+ // to trust the connection (if it is not already
+ // trusted). If the urls starts with 'http' -
+ // this will not have any effect apart from checking if
+ // we can open a connection.
+ connection.connect(); // if this does not fail - add the
+ // WSDL
+ // service provider for this service to
+ // the registry
+ } finally {
+ try {
+ connection.getInputStream().close();
+ } catch (IOException ex) {
+ }
+ }
+ addRegistry(wsdlURLString);
+ } catch (Exception ex) { // anything failed
+ JOptionPane.showMessageDialog(null,
+ "Could not read the WSDL definition from "
+ + wsdlURLString + ":\n" + ex,
+ "Could not add WSDL service",
+ JOptionPane.ERROR_MESSAGE);
+
+ logger.error(
+ "Failed to add WSDL service provider for service: "
+ + wsdlURLString, ex);
+
}
- }
- addRegistry(wsdlURLString);
- } catch (Exception ex) { // anything failed
- JOptionPane.showMessageDialog(this,
- "Could not read the WSDL definition from " + wsdlURLString
- + ":\n" + ex,
- "Could not add WSDL service", JOptionPane.ERROR_MESSAGE);
-
- logger.error("Failed to add WSDL service provider for service: "
- + wsdlURLString, ex);
-
- }
+ };
+ }.start();
closeDialog();
}
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
index e4d1948..623bbfd 100644
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
+++ b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
@@ -69,13 +69,16 @@
"http://www.ebi.ac.uk/xembl/XEMBL.wsdl"));
defaults.add(new WSDLServiceProviderConfig(
"http://soap.genome.jp/KEGG.wsdl"));
+
+ // 2009-12-16: 503 server error
defaults
.add(new WSDLServiceProviderConfig(
"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl"));
+
defaults.add(new WSDLServiceProviderConfig(
"http://soap.bind.ca/wsdl/bind.wsdl"));
- // defaults.add(new WSDLServiceProviderConfig(
- // "http://www.ebi.ac.uk/ws/services/urn:Dbfetch?wsdl"));
+ defaults.add(new WSDLServiceProviderConfig(
+ "http://www.ebi.ac.uk/ws/services/urn:Dbfetch?wsdl"));
return defaults;
}