You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/05/12 17:06:18 UTC

svn commit: r1481579 - in /juddi/branches/juddi-3.2.x: juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ juddi-gui/nbproject/ juddi-gui/web/ juddi-gui/web/ajax/

Author: alexoree
Date: Sun May 12 15:06:17 2013
New Revision: 1481579

URL: http://svn.apache.org/r1481579
Log:
Adding changes to exception handling for UDDI2WSDL
importFromWsdl.jsp for juddi-gui, previews now work, but saves are NYI

Added:
    juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MockSSLSocketFactory.java
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/importFromWsdl.jsp
Modified:
    juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java
    juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java
    juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java
    juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java
    juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java
    juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java
    juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
    juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java
    juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml
    juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties
    juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties
    juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml
    juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/importFromWsdl.jsp

Added: juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MockSSLSocketFactory.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MockSSLSocketFactory.java?rev=1481579&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MockSSLSocketFactory.java (added)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MockSSLSocketFactory.java Sun May 12 15:06:17 2013
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.v3.client.mapping;
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+
+import org.apache.http.conn.ssl.TrustStrategy;
+import org.apache.http.conn.ssl.X509HostnameVerifier;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class MockSSLSocketFactory extends SSLSocketFactory {
+
+    public MockSSLSocketFactory() throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
+        super(trustStrategy, hostnameVerifier);
+    }
+    private static final X509HostnameVerifier hostnameVerifier = new X509HostnameVerifier() {
+        @Override
+        public void verify(String host, SSLSocket ssl) throws IOException {
+            // Do nothing
+        }
+
+        @Override
+        public void verify(String host, X509Certificate cert) throws SSLException {
+            //Do nothing
+        }
+
+        @Override
+        public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
+            //Do nothing
+        }
+
+        @Override
+        public boolean verify(String s, SSLSession sslSession) {
+            return true;
+        }
+    };
+    private static final TrustStrategy trustStrategy = new TrustStrategy() {
+        @Override
+        public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+            return true;
+        }
+    };
+}
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java Sun May 12 15:06:17 2013
@@ -37,9 +37,10 @@ import com.ibm.wsdl.factory.WSDLFactoryI
  */
 public class ReadWSDL {
 	
+        private boolean IgnoreSSLErrors = false;
 	private final Log log = LogFactory.getLog(this.getClass());
 	
-	public Definition readWSDL(String fileName) throws WSDLException {
+	public Definition readWSDL(String fileName) throws Exception {
             
 		Definition wsdlDefinition = null;
 		WSDLFactory factory = WSDLFactoryImpl.newInstance();
@@ -65,20 +66,34 @@ public class ReadWSDL {
          * @return a Definition object representing the WSDL
          * @throws WSDLException 
          */
-        public Definition readWSDL(URL wsdlUrl, String username, String password) throws WSDLException {
+        public Definition readWSDL(URL wsdlUrl, String username, String password) throws WSDLException, Exception {
 	
 		Definition wsdlDefinition = null;
 		WSDLFactory factory = WSDLFactoryImpl.newInstance();
 		WSDLReader reader = factory.newWSDLReader();
+                URI uri=null;
 		try {
-			URI uri = wsdlUrl.toURI();
-			WSDLLocator locator = new WSDLLocatorImpl(uri);
-			wsdlDefinition = reader.readWSDL(locator);
-		} catch (URISyntaxException e) {
+                        uri = wsdlUrl.toURI();
+                } catch (Exception e) {
 			log.error(e.getMessage(),e);
+                        throw new WSDLException("Unable to parse the URL", null, e);
+		}
+		WSDLLocatorImpl locator = new WSDLLocatorImpl(uri, username, password, IgnoreSSLErrors );
+                try{
+			wsdlDefinition = reader.readWSDL(locator);
+		} catch (Exception e) {
+                        log.error(e.getMessage(),e);
+                        if (locator.getLastException()!=null)
+                        {
+                            log.error(e.getMessage(),locator.getLastException());
+                            throw locator.getLastException();
+                        }
+                        throw e;
+                        //throw new WSDLException("Error loading from " + wsdlUrl.toString(), null, e);
 		}
 		return wsdlDefinition;
 	}
+        
         /**
          * Reads a WSDL file, assumes that credentials are not required. This is a convenience wrapper for
          * readWSDL(URL wsdlUrl, null, null, null)
@@ -86,9 +101,17 @@ public class ReadWSDL {
          * @return a Definition object representing the WSDL
          * @throws WSDLException 
          */
-	public Definition readWSDL(URL wsdlUrl) throws WSDLException {
+	public Definition readWSDL(URL wsdlUrl) throws Exception {
 		return readWSDL(wsdlUrl, null, null);
 	}
+
+    public boolean isIgnoreSSLErrors() {
+        return IgnoreSSLErrors;
+    }
+
+    public void setIgnoreSSLErrors(boolean IgnoreSSLErrors) {
+        this.IgnoreSSLErrors = IgnoreSSLErrors;
+    }
 	
 	
 	

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java Sun May 12 15:06:17 2013
@@ -50,7 +50,7 @@ public class ServiceLocator {
 	private UDDIServiceCache serviceCache = null;
 	private SelectionPolicy selectionPolicy = null;
 	
-	public ServiceLocator(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties) throws ClassNotFoundException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, DatatypeConfigurationException, MalformedURLException, RemoteException, ConfigurationException, WSDLException, TransportException {
+	public ServiceLocator(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties) throws ClassNotFoundException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, DatatypeConfigurationException, MalformedURLException, RemoteException, ConfigurationException, WSDLException, TransportException, Exception {
 		super();
 
 		this.clerk = clerk;

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java Sun May 12 15:06:17 2013
@@ -67,7 +67,7 @@ public class UDDIServiceCache {
 		this.clerk = clerk;
 	}
 
-	public UDDIServiceCache(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties) throws DatatypeConfigurationException, MalformedURLException, RemoteException, ConfigurationException, WSDLException, TransportException {
+	public UDDIServiceCache(UDDIClerk clerk, URLLocalizer urlLocalizer, Properties properties) throws DatatypeConfigurationException, MalformedURLException, RemoteException, ConfigurationException, WSDLException, TransportException, Exception {
 		super();
 		this.clerk = clerk;
 		this.urlLocalizer = urlLocalizer;
@@ -77,7 +77,7 @@ public class UDDIServiceCache {
 		init();
 	}
 
-	private void init() throws DatatypeConfigurationException, MalformedURLException, WSDLException, RemoteException, ConfigurationException, TransportException {
+	private void init() throws DatatypeConfigurationException, MalformedURLException, WSDLException, RemoteException, ConfigurationException, TransportException, Exception {
 		
 		QName serviceQName = new QName("urn:uddi-org:v3_service", "UDDIClientSubscriptionListenerService");
 		String portName = "UDDIClientSubscriptionListenerImplPort";

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java Sun May 12 15:06:17 2013
@@ -22,32 +22,34 @@ import java.io.InputStream;
 import java.io.StringReader;
 import java.net.URI;
 import java.net.URL;
-
 import javax.wsdl.xml.WSDLLocator;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.client.methods.HttpGet;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeRegistry;
 import org.apache.http.impl.client.BasicResponseHandler;
 import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.BasicClientConnectionManager;
 import org.xml.sax.InputSource;
 
 /**
  * Implementation of the interface {@link WSDLLocatorImpl}.
  *
- * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a> Modified for
- * supporting http based credentials by Alex O'Ree
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a> 
+ * @author Alex O'Ree - Modified for supporting http based credentials 
  */
 public class WSDLLocatorImpl implements WSDLLocator {
-
+    private Exception lastException=null;
     private final Log log = LogFactory.getLog(this.getClass());
     private InputStream inputStream = null;
     private URI baseURI;
+    private boolean ignoreSSLErrors = false;
     private String latestImportURI;
     private String username = null, password = null;
 
@@ -59,6 +61,7 @@ public class WSDLLocatorImpl implements 
      */
     public WSDLLocatorImpl(URI baseURI) {
         this.baseURI = baseURI;
+        this.ignoreSSLErrors = ignoreSSLErrors;
     }
 
     /**
@@ -71,10 +74,11 @@ public class WSDLLocatorImpl implements 
      * @param password
      * @param domain
      */
-    public WSDLLocatorImpl(URI baseURI, String username, String password) {
+    public WSDLLocatorImpl(URI baseURI, String username, String password, boolean ignoreSSLErrors) {
         this.baseURI = baseURI;
         this.username = username;
         this.password = password;
+        this.ignoreSSLErrors = ignoreSSLErrors;
     }
 
     /**
@@ -116,23 +120,35 @@ public class WSDLLocatorImpl implements 
 
     private InputSource getImportFromUrl(String url) {
         InputSource inputSource = null;
-        DefaultHttpClient httpclient = new DefaultHttpClient();
+        DefaultHttpClient httpclient = null;
         try {
             URL url2 = new URL(url);
             if (!url.toLowerCase().startsWith("http")) {
                 return getImportFromFile(url);
             }
+            boolean usessl = false;
+            int port = 80;
+            if (url.toLowerCase().startsWith("https://")) {
+                port = 443;
+                usessl = true;
+            }
+
+            if (url2.getPort() > 0) {
+                port = url2.getPort();
+            }
+
+            if (ignoreSSLErrors && usessl) {
+                SchemeRegistry schemeRegistry = new SchemeRegistry();
+                schemeRegistry.register(new Scheme("https", port, new MockSSLSocketFactory()));
+                ClientConnectionManager cm = new BasicClientConnectionManager(schemeRegistry);
+                httpclient = new DefaultHttpClient(cm);
+            } else {
+                httpclient = new DefaultHttpClient();
+            }
 
             if (username != null && username.length() > 0
                     && password != null && password.length() > 0) {
-                int port = 80;
-                if (url.toLowerCase().startsWith("https://")) {
-                    port = 443;
-                }
-
-                if (url2.getPort() > 0) {
-                    port = url2.getPort();
-                }
+
 
                 httpclient.getCredentialsProvider().setCredentials(
                         new AuthScope(url2.getHost(), port),
@@ -162,8 +178,11 @@ public class WSDLLocatorImpl implements 
             latestImportURI = url;
         } catch (Exception e) {
             log.error(e.getMessage(), e);
+            lastException = e;
         } finally {
-            httpclient.getConnectionManager().shutdown();
+            if (httpclient != null) {
+                httpclient.getConnectionManager().shutdown();
+            }
         }
         return inputSource;
     }
@@ -178,6 +197,7 @@ public class WSDLLocatorImpl implements 
             return getImportFromUrl(importUrl.toExternalForm());
         } catch (Exception e) {
             log.error(e.getMessage(), e);
+            lastException=e;
         }
         return inputSource;
     }
@@ -191,6 +211,7 @@ public class WSDLLocatorImpl implements 
             baseURIStr = baseURI.toURL().toExternalForm();
         } catch (IOException e) {
             log.error(e.getMessage(), e);
+            lastException=e;
         }
         return baseURIStr;
     }
@@ -211,6 +232,7 @@ public class WSDLLocatorImpl implements 
                 inputStream.close();
             } catch (IOException e) {
                 log.error(e.getMessage(), e);
+                lastException=e;
             }
         }
     }
@@ -224,7 +246,17 @@ public class WSDLLocatorImpl implements 
             latestImportURI = importUrl.toExternalForm();
         } catch (Exception e) {
             log.error(e.getMessage(), e);
+            lastException=e;
         }
         return inputSource;
     }
+    
+    /**
+     * Returns the last exception or null if there wasn't any. This was done because the authors of WSDLLocator apparently thought it would always work
+     * @return 
+     */
+    public Exception getLastException()
+    {
+        return lastException;
+    }
 }

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java Sun May 12 15:06:17 2013
@@ -59,7 +59,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testTN_WSDLPortTypeModels() throws WSDLException, JAXBException {
+	public void testTN_WSDLPortTypeModels() throws WSDLException, JAXBException, Exception {
 
 		// Reading the WSDL
 		Definition wsdlDefinition = rw.readWSDL("bpel/bpel-technote.wsdl");
@@ -74,7 +74,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testTN_BPEL4WSProcessTModel() throws WSDLException, JAXBException {
+	public void testTN_BPEL4WSProcessTModel() throws WSDLException, JAXBException, Exception {
 
 		// Obtained from the .bpel file:
 		String targetNamespace = "http://example.com/travelagent";
@@ -108,7 +108,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testHelloWorld_WSDLPortTypeModels() throws WSDLException, JAXBException {
+	public void testHelloWorld_WSDLPortTypeModels() throws WSDLException, JAXBException , Exception{
 
 		// Reading the WSDL
 		Definition wsdlDefinition = rw.readWSDL("bpel/HelloWorld.wsdl");
@@ -124,7 +124,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testHelloWorld_UDDIBindingModel() throws WSDLException, JAXBException {
+	public void testHelloWorld_UDDIBindingModel() throws WSDLException, JAXBException, Exception {
 
 		// Reading the WSDL
 		Definition wsdlDefinition = rw.readWSDL("bpel/HelloWorld.wsdl");
@@ -140,7 +140,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testHelloWorld_BPEL4WSProcessTModel() throws WSDLException, JAXBException {
+	public void testHelloWorld_BPEL4WSProcessTModel() throws WSDLException, JAXBException , Exception{
 
 		//Obtained from the .bpel file:
 		String targetNamespace = "http://www.jboss.org/bpel/examples";
@@ -161,7 +161,7 @@ public class BPEL2UDDITest {
 	}
 	
 	@Test
-	public void testHelloWorld_BPELBinding() throws WSDLException, JAXBException, MalformedURLException {
+	public void testHelloWorld_BPELBinding() throws WSDLException, JAXBException, MalformedURLException, Exception {
 
 		//Obtained from the .bpel file:
 		String portName = "HelloPort";

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java Sun May 12 15:06:17 2013
@@ -30,7 +30,7 @@ import org.junit.Test;
 public class ReadWSDLTest {
 
     @Test
-    public void readFromFile() throws WSDLException, URISyntaxException {
+    public void readFromFile() throws WSDLException, URISyntaxException , Exception{
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL("wsdl/HelloWorld.wsdl");
@@ -38,7 +38,7 @@ public class ReadWSDLTest {
     }
 
     @Test
-    public void readFromURL() throws WSDLException, URISyntaxException, MalformedURLException {
+    public void readFromURL() throws WSDLException, URISyntaxException, MalformedURLException, Exception {
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL(new URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl"));
@@ -46,7 +46,7 @@ public class ReadWSDLTest {
     }
 
     @Test
-    public void readFromJar() throws WSDLException, URISyntaxException {
+    public void readFromJar() throws WSDLException, URISyntaxException, Exception {
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL("uddi_v3_service.wsdl");

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java Sun May 12 15:06:17 2013
@@ -41,7 +41,7 @@ public class WSDL2UDDITest {
 	ReadWSDL rw = new ReadWSDL();
 	
 	@Test
-	public void testUDDIBindingModel() throws WSDLException, JAXBException, ConfigurationException {
+	public void testUDDIBindingModel() throws WSDLException, JAXBException, ConfigurationException , Exception{
 
 		// Reading the WSDL
 		Definition wsdlDefinition = rw.readWSDL("wsdl/HelloWorld.wsdl");
@@ -64,7 +64,7 @@ public class WSDL2UDDITest {
 	}
 	
 	@Test
-	public void testWSDLBindingModel() throws WSDLException, JAXBException, ConfigurationException {
+	public void testWSDLBindingModel() throws WSDLException, JAXBException, ConfigurationException, Exception {
 
 		// Reading the WSDL
 		Definition wsdlDefinition = rw.readWSDL("wsdl/HelloWorld.wsdl");

Modified: juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java Sun May 12 15:06:17 2013
@@ -53,7 +53,7 @@ public class WSDLinaUDDIRegistryTest {
 	
 	
 	@BeforeClass
-	public static void before() {
+	public static void before() throws Exception{
 		try {
 			wsdlDefinition = rw.readWSDL("wsdl/sample.wsdl");
 			properties.put("keyDomain", "uddi.joepublisher.com");

Modified: juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml Sun May 12 15:06:17 2013
@@ -1016,6 +1016,8 @@ exists or setup the property manually. F
         <copyfiles files="${file.reference.woodstox-core-asl-4.0.8.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.wsdl4j-1.6.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.xml-resolver-1.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.httpclient-4.2.5.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.httpcore-4.2.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <mkdir dir="${build.web.dir}/META-INF"/>
         <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
@@ -1062,6 +1064,8 @@ exists or setup the property manually. F
         <copyfiles files="${file.reference.woodstox-core-asl-4.0.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.wsdl4j-1.6.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.xml-resolver-1.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.httpclient-4.2.5.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.httpcore-4.2.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
     </target>
     <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
         <delete dir="${build.web.dir}/WEB-INF/lib"/>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties Sun May 12 15:06:17 2013
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=a17592f3
+build.xml.data.CRC32=50026b8a
 build.xml.script.CRC32=33f4ab89
 build.xml.stylesheet.CRC32=651128d4@1.38.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=a17592f3
-nbproject/build-impl.xml.script.CRC32=6a921c0b
+nbproject/build-impl.xml.data.CRC32=50026b8a
+nbproject/build-impl.xml.script.CRC32=9390a50e
 nbproject/build-impl.xml.stylesheet.CRC32=4e9cae83@1.38.1.1

Modified: juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties Sun May 12 15:06:17 2013
@@ -49,6 +49,8 @@ file.reference.cxf-rt-transports-http-2.
 file.reference.cxf-rt-ws-addr-2.3.1.jar=../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/cxf-rt-ws-addr-2.3.1.jar
 file.reference.cxf-tools-common-2.3.1.jar=../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/cxf-tools-common-2.3.1.jar
 file.reference.geronimo-javamail_1.4_spec-1.7.1.jar=../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar
+file.reference.httpclient-4.2.5.jar=..\\juddi-tomcat\\target\\tomcat\\apache-tomcat-6.0.26\\webapps\\juddiv3\\WEB-INF\\lib\\httpclient-4.2.5.jar
+file.reference.httpcore-4.2.4.jar=..\\juddi-tomcat\\target\\tomcat\\apache-tomcat-6.0.26\\webapps\\juddiv3\\WEB-INF\\lib\\httpcore-4.2.4.jar
 file.reference.jaxb-impl-2.1.13.jar=../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/jaxb-impl-2.1.13.jar
 file.reference.juddi-client-3.1.5-SNAPSHOT.jar=../juddi-client/target/juddi-client-3.1.5-SNAPSHOT.jar
 file.reference.neethi-2.0.4.jar=../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/neethi-2.0.4.jar
@@ -117,7 +119,9 @@ javac.classpath=\
     ${file.reference.uddi-ws-3.1.5-SNAPSHOT.jar}:\
     ${file.reference.woodstox-core-asl-4.0.8.jar}:\
     ${file.reference.wsdl4j-1.6.2.jar}:\
-    ${file.reference.xml-resolver-1.2.jar}
+    ${file.reference.xml-resolver-1.2.jar}:\
+    ${file.reference.httpclient-4.2.5.jar}:\
+    ${file.reference.httpcore-4.2.4.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=
 javac.debug=true

Modified: juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml Sun May 12 15:06:17 2013
@@ -174,6 +174,14 @@
                     <file>${file.reference.xml-resolver-1.2.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
+                <library dirs="200">
+                    <file>${file.reference.httpclient-4.2.5.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.httpcore-4.2.4.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
             </web-module-libraries>
             <web-module-additional-libraries/>
             <source-roots>

Added: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/importFromWsdl.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/importFromWsdl.jsp?rev=1481579&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/importFromWsdl.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/importFromWsdl.jsp Sun May 12 15:06:17 2013
@@ -0,0 +1,116 @@
+<%-- 
+    Document   : importFromWsdl
+    Created on : May 11, 2013, 3:26:42 PM
+    Author     : Alex O'Ree
+--%>
+<%@page import="java.util.ArrayList"%>
+<%@page import="java.util.List"%>
+<%@page import="org.apache.juddi.webconsole.hub.builders.Printers"%>
+<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
+<%@page import="java.util.Set"%>
+<%@page import="javax.xml.namespace.QName"%>
+<%@page import="javax.wsdl.PortType"%>
+<%@page import="java.util.Map"%>
+<%@page import="org.uddi.api_v3.BusinessServices"%>
+<%@page import="org.apache.juddi.v3.client.mapping.WSDL2UDDI"%>
+<%@page import="org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl"%>
+<%@page import="java.util.Properties"%>
+<%@page import="javax.wsdl.Definition"%>
+<%@page import="org.apache.juddi.v3.client.mapping.ReadWSDL"%>
+<%@page import="org.apache.juddi.v3.client.config.UDDIClerk"%>
+<%@page import="org.uddi.api_v3.TModel"%>
+<%@page import="java.net.URL"%>
+<%@include  file="../csrf.jsp" %>
+<%
+    if (request.getMethod().equalsIgnoreCase("POST")) {
+        String method = request.getParameter("formaction");
+        if (method != null && method.length() > 0) {
+            if (method.equalsIgnoreCase("preview")) {
+                //Fetch the WSDL w/wo credentials
+                String uri = request.getParameter("wsdlurl");
+                String username = request.getParameter("wsdlusername");
+                String password = request.getParameter("wsdlpassword");
+                String keydomain = request.getParameter("keydomain");
+                String businessname = request.getParameter("businessname");
+                boolean ignoreSSL = false;
+                try{
+                    ignoreSSL = Boolean.parseBoolean(request.getParameter("ignoressl"));
+                }catch (Exception ex){}
+                try {
+                    URL url = new URL(uri);
+                    //"http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl");
+                    String domain = url.getHost();
+                    //TModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
+
+                    ReadWSDL rw = new ReadWSDL();
+                    rw.setIgnoreSSLErrors(ignoreSSL);
+                    Definition wsdlDefinition = rw.readWSDL(url, username, password);
+                    Properties properties = new Properties();
+                    properties.put("keyDomain", keydomain);
+                    properties.put("businessName", businessname);
+                    properties.put("serverName", url.getHost());
+                    properties.put("serverPort", url.getPort());
+                    String wsdlURL = wsdlDefinition.getDocumentBaseURI();
+                    WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
+                    BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
+                    @SuppressWarnings("unchecked")
+                    Map<QName, PortType> portTypes = (Map<QName, PortType>) wsdlDefinition.getAllPortTypes();
+                    Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
+                    Map allBindings = wsdlDefinition.getAllBindings();
+                    Set<TModel> bindingTmodels = wsdl2UDDI.createWSDLBindingTModels(wsdlURL, allBindings);
+                    List<TModel> tmodels = new ArrayList<TModel>();
+                    tmodels.addAll(bindingTmodels);
+                    tmodels.addAll(portTypeTModels);
+
+                    out.write("<i class=\"icon-thumbs-up icon-large\"></i> WSDL successfully parsed! This will create " + portTypeTModels.size()
+                            + " portType tmodel(s), " + bindingTmodels.size()
+                            + " binding tModel(s), " + allBindings.size()
+                            + " binding(s), and " + businessServices.getBusinessService().size() + " service(s).<br>");
+                    out.write("Services:<br><ul>");
+                    for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
+                        out.write("<li>Key:"
+                                + StringEscapeUtils.escapeHtml(businessServices.getBusinessService().get(i).getServiceKey())
+                                + " <br>Name: "
+                                + StringEscapeUtils.escapeHtml(Printers.ListNamesToString(businessServices.getBusinessService().get(i).getName())));
+                        if (businessServices.getBusinessService().get(i).getBindingTemplates() != null) {
+                            out.write("<br>Binding Templates:<ul>");
+                            for (int k = 0; k < businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().size(); k++) {
+                                out.write("<li>Key: " + StringEscapeUtils.escapeHtml(businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().get(k).getBindingKey())
+                                        + "<br>Access Point: ");
+                                if (businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().get(k).getAccessPoint() != null) {
+                                    out.write(StringEscapeUtils.escapeHtml(
+                                            businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().get(k).getAccessPoint().getValue()));
+                                }
+                                out.write("</li>");
+                            }
+                            out.write("</ul>");
+                        }
+                        out.write("</li>");
+                    }
+                    out.write("</ul>");
+
+                    out.write("tModels<br><ul>");
+                    for (int i = 0; i < tmodels.size(); i++) {
+                        out.write("<li>Key:"
+                                + StringEscapeUtils.escapeHtml(tmodels.get(i).getTModelKey())
+                                + " Name: "
+                                + StringEscapeUtils.escapeHtml(tmodels.get(i).getName().getValue())
+                                + "</li>");
+                    }
+                    out.write("</ul>");
+
+
+%>
+
+
+<%
+                } catch (Exception ex) {
+                    out.write("<i class=\"icon-thumbs-down icon-large\"></i> Error! " +ex.getClass().getCanonicalName() + " " + ex.getMessage());
+                }
+            }
+        }
+    }
+
+
+
+%>
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp Sun May 12 15:06:17 2013
@@ -478,7 +478,10 @@
                             }
                         %>
                         <br>
-                        <table class="table table-hover"><tr><th><%=ResourceLoader.GetResource(session, "items.key")%> </th><th><%=ResourceLoader.GetResource(session, "items.name")%></th><th><%=ResourceLoader.GetResource(session, "items.bindingtemplate")%></th></tr>
+                        <table class="table table-hover"><tr>
+                                <th><%=ResourceLoader.GetResource(session, "items.name")%> </th>
+                                <th><%=ResourceLoader.GetResource(session, "items.key")%></th>
+                                <th><%=ResourceLoader.GetResource(session, "items.bindingtemplate")%></th></tr>
                             <%
                                 if (bd.getBusinessServices() != null) {
                                     for (int i = 0; i < bd.getBusinessServices().getBusinessService().size(); i++) {

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/importFromWsdl.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/importFromWsdl.jsp?rev=1481579&r1=1481578&r2=1481579&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/importFromWsdl.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/importFromWsdl.jsp Sun May 12 15:06:17 2013
@@ -30,16 +30,16 @@
             <div class="accordion" id="accordion2">
                 <div class="accordion-group">
                     <div class="accordion-heading">
-                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
+                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse1">
                             Step 1)    WSDL Location and Credentials
                         </a>
                     </div>
-                    <div id="collapseTwo" class="accordion-body collapse in">
+                    <div id="collapse1" class="accordion-body collapse in">
                         <div class="accordion-inner">
                             The first step is to tell us where we can find the Web Service Description Language (WSDL) document that
                             describes your services' operations, inputs and outputs and execution URLs. If you don't know where to find it
                             you can usually add a '?wsdl' to the end of the URL to the service. WSDLs are XML documents.<br>
-                            <input type="text" placeholder="http://localhost:8080/services/myService?wsdl" style="width:100%" ><br>
+                            <input type="text" id="wsdlurl" placeholder="http://localhost:8080/services/myService?wsdl" style="width:100%" ><br>
                             Sometimes, access to the WSDL file is restricted by a username and password, if this is the case, enter
                             your credentials here. It won't be saved anywhere.<br>
                             <%
@@ -53,25 +53,138 @@
                             </div>
                             <%                                }
                             %>
-                            <input type="text" placeholder="username (optional)" ><br>
-                            <input type="text" placeholder="password (optional)" ><br>
+                            <input type="text" id="wsdlusername" placeholder="username (optional)" ><br>
+                            <input type="text" id="wsdlpassword" placeholder="password (optional)" ><br>
+                            <input type="checkbox" id="wsdlignoressl" > Ignore SSL Errors<br>
                         </div>
                     </div>
                 </div>
                 <script type="text/javascript">
+                 
+                    //by James Padolsey
+                    //http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
+                    function parseURL(url) {
+                        var a =  document.createElement('a');
+                        a.href = url;
+                        return {
+                            source: url,
+                            protocol: a.protocol.replace(':',''),
+                            host: a.hostname,
+                            port: a.port,
+                            query: a.search,
+                            params: (function(){
+                                var ret = {},
+                                seg = a.search.replace(/^\?/,'').split('&'),
+                                len = seg.length, i = 0, s;
+                                for (;i<len;i++) {
+                                    if (!seg[i]) { continue; }
+                                    s = seg[i].split('=');
+                                    ret[s[0]] = s[1];
+                                }
+                                return ret;
+                            })(),
+                            file: (a.pathname.match(/\/([^\/?#]+)$/i) || [,''])[1],
+                            hash: a.hash.replace('#',''),
+                            path: a.pathname.replace(/^([^\/])/,'/$1'),
+                            relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [,''])[1],
+                            segments: a.pathname.replace(/^\//,'').split('/')
+                        };
+                    }
+                    
                     //after is entered, fetch the wsdl, parse the key domain
+                    
                     //considerations, if its an ip address? what about localhost
+                    function trigger1()
+                    {
+                        var l = parseURL($("#wsdlurl").val());
+                        $("#keydomain").val(l.host);
+                        $("#collapse1").collapse('hide');
+                        $("#collapse2").collapse('show');
+                    }
+                    
+                    function preview()
+                    {
+                        var postbackdata = new Array();
+                        var url='ajax/importFromWsdl.jsp';
+                        postbackdata.push({
+                            name:"nonce", 
+                            value: $("#nonce").val()
+                        });
+                        postbackdata.push({
+                            name:"formaction", 
+                            value: "preview"
+                        });
+                        postbackdata.push({
+                            name:"wsdlusername", 
+                            value: $("#wsdlusername").val()
+                        });
+                        postbackdata.push({
+                            name:"wsdlpassword", 
+                            value: $("#wsdlpassword").val()
+                        });
+                        postbackdata.push({
+                            name:"wsdlurl", 
+                            value: $("#wsdlurl").val()
+                        });
+                        if($('#wsdlignoressl').is(':checked')) {
+                            postbackdata.push({
+                                name:"ignoressl", 
+                                value: true
+                            });
+                        }
+                        else
+                        {
+                            postbackdata.push({
+                                name:"ignoressl", 
+                                value: false
+                            }); 
+                        }
+                        postbackdata.push({
+                            name:"businessname", 
+                            value: $("#businessname").val()
+                        });
+                        
+                        postbackdata.push({
+                            name:"keydomain", 
+                            value: $("#keydomain").val()
+                        });
+                        
+                        
+                        
+                        
+                        var request=   $.ajax({
+                            url: url,
+                            type:"POST",
+                            //  dataType: "html", 
+                            cache: false, 
+                            //  processData: false,f
+                            data: postbackdata
+                        });
+                
+                
+                        request.done(function(msg) {
+                            window.console && console.log('postback done '  + url);                
+                            $("#preview").html(msg);
+                        });
+
+                        request.fail(function(jqXHR, textStatus) {
+                            window.console && console.log('postback failed ' + url);                                
+                            $("#preview").html(jqXHR + textStatus);
+       
+                        });
+                    }
+
                 </script>
                 <div class="accordion-group">
                     <div class="accordion-heading">
-                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
+                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse2" onclick="trigger1();">
                             Step 2)  Key Domain
                         </a>
                     </div>
-                    <div id="collapseOne" class="accordion-body collapse">
+                    <div id="collapse2" class="accordion-body collapse">
                         <div class="accordion-inner">
-                            Enter a key domain or select an existing tModel<br>
-                            <input type="text" placeholder="autofilled from the URL">
+                            Enter a key domain or select an existing tModel Key Generator. We'll make one if it doesn't exist<br>
+                            <input type="text" id="keydomain" placeholder="autofilled from the URL">
                         </div>
                     </div>
                 </div>
@@ -86,7 +199,9 @@
                         <div class="accordion-inner">
                             Create a new one or use an existing one
                             <br>
-                            Business Chooser or enter a new business name
+                            Business Chooser or enter a new business name<br>
+
+                            <input type="text" id="businessname" placeholder="Business Key">
                         </div>
                     </div>
                 </div>
@@ -96,12 +211,13 @@
                     <div class="accordion-heading">
                         <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse4">
                             Step 4) Review and Approve</a>
-
                     </div>
                     <div id="collapse4" class="accordion-body collapse">
                         <div class="accordion-inner">
                             Preview the new items and continue. Don't worry, you can always change these values later
                             <Br><br>
+                            <div id="preview"></div>
+                            <a class="btn btn-info" onclick="preview();"><i class="icon-eye-open icon-large"></i> Preview</a>
                             <a class="btn btn-primary" href="#"><i class="icon-save icon-large"></i> Approve</a>
                         </div>
                     </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org