You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2007/01/03 22:28:05 UTC

svn commit: r492307 - /portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java

Author: dlouzan
Date: Wed Jan  3 13:28:04 2007
New Revision: 492307

URL: http://svn.apache.org/viewvc?view=rev&rev=492307
Log:
Added checks when setting the register and portletManagement endpoints.

Modified:
    portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java

Modified: portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java?view=diff&rev=492307&r1=492306&r2=492307
==============================================================================
--- portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java (original)
+++ portals/wsrp4j/trunk/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/producer/ProducerImpl.java Wed Jan  3 13:28:04 2007
@@ -188,9 +188,13 @@
         this.registrationURL = registrationURL;
         
         try {
-            WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
-            registrationInterface = serviceLocator.getWSRPRegistrationService(
-                    new URL(registrationURL));
+            if (registrationURL == null) {
+                registrationInterface = null;
+            } else {
+                WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
+                registrationInterface = serviceLocator.getWSRPRegistrationService(
+                        new URL(registrationURL));
+            }
             
         } catch (javax.xml.rpc.ServiceException xmlEx) {
             
@@ -704,10 +708,14 @@
         this.portletManagementURL = portletManagementURL;
         
         try {
-            WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
-            portletManagementInterface = 
-                    serviceLocator.getWSRPPortletManagementService(
-                    new URL(portletManagementURL));
+            if (portletManagementURL == null) {
+                portletManagementInterface = null;
+            } else {
+                WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
+                portletManagementInterface = 
+                        serviceLocator.getWSRPPortletManagementService(
+                        new URL(portletManagementURL));
+            }
         } catch (javax.xml.rpc.ServiceException xmlEx) {
             
             WSRPXHelper.throwX(