juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject [1/6] JUDDI-856 added but needs testing JUDDI-751 refactor for rmi, http and smtp
Date Fri, 28 Feb 2014 17:34:39 GMT
Repository: juddi
Updated Branches:
  refs/heads/master c11d3d877 -> 8eff90e46


http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpExternalTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpExternalTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpExternalTest.java
new file mode 100644
index 0000000..bc04c2a
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpExternalTest.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2014 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.tck;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+import java.util.Random;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.ws.Endpoint;
+import org.apache.commons.configuration.ConfigurationException;
+import static org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.logger;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class UDDI_090_HttpExternalTest extends UDDI_090_SubscriptionListenerIntegrationBase {
+
+        private static Endpoint endPoint=null;
+        private static String hostname=null;
+        private static int port = 0;
+
+        @AfterClass
+        public static void stop() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                stopManager();
+                endPoint.stop();
+                endPoint = null;
+
+        }
+
+        @BeforeClass
+        public static void startup() throws Exception {
+                if (!TckPublisher.isEnabled()) return;
+                startManager();
+                hostname = TckPublisher.getProperties().getProperty("bindaddress");
+                if (hostname == null) {
+                        hostname = InetAddress.getLocalHost().getHostName();
+                }
+                port = 9600;
+                //bring up the TCK SubscriptionListener
+                String httpEndpoint = "http://" + hostname + ":" + port + "/tcksubscriptionlistener";
+                System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+                endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                int count = 0;
+                while (!endPoint.isPublished()) {
+                        port = 9600 + new Random().nextInt(99);
+                        httpEndpoint = "http://" + hostname + ":" + port + "/tcksubscriptionlistener";
+                        System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+                        endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                        count++;
+                        if (count > 10) {
+                                Assert.fail("unable to bring up endpoint");
+                        }
+                }
+        }
+
+        @Override
+        public boolean verifyDelivery(String findMe) {
+                for (int i = 0; i < TckPublisher.getSubscriptionTimeout(); i++) {
+                        try {
+                                Thread.sleep(1000);
+                        } catch (InterruptedException ex) {
+                        }
+                        System.out.print(".");
+                        if (UDDISubscriptionListenerImpl.notificationCount > 0) {
+                        }
+                }
+                logger.info("RX " + UDDISubscriptionListenerImpl.notificationCount + " notifications");
+                Iterator<String> it = UDDISubscriptionListenerImpl.notifcationMap.values().iterator();
+                boolean found = false;
+
+                while (it.hasNext()) {
+                        String test = it.next();
+                        if (TckCommon.isDebug()) {
+                                logger.info("Notification: " + test);
+                        }
+                        if (test.toLowerCase().contains(findMe.toLowerCase())) {
+                                found = true;
+                        }
+                }
+                return found;
+        }
+
+        @Override
+        public void reset() {
+                UDDISubscriptionListenerImpl.notifcationMap.clear();
+                UDDISubscriptionListenerImpl.notificationCount = 0;
+        }
+
+        @Override
+        public String getXMLLocationOfServiceForDelivery() {
+                return TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML;
+        }
+
+        @Override
+        public String getTransport() {
+                return "HTTP_MAVEN";
+        }
+
+        @Override
+        public int getPort() {
+                return port;
+        }
+
+        @Override
+        public String getHostame() {
+                if (hostname == null) {
+                        hostname = TckPublisher.getProperties().getProperty("bindaddress");
+                        if (hostname == null) {
+                                try {
+                                        hostname = InetAddress.getLocalHost().getHostName();
+                                } catch (UnknownHostException ex) {
+                                        Logger.getLogger(UDDI_090_HttpExternalTest.class.getName()).log(Level.SEVERE, null, ex);
+                                }
+                        }
+                }
+                return hostname;
+        }
+
+        @Override
+        public String getSubscription1XML() {
+                return TckSubscriptionListener.SUBSCRIPTION_XML;
+        }
+
+        @Override
+        public String getSubscription2XML() {
+                return TckSubscriptionListener.SUBSCRIPTION2_XML;
+        }
+
+        @Override
+        public String getSubscription3XML() {
+                return TckSubscriptionListener.SUBSCRIPTION3_XML;
+        }
+
+        @Override
+        public String getSubscriptionKey1() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey2() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey3() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpMavenIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpMavenIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpMavenIntegrationTest.java
new file mode 100644
index 0000000..52f35e4
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_HttpMavenIntegrationTest.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2014 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.tck;
+
+import java.net.InetAddress;
+import java.util.Iterator;
+import java.util.Random;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.ws.Endpoint;
+import org.apache.commons.configuration.ConfigurationException;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class UDDI_090_HttpMavenIntegrationTest extends UDDI_090_SubscriptionListenerIntegrationBase {
+
+        private static Endpoint endPoint;
+        private static String hostname;
+        private static int port = 0;
+
+        @AfterClass
+        public static void stop() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                stopManager();
+                endPoint.stop();
+                endPoint = null;
+
+        }
+
+        @BeforeClass
+        public static void startup() throws Exception {
+
+                if (!TckPublisher.isEnabled()) return;
+                startManager();
+                hostname = "localhost";
+                //bring up the TCK SubscriptionListener
+                port = 9600;
+                String httpEndpoint = "http://" + hostname + ":" + port + "/tcksubscriptionlistener";
+                System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+                endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                int count = 0;
+                while (!endPoint.isPublished()) {
+                        port = 9600 + new Random().nextInt(99);
+                        httpEndpoint = "http://" + hostname + ":" + port + "/tcksubscriptionlistener";
+                        System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+                        endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                        count++;
+                        if (count > 10) {
+                                Assert.fail("unable to bring up endpoint");
+                        }
+                }
+        }
+
+        @Override
+        public boolean verifyDelivery(String findMe) {
+                for (int i = 0; i < TckPublisher.getSubscriptionTimeout(); i++) {
+                        try {
+                                Thread.sleep(1000);
+                        } catch (InterruptedException ex) {
+                        }
+                        System.out.print(".");
+                        //if (UDDISubscriptionListenerImpl.notificationCount > 0) {                        }
+                }
+                logger.info("RX " + UDDISubscriptionListenerImpl.notificationCount + " notifications");
+                Iterator<String> it = UDDISubscriptionListenerImpl.notifcationMap.values().iterator();
+                boolean found = false;
+
+                while (it.hasNext()) {
+                        String test = it.next();
+                        if (TckCommon.isDebug()) {
+                                logger.info("Notification: " + test);
+                        }
+                        if (test.toLowerCase().contains(findMe.toLowerCase())) {
+                                found = true;
+                        }
+                }
+                return found;
+        }
+
+        @Override
+        public void reset() {
+                UDDISubscriptionListenerImpl.notifcationMap.clear();
+                UDDISubscriptionListenerImpl.notificationCount = 0;
+        }
+
+        @Override
+        public String getXMLLocationOfServiceForDelivery() {
+                return TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML;
+        }
+
+        @Override
+        public String getTransport() {
+                return "HTTP_MAVEN";
+        }
+
+        @Override
+        public int getPort() {
+                return port;
+        }
+
+        @Override
+        public String getHostame() {
+                return hostname;
+        }
+
+        @Override
+        public String getSubscription1XML() {
+                return TckSubscriptionListener.SUBSCRIPTION_XML;
+        }
+
+        @Override
+        public String getSubscription2XML() {
+                return TckSubscriptionListener.SUBSCRIPTION2_XML;
+        }
+
+        @Override
+        public String getSubscription3XML() {
+                return TckSubscriptionListener.SUBSCRIPTION3_XML;
+        }
+
+        @Override
+        public String getSubscriptionKey1() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey2() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey3() {
+                return TckSubscriptionListener.SUBSCRIPTION_KEY;
+        }
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_RMIIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_RMIIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_RMIIntegrationTest.java
new file mode 100644
index 0000000..5e925a8
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_RMIIntegrationTest.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2014 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.tck;
+
+import java.net.InetAddress;
+import java.net.URI;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Iterator;
+import java.util.Random;
+import javax.xml.ws.Endpoint;
+import org.apache.commons.configuration.ConfigurationException;
+import static org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.logger;
+import static org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.startManager;
+import static org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.stopManager;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class UDDI_090_RMIIntegrationTest extends UDDI_090_SubscriptionListenerIntegrationBase {
+
+        private static UDDISubscriptionListenerImpl rmiSubscriptionListenerService = null;
+        private static TckSubscriptionListenerRMI rmiSubscriptionListener = null;
+        private static Registry registry;
+        private static Integer randomPort = null;
+        private static String hostname = null;
+
+        @AfterClass
+        public static void stop() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                stopManager();
+
+        }
+
+        @BeforeClass
+        public static void startup() throws Exception {
+
+                if (!TckPublisher.isEnabled()) return;
+                startManager();
+
+                randomPort = 19800 + new Random().nextInt(99);
+                System.out.println("RMI Random port=" + randomPort);
+                //bring up the RMISubscriptionListener
+                URI rmiEndPoint = new URI("rmi://localhost:" + randomPort + "/tck/rmisubscriptionlistener");
+                registry = LocateRegistry.createRegistry(rmiEndPoint.getPort());
+                String path = rmiEndPoint.getPath();
+                hostname = InetAddress.getLocalHost().getHostName();
+                //starting the service
+                rmiSubscriptionListenerService = new UDDISubscriptionListenerImpl(0);
+                //binding to the RMI Registry
+                registry.bind(path, rmiSubscriptionListenerService);
+
+                //double check that the service is bound in the local Registry
+                Registry registry2 = LocateRegistry.getRegistry(rmiEndPoint.getHost(), rmiEndPoint.getPort());
+                registry2.lookup(rmiEndPoint.getPath());
+
+        }
+
+        @Override
+        public boolean verifyDelivery(String findMe) {
+                for (int i = 0; i < TckPublisher.getSubscriptionTimeout(); i++) {
+                        try {
+                                Thread.sleep(1000);
+                        } catch (InterruptedException ex) {
+                        }
+                        System.out.print(".");
+                        //if (UDDISubscriptionListenerImpl.notificationCount > 0) {                        }
+                }
+                logger.info("RX " + UDDISubscriptionListenerImpl.notificationCount + " notifications");
+                Iterator<String> it = UDDISubscriptionListenerImpl.notifcationMap.values().iterator();
+                boolean found = false;
+
+                while (it.hasNext()) {
+                        String test = it.next();
+                        if (TckCommon.isDebug()) {
+                                logger.info("Notification: " + test);
+                        }
+                        if (test.toLowerCase().contains(findMe.toLowerCase())) {
+                                found = true;
+                        }
+                }
+                return found;
+        }
+
+        @Override
+        public void reset() {
+                UDDISubscriptionListenerImpl.notifcationMap.clear();
+                UDDISubscriptionListenerImpl.notificationCount = 0;
+
+        }
+
+        @Override
+        public String getXMLLocationOfServiceForDelivery() {
+                return TckSubscriptionListener.LISTENER_RMI_SERVICE_XML;
+        }
+
+        @Override
+        public String getTransport() {
+                return "RMI";
+        }
+
+        @Override
+        public int getPort() {
+                return randomPort;
+        }
+
+        @Override
+        public String getHostame() {
+                return hostname;
+        }
+
+        @Override
+        public String getSubscription1XML() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_XML_RMI;
+        }
+
+        @Override
+        public String getSubscription2XML() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_XML2_RMI;
+        }
+
+        @Override
+        public String getSubscription3XML() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_XML3_RMI;
+        }
+
+        @Override
+        public String getSubscriptionKey1() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_KEY_RMI;
+        }
+
+        @Override
+        public String getSubscriptionKey2() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_KEY_RMI;
+        }
+
+        @Override
+        public String getSubscriptionKey3() {
+                return TckSubscriptionListenerRMI.SUBSCRIPTION_KEY_RMI;
+        }
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_Smtp_ExternalTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_Smtp_ExternalTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_Smtp_ExternalTest.java
new file mode 100644
index 0000000..998bf19
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_Smtp_ExternalTest.java
@@ -0,0 +1,229 @@
+/*
+ * Copyright 2014 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.tck;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.Random;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.mail.Flags;
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.internet.MimeMessage;
+import javax.xml.ws.Endpoint;
+import org.apache.commons.codec.net.QuotedPrintableCodec;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.mail.util.MimeMessageParser;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class UDDI_090_Smtp_ExternalTest extends UDDI_090_SubscriptionListenerIntegrationBase {
+
+        public UDDI_090_Smtp_ExternalTest(){
+                super();
+        }
+        @AfterClass
+        public static void stop() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                stopManager();
+
+        }
+
+        @BeforeClass
+        public static void start() throws Exception {
+                if (!TckPublisher.isEnabled()) return;
+                startManager();
+                email = TckPublisher.getProperties().getProperty("mail.pop3.to");
+        }
+
+        static String  email = TckPublisher.getProperties().getProperty("mail.pop3.to");
+
+        @Override
+        public boolean verifyDelivery(String findMe) {
+                logger.info("Waiting " + TckPublisher.getSubscriptionTimeout() + " seconds for delivery, searching for " + findMe);
+                boolean received = false;
+                for (int i = 0; i < TckPublisher.getSubscriptionTimeout(); i++) {
+                        try {
+                                Thread.sleep(1000);
+                        } catch (InterruptedException ex) {
+                        }
+                        System.out.print(".");
+                        if (fetchMail(findMe) > 0) {
+                                logger.info("Received Email Notification");
+                                received = true;
+                                break;
+                        }
+                }
+                return received;
+        }
+
+        @Override
+        public void reset() {
+
+        }
+
+        @Override
+        public String getXMLLocationOfServiceForDelivery() {
+                return TckSubscriptionListener.LISTENER_SMTP_SERVICE_EXTERNAL_XML;
+        }
+
+        @Override
+        public String getTransport() {
+                return "SMTP";
+        }
+
+        @Override
+        public int getPort() {
+                return 0;
+        }
+
+        @Override
+        public String getHostame() {
+                return TckPublisher.getProperties().getProperty("mail.pop3.to");
+        }
+
+        /**
+         * gets all current messages from the mail server and returns the number
+         * of messages containing the string, messages containing the string are
+         * deleted from the mail server String is the body of each message
+         *
+         * @return number of matching and deleted messages
+         * @param contains a string to search for
+         */
+        private static int fetchMail(String contains) {
+
+                //final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
+
+                /* Set the mail properties */
+                Properties properties = TckPublisher.getProperties();
+                // Set manual Properties
+
+                int found = 0;
+                Session session = Session.getDefaultInstance(properties, null);
+                Store store = null;
+                try {
+                        store = session.getStore("pop3");
+
+                        store.connect(properties.getProperty("mail.pop3.host"), Integer.parseInt(properties.getProperty("mail.pop3.port", "110")), properties.getProperty("mail.pop3.username"), properties.getProperty("mail.pop3.password"));
+                        /* Mention the folder name which you want to read. */
+                        // inbox = store.getDefaultFolder();
+                        // inbox = inbox.getFolder("INBOX");
+                        Folder inbox = store.getFolder("INBOX");
+
+                        /* Open the inbox using store. */
+                        inbox.open(Folder.READ_WRITE);
+
+                        Message messages[] = inbox.getMessages();
+
+                        for (int i = 0; i < messages.length; i++) {
+
+                                MimeMessageParser p = new MimeMessageParser(new MimeMessage(session, messages[i].getInputStream()));
+                                Enumeration allHeaders = p.getMimeMessage().getAllHeaders();
+                                while (allHeaders.hasMoreElements()) {
+                                        Object j = allHeaders.nextElement();
+                                        if (j instanceof javax.mail.Header) {
+                                                javax.mail.Header msg = (javax.mail.Header) j;
+                                                logger.info("XML as message header is " + msg.getValue());
+                                                if (msg.getValue().contains(contains)) {
+                                                        //found it
+                                                        messages[i].setFlag(Flags.Flag.DELETED, true);
+                                                        found++;
+                                                }
+                                        }
+                                }
+                                for (int k = 0; k < p.getAttachmentList().size(); k++) {
+                                        InputStream is = p.getAttachmentList().get((k)).getInputStream();
+                                        QuotedPrintableCodec qp = new QuotedPrintableCodec();
+                                        // If "is" is not already buffered, wrap a BufferedInputStream
+                                        // around it.
+                                        if (!(is instanceof BufferedInputStream)) {
+                                                is = new BufferedInputStream(is);
+                                        }
+                                        int c;
+                                        StringBuilder sb = new StringBuilder();
+                                        System.out.println("Message : ");
+                                        while ((c = is.read()) != -1) {
+                                                sb.append(c);
+                                                System.out.write(c);
+                                        }
+                                        is.close();
+                                        String decoded = qp.decode(sb.toString());
+                                        logger.info("decode message is " + decoded);
+                                        if (decoded.contains(contains)) {
+                                                //found it
+                                                messages[i].setFlag(Flags.Flag.DELETED, true);
+                                                found++;
+                                        }
+                                }
+
+                        }
+                        inbox.close(true);
+
+                } catch (Exception ex) {
+                        ex.printStackTrace();
+                } finally {
+                        if (store != null) {
+                                try {
+                                        store.close();
+                                } catch (Exception ex) {
+                                }
+                        }
+                }
+                return found;
+        }
+
+        @Override
+        public String getSubscription1XML() {
+                 return TckSubscriptionListener.SUBSCRIPTION_SMTP_XML;
+        }
+
+        @Override
+        public String getSubscription2XML() {
+                 return TckSubscriptionListener.SUBSCRIPTION2_SMTP_XML;
+        }
+
+        @Override
+        public String getSubscription3XML() {
+                return  TckSubscriptionListener.SUBSCRIPTION3_SMTP_XML;
+        }
+
+        @Override
+        public String getSubscriptionKey1() {
+                return TckSubscriptionListener.SUBSCRIPTION_SMTP_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey2() {
+                return TckSubscriptionListener.SUBSCRIPTION_SMTP_KEY;
+        }
+
+        @Override
+        public String getSubscriptionKey3() {
+                return TckSubscriptionListener.SUBSCRIPTION_SMTP_KEY;
+        }
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java
index 7db18e9..95b789d 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java
@@ -115,7 +115,7 @@ public class UDDI_090_SubscriptionListenerExternalTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 tckTModelMary.deleteCreatedTModels(authInfoMary);
                 manager.stop();
@@ -126,7 +126,7 @@ public class UDDI_090_SubscriptionListenerExternalTest {
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 try {
                         httpPort = 9600 + new Random().nextInt(99);
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationBase.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationBase.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationBase.java
new file mode 100644
index 0000000..54e624a
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationBase.java
@@ -0,0 +1,509 @@
+/*
+ * Copyright 2014 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.tck;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.juddi.v3.client.config.UDDIClient;
+import org.apache.juddi.v3.client.transport.Transport;
+import static org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerExternalTest.updatePublisherBusiness;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.uddi.api_v3.BusinessEntity;
+import org.uddi.api_v3.Description;
+import org.uddi.api_v3.GetBusinessDetail;
+import org.uddi.api_v3.GetTModelDetail;
+import org.uddi.api_v3.SaveTModel;
+import org.uddi.api_v3.TModel;
+import org.uddi.sub_v3.DeleteSubscription;
+import org.uddi.sub_v3.Subscription;
+import org.uddi.sub_v3.SubscriptionFilter;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public abstract class UDDI_090_SubscriptionListenerIntegrationBase {
+
+        protected static Log logger = LogFactory.getLog(UDDI_090_SubscriptionListenerIntegrationBase.class);
+        private static UDDISubscriptionPortType subscriptionMary = null;
+        private static UDDIInquiryPortType inquiryMary = null;
+        private static TckTModel tckTModelMary = null;
+        private static TckBusiness tckBusinessMary = null;
+        private static TckBusinessService tckBusinessServiceMary = null;
+        private static TckSubscriptionListener tckSubscriptionListenerMary = null;
+        private static String hostname = null;
+        private static UDDISubscriptionPortType subscriptionJoe = null;
+        private static UDDIInquiryPortType inquiryJoe = null;
+        private static UDDIPublicationPortType publicationMary = null;
+        private static UDDIPublicationPortType publicationJoe = null;
+        private static TckTModel tckTModelJoe = null;
+        private static TckBusiness tckBusinessJoe = null;
+        private static TckBusinessService tckBusinessServiceJoe = null;
+        private static TckSubscriptionListener tckSubscriptionListenerJoe = null;
+
+        private static String authInfoJoe = null;
+        private static String authInfoMary = null;
+        private static UDDIClient manager;
+
+        public static void stopManager() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                tckTModelJoe.deleteCreatedTModels(authInfoJoe);
+                tckTModelMary.deleteCreatedTModels(authInfoMary);
+                manager.stop();
+                //shutting down the TCK SubscriptionListener
+
+        }
+
+        public static void startManager() throws ConfigurationException {
+                if (!TckPublisher.isEnabled()) return;
+                try {
+                        /*                 smtpPort = 9700 + new Random().nextInt(99);
+                         httpPort = 9600 + new Random().nextInt(99);
+                         Properties properties = new Properties();
+                         properties.setProperty("juddi.mail.smtp.host", "localhost");
+                         properties.setProperty("juddi.mail.smtp.port", String.valueOf(smtpPort));
+                         properties.setProperty("juddi.mail.smtp.from", "jUDDI@example.org");
+                         String version = Release.getRegistryVersion().replaceAll(".SNAPSHOT", "-SNAPSHOT");
+                         String curDir = System.getProperty("user.dir");
+                         if (!curDir.endsWith("uddi-tck")) {
+                         curDir += "/uddi-tck";
+                         }
+                         String path = curDir + "/target/juddi-tomcat-" + version + "/temp/";
+                         System.out.println("Saving jUDDI email properties to " + path);
+                         File tmpDir = new File(path);
+                         File tmpFile = new File(tmpDir + "/juddi-mail.properties");
+                         if (!tmpFile.createNewFile()) {
+                         tmpFile.delete();
+                         tmpFile.createNewFile();
+                         }
+                         properties.store(new FileOutputStream(tmpFile), "tmp email settings");
+                         */
+
+                        manager = new UDDIClient();
+                        manager.start();
+
+                        logger.debug("Getting auth tokens..");
+
+                        Transport transport = manager.getTransport("uddiv3");
+                        UDDISecurityPortType security = transport.getUDDISecurityService();
+                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        authInfoMary = TckSecurity.getAuthToken(security, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                        //Assert.assertNotNull(authInfoJoe);
+
+                        publicationJoe = transport.getUDDIPublishService();
+                        inquiryJoe = transport.getUDDIInquiryService();
+                        subscriptionJoe = transport.getUDDISubscriptionService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publicationJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiryJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) subscriptionJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+
+                        tckTModelJoe = new TckTModel(publicationJoe, inquiryJoe);
+                        tckBusinessJoe = new TckBusiness(publicationJoe, inquiryJoe);
+                        tckBusinessServiceJoe = new TckBusinessService(publicationJoe, inquiryJoe);
+                        tckSubscriptionListenerJoe = new TckSubscriptionListener(subscriptionJoe, publicationJoe);
+
+                        transport = manager.getTransport("uddiv3");
+                        publicationMary = transport.getUDDIPublishService();
+                        inquiryMary = transport.getUDDIInquiryService();
+                        subscriptionMary = transport.getUDDISubscriptionService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publicationMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiryMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) subscriptionMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                        }
+
+                        tckTModelMary = new TckTModel(publicationMary, inquiryMary);
+                        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+
+                        tckBusinessMary = new TckBusiness(publicationMary, inquiryMary);
+                        tckBusinessServiceMary = new TckBusinessService(publicationMary, inquiryMary);
+                        tckSubscriptionListenerMary = new TckSubscriptionListener(subscriptionMary, publicationMary);
+
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+
+        /**
+         * verifies the delivery of the notification, will block until timeout
+         * or success
+         *
+         * @param findMe
+         * @return true is success
+         */
+        public abstract boolean verifyDelivery(String findMe);
+
+        /**
+         * reform transport specific resets of the listener
+         */
+        public abstract void reset();
+
+        public abstract String getXMLLocationOfServiceForDelivery();
+
+        /**
+         * used for logging purposes
+         * @return 
+         */
+        public abstract String getTransport();
+
+        /**
+         * listener port
+         * @return 
+         */
+        public abstract int getPort();
+
+        /**
+         * either returns localhost hostname or an email or delivery address
+         * @return 
+         */
+        public abstract String getHostame();
+
+        @Test
+        public void joePublisherUpdate_FIND_SERVICE() {
+                Assume.assumeTrue(TckPublisher.isEnabled());
+                Assume.assumeNotNull(getHostame());
+                logger.info("joePublisherUpdate_" + getTransport() + "_FIND_SERVICE");
+                try {
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        String before = TckCommon.DumpAllServices(authInfoJoe, inquiryJoe);
+                        reset();
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        //Saving the binding template that will be called by the server for a subscription event
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        //Saving the HTTP Listener Service
+                        tckSubscriptionListenerJoe.saveService(authInfoJoe, getXMLLocationOfServiceForDelivery(), getPort(), getHostame());
+                        //Saving the HTTP Subscription
+                        String saveNotifierSubscription = tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe,getSubscription1XML());
+                        //Changing the service we subscribed to "JoePublisherService"
+                        Thread.sleep(1000);
+                        logger.info("Updating Service ********** ");
+                        tckBusinessServiceJoe.updateJoePublisherService(authInfoJoe, "Service One");
+
+                        boolean found = verifyDelivery("Service One");
+
+                        if (!found) {
+                                logger.warn("Test failed, dumping service list");
+                                logger.warn("BEFORE " + before);
+                                logger.warn("After " + TckCommon.DumpAllServices(authInfoJoe, inquiryJoe));
+                                //if (!UDDISubscriptionListenerImpl.notifcationMap.get(0).contains("<name xml:lang=\"en\">Service One</name>")) {
+                                Assert.fail("Notification does not contain the correct service");
+                        }
+                } catch (Exception e) {
+                        logger.error("No exceptions please.");
+                        e.printStackTrace();
+
+                        Assert.fail();
+                } finally {
+                        tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, getSubscriptionKey1());
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        @Test
+        public void joePublisherUpdate_FIND_BUSINESS() {
+                Assume.assumeTrue(TckPublisher.isEnabled());
+                Assume.assumeNotNull(getHostame());
+                logger.info("joePublisherUpdate_" + getTransport() + "_FIND_BUSINESS");
+                try {
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
+                        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);
+
+                        reset();
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        //Saving the Listener Service
+                        logger.info("Saving Joe's callback endpoint ********** ");
+                        tckSubscriptionListenerJoe.saveService(authInfoJoe, getXMLLocationOfServiceForDelivery(), getPort(), getHostame());
+                        //Saving the Subscription
+                        logger.info("Saving Joe's subscription********** ");
+                        tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, getSubscription2XML());
+                        //Changing the service we subscribed to "JoePublisherService"
+
+                        logger.info("Saving Mary's Business ********** ");
+                        tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
+
+                        boolean found = verifyDelivery("mary");
+
+                        if (!found) {
+                                logger.warn("Test failed, dumping business list");
+                                logger.warn("BEFORE " + before);
+                                logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
+                                Assert.fail("Notification does not contain the correct service");
+                        }
+                } catch (Exception e) {
+                        logger.error("No exceptions please.");
+                        e.printStackTrace();
+
+                        Assert.fail();
+                } finally {
+                        tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, getSubscriptionKey2());
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
+                        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                }
+        }
+
+        public abstract String getSubscription1XML();
+        public abstract String getSubscription2XML();
+        public abstract String getSubscription3XML();
+        public abstract String getSubscriptionKey1();
+        public abstract String getSubscriptionKey2();
+        public abstract String getSubscriptionKey3();
+        //tmodel tests
+        @Test
+        public void joePublisherUpdate_FIND_TMODEL() {
+                Assume.assumeTrue(TckPublisher.isEnabled());
+                Assume.assumeNotNull(getHostame());
+                logger.info("joePublisherUpdate_" + getTransport() + "_FIND_TMODEL " + getXMLLocationOfServiceForDelivery() + " " + getPort() + " " + getHostame());
+                TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                try {
+                        reset();
+
+                        String before = TckCommon.DumpAllTModels(authInfoJoe, inquiryJoe);
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        //Saving the Listener Service
+
+                        tckSubscriptionListenerJoe.saveService(authInfoJoe, getXMLLocationOfServiceForDelivery(), getPort(), getHostame());
+                        //Saving the Subscription
+                        String saveNotifierSubscription = tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, getSubscription3XML());
+                        logger.info("subscription saved for " + saveNotifierSubscription);
+                        //Changing the service we subscribed to "JoePublisherService"
+                        Thread.sleep(1000);
+                        logger.info("Deleting tModel ********** ");
+                        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY);
+
+                        boolean found = verifyDelivery("tModel One");
+
+                        if (!found) {
+                                logger.warn("Test failed, dumping business list");
+                                logger.warn("BEFORE " + before);
+                                logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
+                                Assert.fail("Notification does not contain the correct service");
+                        }
+
+                } catch (Exception e) {
+                        logger.error("No exceptions please.");
+                        e.printStackTrace();
+
+                        Assert.fail();
+                } finally {
+                        tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, getSubscriptionKey3());
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+                }
+        }
+
+        /**
+         * getBusiness tests joe want's updates on mary's business
+         *
+         * @throws Exception
+         */
+        @Test
+        public void joePublisherUpdate_GET_BUSINESS_DETAIL() throws Exception {
+                Assume.assumeTrue(TckPublisher.isEnabled());
+                Assume.assumeNotNull(getHostame());
+                logger.info("joePublisherUpdate_" + getTransport() + "_GET_BUSINESS_DETAIL");
+                TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                Holder<List<Subscription>> holder = null;
+                try {
+                        reset();
+
+                        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+
+                        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+                        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
+
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        //Saving the Listener Service
+                        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe, getXMLLocationOfServiceForDelivery(), getPort(), getHostame());
+
+                        //Saving the Subscription
+                        holder = new Holder<List<Subscription>>();
+                        holder.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBindingKey(bindingkey);
+                        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setGetBusinessDetail(new GetBusinessDetail());
+                        sub.getSubscriptionFilter().getGetBusinessDetail().getBusinessKey().add(TckBusiness.MARY_BUSINESS_KEY);
+
+                        holder.value.add(sub);
+                        subscriptionJoe.saveSubscription(authInfoJoe, holder);
+                        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
+                        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
+                        //Changing the service we subscribed to "JoePublisherService"
+                        Thread.sleep(1000);
+                        logger.info("updating Mary's business ********** ");
+                        updatePublisherBusiness(authInfoMary, saveMaryPublisherBusiness, publicationMary);
+
+                        boolean found = verifyDelivery("Updated Name");
+
+                        if (!found) {
+                                logger.warn("Test failed, dumping business list");
+                                logger.warn("BEFORE " + before);
+                                logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
+                                Assert.fail("Notification does not contain the correct service.");
+                        }
+
+                } catch (Exception e) {
+                        logger.error("No exceptions please.");
+                        e.printStackTrace();
+
+                        Assert.fail();
+                } finally {
+                        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
+                        DeleteSubscription ds = new DeleteSubscription();
+                        ds.setAuthInfo(authInfoJoe);
+                        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
+                        subscriptionJoe.deleteSubscription(ds);
+                        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);
+
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+
+                }
+        }
+
+        /**
+         * getBusiness tests joe want's updates on mary's business
+         *
+         * @throws Exception
+         */
+        @Test
+        public void joePublisherUpdate_GET_TMODEL_DETAIL() throws Exception {
+                Assume.assumeTrue(TckPublisher.isEnabled());
+                Assume.assumeNotNull(getHostame());
+                logger.info("joePublisherUpdate_" + getTransport() + "_GET_TMODEL_DETAIL");
+                TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                Holder<List<Subscription>> holder = null;
+                try {
+                        reset();
+
+                        String before = TckCommon.DumpAllTModels(authInfoJoe, inquiryJoe);
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+                        TModel saveMaryPublisherTmodel = tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        //Saving the Listener Service
+                        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe, getXMLLocationOfServiceForDelivery(), getPort(), getHostame());
+
+                        //Saving the Subscription
+                        holder = new Holder<List<Subscription>>();
+                        holder.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBindingKey(bindingkey);
+                        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setGetTModelDetail(new GetTModelDetail());
+                        sub.getSubscriptionFilter().getGetTModelDetail().getTModelKey().add(TckTModel.MARY_PUBLISHER_TMODEL_KEY);
+
+                        holder.value.add(sub);
+                        subscriptionJoe.saveSubscription(authInfoJoe, holder);
+                        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
+                        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
+                        //Changing the service we subscribed to "JoePublisherService"
+                        Thread.sleep(1000);
+                        logger.info("updating Mary's tModel ********** ");
+                        updateTModel(authInfoMary, saveMaryPublisherTmodel, publicationMary);
+
+                        boolean found = verifyDelivery("a new description");
+
+                        if (!found) {
+                                logger.warn("Test failed, dumping business list");
+                                logger.warn("BEFORE " + before);
+                                logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
+                                Assert.fail("Notification does not contain the correct service.");
+                        }
+
+                } catch (Exception e) {
+                        logger.error("No exceptions please.");
+                        e.printStackTrace();
+
+                        Assert.fail();
+                } finally {
+                        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
+                        DeleteSubscription ds = new DeleteSubscription();
+                        ds.setAuthInfo(authInfoJoe);
+                        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
+                        subscriptionJoe.deleteSubscription(ds);
+                        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);
+
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
+
+                }
+        }
+
+        //get service detail
+        //get binding detail
+        //get pub assertion
+        //find publisher assertions
+        //find binding
+        //TODO If a subscriber specifies a maximum number of entries to be returned with a subscription and the amount of data to be returned exceeds 
+//this limit, or if the node determines based on its policy that there are too many entries to be returned in a single group, 
+        //then the node SHOULD provide a chunkToken with results.  
+        //TODO  If no more results are pending, the value of the chunkToken MUST be "0".
+        public static void updateTModel(String authInfoMary, TModel saveMaryPublisherTmodel, UDDIPublicationPortType publicationMary) throws Exception {
+                saveMaryPublisherTmodel.getDescription().add(new Description("a new description", null));
+                SaveTModel stm = new SaveTModel();
+                stm.setAuthInfo(authInfoMary);
+                stm.getTModel().add(saveMaryPublisherTmodel);
+                publicationMary.saveTModel(stm);
+        }
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
index 6cec5b0..5c43eeb 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
@@ -95,7 +95,7 @@ public class UDDI_090_SubscriptionListenerIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 tckTModelMary.deleteCreatedTModels(authInfoMary);
                 manager.stop();
@@ -106,7 +106,7 @@ public class UDDI_090_SubscriptionListenerIntegrationTest {
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 try {
                         smtpPort = 9700 + new Random().nextInt(99);
                         httpPort = 9600 + new Random().nextInt(99);

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
index d27a359..53215b6 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
@@ -65,7 +65,7 @@ public class UDDI_110_FindBusinessIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModel.deleteCreatedTModels(authInfoJoe);
                 tckTModel01.deleteCreatedTModels(authInfoJoe);
                 tckTModel02.deleteCreatedTModels(authInfoJoe);
@@ -74,7 +74,7 @@ public class UDDI_110_FindBusinessIntegrationTest {
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
index 2538ae0..786a086 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
@@ -75,14 +75,14 @@ public class UDDI_120_CombineCategoryBagsFindServiceIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModel.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
index e004834..badb884 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
@@ -80,14 +80,14 @@ public class UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest
 
 	@AfterClass
 	public static void stopManager() throws ConfigurationException {
-          Assume.assumeTrue(TckPublisher.isEnabled());
+          if (!TckPublisher.isEnabled()) return;
                 tckTModel.deleteCreatedTModels(authInfoJoe);
 		manager.stop();
 	}
 
 	@BeforeClass
 	public static void startManager() throws ConfigurationException {
-          Assume.assumeTrue(TckPublisher.isEnabled());
+          if (!TckPublisher.isEnabled()) return;
 		manager  = new UDDIClient();
 		manager.start();
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
index 1b47f4c..db1d5ac 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
@@ -104,14 +104,14 @@ public class UDDI_140_NegativePublicationIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
index 4aa099d..44ea3fe 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
@@ -93,7 +93,7 @@ public class UDDI_141_JIRAIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-                Assume.assumeTrue(TckPublisher.isEnabled());
+                if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 tckTModelSam.deleteCreatedTModels(authInfoSam);
                 manager.stop();
@@ -101,7 +101,7 @@ public class UDDI_141_JIRAIntegrationTest {
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-                Assume.assumeTrue(TckPublisher.isEnabled());
+                if (!TckPublisher.isEnabled()) return;
                 logger.info("UDDI_141_JIRAIntegrationTest");
                 manager = new UDDIClient();
                 manager.start();

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_142_DigitalSignatureIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_142_DigitalSignatureIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_142_DigitalSignatureIntegrationTest.java
index a8eefb7..7291724 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_142_DigitalSignatureIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_142_DigitalSignatureIntegrationTest.java
@@ -77,7 +77,7 @@ public class UDDI_142_DigitalSignatureIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 tckTModelSam.deleteCreatedTModels(authInfoSam);
                 manager.stop();
@@ -85,7 +85,7 @@ public class UDDI_142_DigitalSignatureIntegrationTest {
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 logger.info("UDDI_142_DigitalSignatureIntegrationTests");
                 manager = new UDDIClient();
                 manager.start();

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java
index 48a9de4..5d29914 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java
@@ -79,14 +79,14 @@ public class UDDI_150_CustodyTransferIntegrationTest {
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 
         @BeforeClass
         public static void startManager() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java
index 267c6ec..0c8d56f 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java
@@ -66,7 +66,7 @@ public class UDDI_160_RESTIntergrationTest {
         @BeforeClass
         public static void startRegistry() throws ConfigurationException {
 
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
 
@@ -81,7 +81,7 @@ public class UDDI_160_RESTIntergrationTest {
 
         @AfterClass
         public static void stopRegistry() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager.stop();
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/f0099f0d/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java
index 774eefa..a8dbf6a 100644
--- a/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java
+++ b/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java
@@ -82,7 +82,7 @@ public class UDDI_170_ValueSetValidation implements UDDIValueSetValidationPortTy
 
         @BeforeClass
         public static void startRegistry() throws ConfigurationException {
-                Assume.assumeTrue(TckPublisher.isEnabled());
+                if (!TckPublisher.isEnabled()) return;
                 manager = new UDDIClient();
                 manager.start();
                 
@@ -105,7 +105,7 @@ public class UDDI_170_ValueSetValidation implements UDDIValueSetValidationPortTy
         
         @AfterClass
         public static void stopRegistry() throws ConfigurationException {
-             Assume.assumeTrue(TckPublisher.isEnabled());
+             if (!TckPublisher.isEnabled()) return;
                 manager.stop();
         }
         final static String VSV_KEY = "uddi:juddi.apache.org:businesses-asf";


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


Mime
View raw message