You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by ks...@apache.org on 2009/02/01 03:31:12 UTC

svn commit: r739679 - in /webservices/juddi/branches/v3_trunk/uddi-client/src: main/java/org/uddi/api_v3/client/config/ main/java/org/uddi/api_v3/client/transport/ test/java/org/apache/juddi/client/

Author: kstam
Date: Sun Feb  1 02:31:12 2009
New Revision: 739679

URL: http://svn.apache.org/viewvc?rev=739679&view=rev
Log:
JUDDI-171 adding UDDI_030 to UDDI_080 tests

Added:
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_030_BusinessEntityTest.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_040_BusinessServiceTest.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_050_BindingTemplateTest.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_060_PublisherAssertionTest.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_070_FindEntityTest.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_080_SubscriberSaveTest.java
Modified:
    webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/config/Property.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXRPCTransport.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/Transport.java

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/config/Property.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/config/Property.java?rev=739679&r1=739678&r2=739679&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/config/Property.java (original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/config/Property.java Sun Feb  1 02:31:12 2009
@@ -6,6 +6,7 @@
 	public final static String UDDI_INQUIRY_URL                 ="uddi.inquiry.url";
 	public final static String UDDI_SECURITY_URL                ="uddi.security.url";
 	public final static String UDDI_PUBLISH_URL                 ="uddi.publish.url";
+	public final static String UDDI_SUBSCRIPTION_URL            ="uddi.subscription.url";
 	public final static String UDDI_PROXY_TRANSPORT             ="uddi.proxy.transport";
 	
 	public final static String UDDI_PROXY_FACTORY_INITIAL       ="uddi.proxy.factory.initial";

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXRPCTransport.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXRPCTransport.java?rev=739679&r1=739678&r2=739679&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXRPCTransport.java (original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXRPCTransport.java Sun Feb  1 02:31:12 2009
@@ -10,6 +10,7 @@
 import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
 
 
 public class JAXRPCTransport implements Transport {
@@ -17,6 +18,7 @@
 	UDDIInquiryPortType inquiryService = null;
 	UDDISecurityPortType securityService = null;
 	UDDIPublicationPortType publishService = null;
+	UDDISubscriptionPortType subscriptionService = null;
 
 	public UDDIInquiryPortType getInquiryService() throws TransportException {
 
@@ -62,5 +64,20 @@
 		}
 		return publishService;
 	}
+	
+	public UDDISubscriptionPortType getSubscriptionService() throws TransportException {
+
+		if (subscriptionService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_SUBSCRIPTION_URL);
+				QName qName = new QName(Transport.SUB_V3_NAMESPACE, Transport.SUBSCRIPTION_SERVICE);
+				Service service = Service.create(new URL(endpointURL), qName);
+				subscriptionService = (UDDISubscriptionPortType) service.getPort(UDDISubscriptionPortType.class);
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return subscriptionService;
+	}
 
 }

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/Transport.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/Transport.java?rev=739679&r1=739678&r2=739679&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/Transport.java (original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/Transport.java Sun Feb  1 02:31:12 2009
@@ -3,14 +3,18 @@
 import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;;
 
 public interface Transport {
-	public final static String API_V3_NAMESPACE = "urn:uddi-org:api_v3_portType";
-	public final static String INQUIRY_SERVICE  = "InquiryService";
-	public final static String SECURITY_SERVICE = "SecurityService";
-	public final static String PUBLISH_SERVICE  = "PublishService";
+	public final static String API_V3_NAMESPACE     = "urn:uddi-org:api_v3_portType";
+	public final static String SUB_V3_NAMESPACE     = "urn:uddi-org:sub_v3_portType";
+	public final static String INQUIRY_SERVICE      = "InquiryService";
+	public final static String SECURITY_SERVICE     = "SecurityService";
+	public final static String PUBLISH_SERVICE      = "PublishService";
+	public final static String SUBSCRIPTION_SERVICE = "SubscriptionService";
 	
-	UDDIInquiryPortType getInquiryService()     throws TransportException;
-	UDDISecurityPortType getSecurityService()   throws TransportException;
-	UDDIPublicationPortType getPublishService() throws TransportException;
+	UDDIInquiryPortType getInquiryService()           throws TransportException;
+	UDDISecurityPortType getSecurityService()         throws TransportException;
+	UDDIPublicationPortType getPublishService()       throws TransportException;
+	UDDISubscriptionPortType getSubscriptionService() throws TransportException;
 }

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_030_BusinessEntityTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_030_BusinessEntityTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_030_BusinessEntityTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_030_BusinessEntityTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckBusiness;
+import org.uddi.api_v3.tck.TckPublisher;
+import org.uddi.api_v3.tck.TckSecurity;
+import org.uddi.api_v3.tck.TckTModel;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+public class UDDI_030_BusinessEntityTest {
+	
+	private static Logger logger                = Logger.getLogger(UDDI_030_BusinessEntityTest.class);
+	
+	private static TckTModel tckTModel          = null;
+	private static TckBusiness tckBusiness      = null;
+	private static String authInfoJoe           = null;
+	private static String authInfoSam           = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting auth tokens..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
+	 			 authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
+	        	 Assert.assertNotNull(authInfoJoe);
+	        	 Assert.assertNotNull(authInfoSam);
+	        	 
+	        	 UDDIPublicationPortType publication = transport.getPublishService();
+	        	 UDDIInquiryPortType inquiry = transport.getInquiryService();
+	        	 tckTModel  = new TckTModel(publication, inquiry);
+	        	 tckBusiness = new TckBusiness(publication, inquiry);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+				Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void testJoePublisherBusinessEntity() {
+		try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+		} finally {
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+		}
+	}	
+	
+	@Test @Ignore
+	public void testSamSyndicatorBusiness() {
+		try {
+			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
+		} finally {
+			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+		}
+	}
+	
+	
+}

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_040_BusinessServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_040_BusinessServiceTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_040_BusinessServiceTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_040_BusinessServiceTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckBusiness;
+import org.uddi.api_v3.tck.TckBusinessService;
+import org.uddi.api_v3.tck.TckPublisher;
+import org.uddi.api_v3.tck.TckSecurity;
+import org.uddi.api_v3.tck.TckTModel;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+public class UDDI_040_BusinessServiceTest 
+{
+	 
+    private static Logger logger                     = Logger.getLogger(UDDI_040_BusinessServiceTest.class);
+	
+	private static TckTModel tckTModel               = null;
+	private static TckBusiness tckBusiness           = null;
+	private static TckBusinessService tckBusinessService  = null;
+	
+	private static String authInfoJoe                = null;
+	private static String authInfoSam                = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting auth tokens..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
+	 			 authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
+	        	 Assert.assertNotNull(authInfoJoe);
+	        	 Assert.assertNotNull(authInfoSam);
+	        	 
+	        	 UDDIPublicationPortType publication = transport.getPublishService();
+	        	 UDDIInquiryPortType inquiry = transport.getInquiryService();
+	        	 
+	        	 tckTModel  = new TckTModel(publication, inquiry);
+	        	 tckBusiness = new TckBusiness(publication, inquiry);
+	        	 tckBusinessService = new TckBusinessService(publication, inquiry);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+			 Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void joepublisher() {
+		try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusinessService.saveJoePublisherService(authInfoJoe);
+			tckBusinessService.deleteJoePublisherService(authInfoJoe);
+		} finally {
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+		}
+	}
+	
+	@Test @Ignore
+	public void samsyndicator() {
+		try {
+			
+			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+			tckBusinessService.saveSamSyndicatorService(authInfoSam);
+			tckBusinessService.deleteSamSyndicatorService(authInfoSam);
+		} finally {
+			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
+			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+		}
+	}
+	
+	
+
+}

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_050_BindingTemplateTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_050_BindingTemplateTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_050_BindingTemplateTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_050_BindingTemplateTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckBindingTemplate;
+import org.uddi.api_v3.tck.TckBusiness;
+import org.uddi.api_v3.tck.TckBusinessService;
+import org.uddi.api_v3.tck.TckPublisher;
+import org.uddi.api_v3.tck.TckSecurity;
+import org.uddi.api_v3.tck.TckTModel;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+public class UDDI_050_BindingTemplateTest 
+{
+   
+    private static Logger logger                          = Logger.getLogger(UDDI_050_BindingTemplateTest.class);
+	
+	private static TckTModel tckTModel                    = null;
+	private static TckBusiness tckBusiness                = null;
+	private static TckBusinessService tckBusinessService  = null;
+	private static TckBindingTemplate tckBindingTemplate  = null;
+	
+	
+	private static String authInfoJoe                 = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting auth tokens..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
+	        	 Assert.assertNotNull(authInfoJoe);
+	        	 
+	        	 UDDIPublicationPortType publication = transport.getPublishService();
+	        	 UDDIInquiryPortType inquiry = transport.getInquiryService();
+	        	 
+	        	 tckTModel  = new TckTModel(publication, inquiry);
+	        	 tckBusiness = new TckBusiness(publication, inquiry);
+	        	 tckBusinessService = new TckBusinessService(publication, inquiry);
+	        	 tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+			 Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void joepublisher() {
+		try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusinessService.saveJoePublisherService(authInfoJoe);
+			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+		} finally {
+			tckBusinessService.deleteJoePublisherService(authInfoJoe);
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+		}
+	}
+}

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_060_PublisherAssertionTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_060_PublisherAssertionTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_060_PublisherAssertionTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_060_PublisherAssertionTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckBusiness;
+import org.uddi.api_v3.tck.TckPublisher;
+import org.uddi.api_v3.tck.TckPublisherAssertion;
+import org.uddi.api_v3.tck.TckSecurity;
+import org.uddi.api_v3.tck.TckTModel;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+public class UDDI_060_PublisherAssertionTest {
+	
+	private static Logger logger = Logger.getLogger(UDDI_060_PublisherAssertionTest.class);
+    
+	private static TckTModel tckTModel                = null;
+	private static TckBusiness tckBusiness            = null;
+	private static TckPublisherAssertion tckAssertion = null;
+	private static String authInfoJoe                 = null;
+	private static String authInfoSam                 = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting auth tokens..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
+	        	 authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
+	        	 Assert.assertNotNull(authInfoJoe);
+	        	 Assert.assertNotNull(authInfoSam);
+	        	 
+	        	 UDDIPublicationPortType publication = transport.getPublishService();
+	        	 UDDIInquiryPortType inquiry = transport.getInquiryService();
+	        	 
+	        	 tckTModel  = new TckTModel(publication, inquiry);
+	        	 tckBusiness = new TckBusiness(publication, inquiry);
+	        	 tckAssertion = new TckPublisherAssertion(publication);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+			 Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void testJoepublisherToSamSyndicator() {
+		try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+			tckAssertion.saveJoePublisherPublisherAssertion(authInfoJoe);
+			tckAssertion.deleteJoePublisherPublisherAssertion(authInfoJoe);
+		} finally {
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+		}
+	}
+}

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_070_FindEntityTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_070_FindEntityTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_070_FindEntityTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_070_FindEntityTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckBindingTemplate;
+import org.uddi.api_v3.tck.TckBusiness;
+import org.uddi.api_v3.tck.TckBusinessService;
+import org.uddi.api_v3.tck.TckFindEntity;
+import org.uddi.api_v3.tck.TckPublisher;
+import org.uddi.api_v3.tck.TckSecurity;
+import org.uddi.api_v3.tck.TckTModel;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+public class UDDI_070_FindEntityTest 
+{
+  
+    private static Logger logger                      = Logger.getLogger(UDDI_070_FindEntityTest.class);
+	
+	private static TckTModel tckTModel                    = null;
+	private static TckBusiness tckBusiness                = null;
+	private static TckBusinessService tckBusinessService  = null;
+	private static TckBindingTemplate tckBindingTemplate  = null;
+	private static TckFindEntity tckFindEntity            = null;
+	
+	private static String authInfoJoe                 = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting auth tokens..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
+	        	 Assert.assertNotNull(authInfoJoe);
+	        	 
+	        	 UDDIPublicationPortType publication = transport.getPublishService();
+	        	 UDDIInquiryPortType inquiry = transport.getInquiryService();
+	        	 
+	        	 tckTModel  = new TckTModel(publication, inquiry);
+	        	 tckBusiness = new TckBusiness(publication, inquiry);
+	        	 tckBusinessService = new TckBusinessService(publication, inquiry);
+	        	 tckFindEntity = new TckFindEntity(inquiry);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+			 Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void findEntities() {
+		try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusinessService.saveJoePublisherService(authInfoJoe);
+			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+			tckFindEntity.findBusiness();
+			tckFindEntity.findService();
+			tckFindEntity.findBinding();
+			tckFindEntity.findTModel();
+		} finally {
+			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+			tckBusinessService.deleteJoePublisherService(authInfoJoe);
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+		}
+		
+	}
+
+	
+
+}

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_080_SubscriberSaveTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_080_SubscriberSaveTest.java?rev=739679&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_080_SubscriberSaveTest.java (added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_080_SubscriberSaveTest.java Sun Feb  1 02:31:12 2009
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2001-2009 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.client;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.api_v3.client.transport.Transport;
+import org.uddi.api_v3.tck.TckSubscriber;
+import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
+
+/**
+ * @author <a href="mailto:tcunningh@apache.org">Tom Cunningham</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ */
+public class UDDI_080_SubscriberSaveTest 
+{
+	private static Logger logger = Logger.getLogger(UDDI_080_SubscriberSaveTest.class);
+	private static TckSubscriber tckSubscriber = null;
+	
+	@BeforeClass
+	public static void setup() {
+		logger.debug("Getting subscriber proxy..");
+		try {
+	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
+	         Class<?> transportClass = Loader.loadClass(clazz);
+	         if (transportClass!=null) {
+	        	 Transport transport = (Transport) transportClass.newInstance();
+	        	 
+	        	 UDDISecurityPortType security = transport.getSecurityService();
+	        	 UDDISubscriptionPortType subscriber = transport.getSubscriptionService();
+	        	 tckSubscriber = new TckSubscriber(subscriber, security);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+			 Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore //TODO as part of JUDDI-153
+	public void saveSubscriber() {
+		tckSubscriber.saveSubscriber();
+	}
+
+	@Test @Ignore
+	public void deleteSubscriber() {
+		tckSubscriber.deleteSubscriber();
+	}
+}



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