juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r739653 - in /webservices/juddi/branches/v3_trunk: juddi-core/src/main/resources/juddi_install_data/ uddi-client/ uddi-client/src/main/java/org/uddi/api_v3/client/config/ uddi-client/src/main/java/org/uddi/api_v3/client/transport/ uddi-clie...
Date Sat, 31 Jan 2009 23:36:21 GMT
Author: kstam
Date: Sat Jan 31 23:36:20 2009
New Revision: 739653

URL: http://svn.apache.org/viewvc?rev=739653&view=rev
Log:
JUDDI-171 adding UDDI_020 test. Which is failing at the moment due to a circular reference
in the object tree.

Added:
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_020_TmodelTest.java
Modified:
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/juddi_install_data/joepublisher_Publisher.xml
    webservices/juddi/branches/v3_trunk/uddi-client/pom.xml
    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
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_010_PublisherTest.java
    webservices/juddi/branches/v3_trunk/uddi-ws/pom.xml

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/juddi_install_data/joepublisher_Publisher.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/juddi_install_data/joepublisher_Publisher.xml?rev=739653&r1=739652&r2=739653&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/juddi_install_data/joepublisher_Publisher.xml
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/juddi_install_data/joepublisher_Publisher.xml
Sat Jan 31 23:36:20 2009
@@ -3,7 +3,7 @@
   <publisherName>Joe Publisher</publisherName>
   <emailAddress>jpublisher@business.com</emailAddress>
   <isAdmin>true</isAdmin>
-  <isEnabled>True</isEnabled>
+  <isEnabled>true</isEnabled>
   <maxBindingsPerService>199</maxBindingsPerService>
   <maxBusinesses>100</maxBusinesses>
   <maxServicePerBusiness>100</maxServicePerBusiness>

Modified: webservices/juddi/branches/v3_trunk/uddi-client/pom.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/pom.xml?rev=739653&r1=739652&r2=739653&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/pom.xml (original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/pom.xml Sat Jan 31 23:36:20 2009
@@ -88,6 +88,12 @@
         <version>4.5</version>
         <scope>test</scope>
      </dependency>
+     <dependency>
+        <groupId>org.apache.juddi</groupId>
+        <artifactId>uddi-tck</artifactId>
+        <version>3.0.0.SNAPSHOT</version>
+        <scope>test</scope>
+     </dependency>
   </dependencies> 
   <build>
     <plugins>

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=739653&r1=739652&r2=739653&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
Sat Jan 31 23:36:20 2009
@@ -3,8 +3,9 @@
 public interface Property 
 {
 	public final static String UDDI_CONFIGURATION_RELOAD_DELAY  ="uddi.configuration.reload.delay";
-	public final static String UDDI_INQUIRY_URL                 ="uddi.inquery.url";
+	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_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=739653&r1=739652&r2=739653&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
Sat Jan 31 23:36:20 2009
@@ -8,6 +8,7 @@
 import org.uddi.api_v3.client.config.ClientConfig;
 import org.uddi.api_v3.client.config.Property;
 import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
 
 
@@ -15,6 +16,7 @@
 
 	UDDIInquiryPortType inquiryService = null;
 	UDDISecurityPortType securityService = null;
+	UDDIPublicationPortType publishService = null;
 
 	public UDDIInquiryPortType getInquiryService() throws TransportException {
 
@@ -45,5 +47,20 @@
 		}
 		return securityService;
 	}
+	
+	public UDDIPublicationPortType getPublishService() throws TransportException {
+
+		if (publishService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_PUBLISH_URL);
+				QName qName = new QName(Transport.API_V3_NAMESPACE, Transport.PUBLISH_SERVICE);
+				Service service = Service.create(new URL(endpointURL), qName);
+				publishService = (UDDIPublicationPortType) service.getPort(UDDIPublicationPortType.class);
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return publishService;
+	}
 
 }

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=739653&r1=739652&r2=739653&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
Sat Jan 31 23:36:20 2009
@@ -1,13 +1,16 @@
 package org.uddi.api_v3.client.transport;
 
 import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
 
 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";
 	
-	UDDIInquiryPortType getInquiryService() throws TransportException;
-	UDDISecurityPortType getSecurityService() throws TransportException;
+	UDDIInquiryPortType getInquiryService()     throws TransportException;
+	UDDISecurityPortType getSecurityService()   throws TransportException;
+	UDDIPublicationPortType getPublishService() throws TransportException;
 }

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_010_PublisherTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_010_PublisherTest.java?rev=739653&r1=739652&r2=739653&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_010_PublisherTest.java
(original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_010_PublisherTest.java
Sat Jan 31 23:36:20 2009
@@ -15,6 +15,7 @@
 package org.apache.juddi.client;
 
 import org.apache.log4j.helpers.Loader;
+import org.junit.Assert;
 import org.junit.Test;
 import org.uddi.api_v3.AuthToken;
 import org.uddi.api_v3.GetAuthToken;
@@ -29,7 +30,7 @@
 public class UDDI_010_PublisherTest {
 	
      @Test
-     public void test() {
+     public void testAuthToken() {
 	     try {
 	    	 String clazz = ClientConfig.getConfiguration().getString(Property.UDDI_PROXY_TRANSPORT,Property.DEFAULT_UDDI_PROXY_TRANSPORT);
 	         Class<?> transportClass = Loader.loadClass(clazz);
@@ -42,18 +43,13 @@
 	        	 getAuthToken.setCred("");
 	        	 AuthToken authToken = securityService.getAuthToken(getAuthToken);
 	        	 System.out.println(authToken.getAuthInfo());
-	        	 
-	        	 //UDDIInquiryPortType inquiryService = transport.getInquiryService();
-	        	 
-	        	 //inquiryService.findTModel(body);
+	        	 Assert.assertNotNull(authToken);
 	         } else {
-	        	 
+	        	 Assert.fail();
 	         }
-	    
 	     } catch (Exception e) {
-	
 	         e.printStackTrace();
-	
+	         Assert.fail();
 	     } 
      }
 	

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_020_TmodelTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_020_TmodelTest.java?rev=739653&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_020_TmodelTest.java
(added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/java/org/apache/juddi/client/UDDI_020_TmodelTest.java
Sat Jan 31 23:36:20 2009
@@ -0,0 +1,84 @@
+/*
+ * 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.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_020_TmodelTest {
+	
+	private static TckTModel tckTModel                = null;
+	private static Logger logger                      = Logger.getLogger(UDDI_020_TmodelTest.class);
+	
+	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);
+	         } else {
+	        	 Assert.fail();
+	         }
+	     } catch (Exception e) {
+	    	 logger.error(e.getMessage(), e);
+				Assert.fail("Could not obtain authInfo token.");
+	     } 
+	}
+	
+	@Test @Ignore
+	public void testJoePublisherTmodel() {
+		tckTModel.saveJoePublisherTmodel(authInfoJoe);
+		tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+	}
+	
+	@Test @Ignore
+	public void testSamSyndicatorTmodelTest() {
+		tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+		tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+	}	
+	
+}

Modified: webservices/juddi/branches/v3_trunk/uddi-ws/pom.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-ws/pom.xml?rev=739653&r1=739652&r2=739653&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-ws/pom.xml (original)
+++ webservices/juddi/branches/v3_trunk/uddi-ws/pom.xml Sat Jan 31 23:36:20 2009
@@ -11,7 +11,7 @@
   <artifactId>uddi-ws</artifactId>
   <version>3.0.0.SNAPSHOT</version>
   <packaging>jar</packaging>
-  <name>UDDI_v3 WS Stubs & Schema Bindings Generated from WSDL</name>
+  <name>UDDI_v3 WS Stubs and Schema Bindings Generated from WSDL</name>
   
   <repositories>
     <repository>



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


Mime
View raw message