juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r780487 - in /webservices/juddi/branches/v3_trunk/uddi-client/src: main/java/org/uddi/api_v3/client/transport/ test/resources/
Date Sun, 31 May 2009 17:59:48 GMT
Author: kstam
Date: Sun May 31 17:59:48 2009
New Revision: 780487

URL: http://svn.apache.org/viewvc?rev=780487&view=rev
Log:
JUDDI-244 adding inVM transport to allow jUDDI to be embedded

Added:
    webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/InVMTransport.java
Modified:
    webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXWSTransport.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/main/java/org/uddi/api_v3/client/transport/TransportException.java
    webservices/juddi/branches/v3_trunk/uddi-client/src/test/resources/uddi.properties

Added: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/InVMTransport.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/InVMTransport.java?rev=780487&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/InVMTransport.java
(added)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/InVMTransport.java
Sun May 31 17:59:48 2009
@@ -0,0 +1,116 @@
+/*
+ * 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.uddi.api_v3.client.transport;
+
+import org.uddi.api_v3.client.config.ClientConfig;
+import org.uddi.api_v3.client.config.Property;
+import org.uddi.v3_service.UDDICustodyTransferPortType;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionListenerPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
+
+
+public class InVMTransport implements Transport {
+
+	UDDIInquiryPortType inquiryService = null;
+	UDDISecurityPortType securityService = null;
+	UDDIPublicationPortType publishService = null;
+	UDDISubscriptionPortType subscriptionService = null;
+	UDDISubscriptionListenerPortType subscriptionListenerService = null;
+	UDDICustodyTransferPortType custodyTransferService = null;
+
+	public UDDIInquiryPortType getInquiryService() throws TransportException {
+		if (inquiryService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_INQUIRY_URL);
+				Class<?> c = Class.forName(endpointURL);
+				inquiryService = (UDDIInquiryPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return inquiryService;
+	}
+	
+	public UDDISecurityPortType getSecurityService() throws TransportException {
+		if (securityService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_SECURITY_URL);
+				Class<?> c = Class.forName(endpointURL);
+				securityService = (UDDISecurityPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return securityService;
+	}
+	
+	public UDDIPublicationPortType getPublishService() throws TransportException {
+		if (publishService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_PUBLISH_URL);
+				Class<?> c = Class.forName(endpointURL);
+				publishService = (UDDIPublicationPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return publishService;
+	}
+	
+	public UDDISubscriptionPortType getSubscriptionService() throws TransportException {
+		if (subscriptionService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_SUBSCRIPTION_URL);
+				Class<?> c = Class.forName(endpointURL);
+				subscriptionService = (UDDISubscriptionPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return subscriptionService;
+	}
+	
+	public UDDISubscriptionListenerPortType getSubscriptionListenerService() throws TransportException
{
+		if (subscriptionListenerService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_SUBSCRIPTION_LISTENER_URL);
+				Class<?> c = Class.forName(endpointURL);
+				subscriptionListenerService = (UDDISubscriptionListenerPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return subscriptionListenerService;
+	}
+	
+	public UDDICustodyTransferPortType getCustodyTransferService() throws TransportException
{
+		if (custodyTransferService==null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_CUSTODY_TRANSFER_URL);
+				Class<?> c = Class.forName(endpointURL);
+				custodyTransferService = (UDDICustodyTransferPortType) c.newInstance();
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return custodyTransferService;
+	}
+
+}

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXWSTransport.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXWSTransport.java?rev=780487&r1=780486&r2=780487&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXWSTransport.java
(original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/JAXWSTransport.java
Sun May 31 17:59:48 2009
@@ -1,3 +1,19 @@
+/*
+ * 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.uddi.api_v3.client.transport;
 
 import java.net.URL;
@@ -7,6 +23,7 @@
 
 import org.uddi.api_v3.client.config.ClientConfig;
 import org.uddi.api_v3.client.config.Property;
+import org.uddi.v3_service.UDDICustodyTransferPortType;
 import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
@@ -21,6 +38,7 @@
 	UDDIPublicationPortType publishService = null;
 	UDDISubscriptionPortType subscriptionService = null;
 	UDDISubscriptionListenerPortType subscriptionListenerService = null;
+	UDDICustodyTransferPortType custodyTransferService = null;
 
 	public UDDIInquiryPortType getInquiryService() throws TransportException {
 
@@ -95,5 +113,19 @@
 		}
 		return subscriptionListenerService;
 	}
+	
+	public UDDICustodyTransferPortType getCustodyTransferService() throws TransportException
{
+		if (custodyTransferService == null) {
+			try {
+				String endpointURL = ClientConfig.getConfiguration().getString(Property.UDDI_CUSTODY_TRANSFER_URL);
+				QName qName = new QName(Transport.CUSTODY_V3_NAMESPACE, Transport.CUSTODY_TRANSFER_SERVICE);
+				Service service = Service.create(new URL(endpointURL), qName);
+				custodyTransferService = (UDDICustodyTransferPortType) service.getPort(UDDISubscriptionListenerPortType.class);
+			} catch (Exception e) {
+				throw new TransportException(e.getMessage(), e);
+			}
+		}
+		return custodyTransferService;
+	}
 
 }

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=780487&r1=780486&r2=780487&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 May 31 17:59:48 2009
@@ -1,5 +1,22 @@
+/*
+ * 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.uddi.api_v3.client.transport;
 
+import org.uddi.v3_service.UDDICustodyTransferPortType;
 import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
@@ -7,18 +24,22 @@
 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 SUB_V3_NAMESPACE     = "urn:uddi-org:sub_v3_portType";
-	public final static String SUBR_V3_NAMESPACE	= "urn:uddi-org:subr_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";
+	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 SUBR_V3_NAMESPACE	         = "urn:uddi-org:subr_v3_portType";
+	public final static String CUSTODY_V3_NAMESPACE          = "urn:uddi-org:custody_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";
 	public final static String SUBSCRIPTION_LISTENER_SERVICE = "SubscriptionListenerService";
+	public final static String CUSTODY_TRANSFER_SERVICE      = "CustodyTransferService";
 	
 	UDDIInquiryPortType getInquiryService()           throws TransportException;
 	UDDISecurityPortType getSecurityService()         throws TransportException;
 	UDDIPublicationPortType getPublishService()       throws TransportException;
 	UDDISubscriptionPortType getSubscriptionService() throws TransportException;
+	UDDICustodyTransferPortType getCustodyTransferService() throws TransportException;
 	UDDISubscriptionListenerPortType getSubscriptionListenerService() throws TransportException;
 }

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/TransportException.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/TransportException.java?rev=780487&r1=780486&r2=780487&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/TransportException.java
(original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/main/java/org/uddi/api_v3/client/transport/TransportException.java
Sun May 31 17:59:48 2009
@@ -1,3 +1,19 @@
+/*
+ * 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.uddi.api_v3.client.transport;
 
 public class TransportException extends Exception {

Modified: webservices/juddi/branches/v3_trunk/uddi-client/src/test/resources/uddi.properties
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/uddi-client/src/test/resources/uddi.properties?rev=780487&r1=780486&r2=780487&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/uddi-client/src/test/resources/uddi.properties (original)
+++ webservices/juddi/branches/v3_trunk/uddi-client/src/test/resources/uddi.properties Sun
May 31 17:59:48 2009
@@ -1,12 +1,24 @@
-uddi.custody.transfer.url =http://localhost:8880/juddi/services/custody-transfer?wsdl
-uddi.inquiry.url          =http://localhost:8880/juddi/services/inquiry?wsdl
-uddi.publish.url          =http://localhost:8880/juddi/services/publish?wsdl
-uddi.security.url         =http://localhost:8880/juddi/services/security?wsdl
-uddi.subscription.url     =http://localhost:8880/juddi/services/subscription?wsdl
+#JAXWS Transport
+uddi.proxy.transport           =org.uddi.api_v3.client.transport.JAXWSTransport
+uddi.custody.transfer.url      =http://localhost:8880/juddi/services/custody-transfer?wsdl
+uddi.inquiry.url               =http://localhost:8880/juddi/services/inquiry?wsdl
+uddi.publish.url               =http://localhost:8880/juddi/services/publish?wsdl
+uddi.security.url              =http://localhost:8880/juddi/services/security?wsdl
+uddi.subscription.url          =http://localhost:8880/juddi/services/subscription?wsdl
 uddi.subscription.listener.url =http://localhost:8880/juddi/services/subscription-listener?wsdl
 
-uddi.proxy.transport           =org.uddi.api_v3.client.transport.JAXWSTransport
+#InVM Transport
+#uddi.proxy.transport           =org.uddi.api_v3.client.transport.InVMTransport
+#uddi.custody.transfer.url      =org.apache.juddi.api.impl.UDDICustodyTransferImpl
+#uddi.inquiry.url               =org.apache.juddi.api.impl.UDDIInquiryImpl
+#uddi.publish.url               =org.apache.juddi.api.impl.UDDIPublicationImpl
+#uddi.security.url              =org.apache.juddi.api.impl.UDDISecurityImpl
+#uddi.subscription.url          =org.apache.juddi.api.impl.UDDISubscriptionImpl
+#uddi.subscription.listener.url =org.apache.juddi.api.impl.UDDISubscriptionListenerImpl
+
+#RMI Transport
+# Not yet implemented
 #only used by RMITransport
-uddi.proxy.factory.initial     =org.jnp.interfaces.NamingContextFactory
-uddi.proxy.provider.url        =jnp://localhost:1099
-uddi.proxy.factory.url.pkg     =org.jboss.naming
+#uddi.proxy.factory.initial     =org.jnp.interfaces.NamingContextFactory
+#uddi.proxy.provider.url        =jnp://localhost:1099
+#uddi.proxy.factory.url.pkg     =org.jboss.naming



---------------------------------------------------------------------
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