You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/01/22 13:26:59 UTC

svn commit: r1560331 [1/2] - in /juddi/trunk: juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/ juddi-co...

Author: alexoree
Date: Wed Jan 22 12:26:59 2014
New Revision: 1560331

URL: http://svn.apache.org/r1560331
Log:
JUDDI-782 updating mapping classes
JUDDI-780 adding wrapper endpoints for uddiv2 clients
JUDDI-800 done

Added:
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2InquiryImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2PublishImpl.java
    juddi/trunk/juddi-gui/src/main/webapp/ajax/switch.jsp
Modified:
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv2Tov3.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
    juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties
    juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties
    juddi/trunk/juddi-gui/src/main/webapp/header-top.jsp
    juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml
    juddi/trunk/juddiv3-war/JAX-WS/JBossWS-CXF/WEB-INF/web.xml
    juddi/trunk/juddiv3-war/JAX-WS/JBossWS-Native/WEB-INF/web.xml

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java Wed Jan 22 12:26:59 2014
@@ -16,9 +16,11 @@
  */
 package org.apache.juddi.v3.client.config;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -33,6 +35,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.juddi.api_v3.Node;
 import org.apache.juddi.v3.client.cryptor.CryptorFactory;
 import org.apache.juddi.v3.client.cryptor.DigSigUtil;
 
@@ -308,6 +311,27 @@ public class ClientConfig 
 	protected Map<String, UDDINode> getUDDINodes() {
 		return uddiNodes;
 	}
+
+        /**
+         * gets the current configuration's node list
+         * only the node name, client name, descriptions and transport class are returned, everything else is nulled out for
+         * security reasons. Only a copy of these values are returned
+         * @return 
+         */
+        public List<Node> getUDDINodeList(){
+                List<Node> ret = new ArrayList<Node>();
+                Iterator<UDDINode> it = uddiNodes.values().iterator();
+                while (it.hasNext()){
+                        UDDINode next = it.next();
+                        Node n = new Node();
+                        n.setClientName(next.getClientName());
+                        n.setDescription(next.getDescription());
+                        n.setName(next.getName());
+                        n.setProxyTransport(next.getProxyTransport());
+                        ret.add(n);
+                }
+                return ret;
+        }
 	
 	public UDDINode getHomeNode() throws ConfigurationException {
 		if (uddiNodes==null) throw new ConfigurationException("The juddi client configuration " +

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv2Tov3.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv2Tov3.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv2Tov3.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv2Tov3.java Wed Jan 22 12:26:59 2014
@@ -23,7 +23,12 @@ import javax.xml.ws.soap.SOAPFaultExcept
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.api_v3.AccessPointType;
+import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport;
+import org.uddi.api_v2.GetBusinessDetailExt;
+import org.uddi.api_v2.GetPublisherAssertions;
+import org.uddi.api_v2.GetTModelDetail;
+import org.uddi.api_v2.SetPublisherAssertions;
 import org.uddi.api_v2.Truncated;
 import org.uddi.api_v3.AccessPoint;
 import org.uddi.api_v3.BindingTemplate;
@@ -36,10 +41,29 @@ import org.uddi.api_v3.BusinessList;
 import org.uddi.api_v3.BusinessService;
 import org.uddi.api_v3.BusinessServices;
 import org.uddi.api_v3.CategoryBag;
+import org.uddi.api_v3.DeleteBinding;
+import org.uddi.api_v3.DeleteBusiness;
+import org.uddi.api_v3.DeletePublisherAssertions;
+import org.uddi.api_v3.DeleteService;
+import org.uddi.api_v3.DeleteTModel;
 import org.uddi.api_v3.Description;
+import org.uddi.api_v3.Direction;
+import org.uddi.api_v3.DiscoveryURL;
+import org.uddi.api_v3.DiscoveryURLs;
 import org.uddi.api_v3.ErrInfo;
+import org.uddi.api_v3.FindBinding;
+import org.uddi.api_v3.FindBusiness;
+import org.uddi.api_v3.FindQualifiers;
+import org.uddi.api_v3.FindRelatedBusinesses;
+import org.uddi.api_v3.FindService;
+import org.uddi.api_v3.FindTModel;
+import org.uddi.api_v3.GetBindingDetail;
+import org.uddi.api_v3.GetBusinessDetail;
+import org.uddi.api_v3.GetRegisteredInfo;
+import org.uddi.api_v3.GetServiceDetail;
 import org.uddi.api_v3.HostingRedirector;
 import org.uddi.api_v3.IdentifierBag;
+import org.uddi.api_v3.InfoSelection;
 import org.uddi.api_v3.InstanceDetails;
 import org.uddi.api_v3.KeyType;
 import org.uddi.api_v3.KeyedReference;
@@ -49,13 +73,21 @@ import org.uddi.api_v3.OverviewDoc;
 import org.uddi.api_v3.OverviewURL;
 import org.uddi.api_v3.PublisherAssertion;
 import org.uddi.api_v3.RegisteredInfo;
+import org.uddi.api_v3.RelatedBusinessInfo;
+import org.uddi.api_v3.RelatedBusinessInfos;
 import org.uddi.api_v3.RelatedBusinessesList;
 import org.uddi.api_v3.Result;
+import org.uddi.api_v3.SaveBinding;
+import org.uddi.api_v3.SaveBusiness;
+import org.uddi.api_v3.SaveService;
+import org.uddi.api_v3.SaveTModel;
 import org.uddi.api_v3.ServiceDetail;
 import org.uddi.api_v3.ServiceInfo;
 import org.uddi.api_v3.ServiceInfos;
 import org.uddi.api_v3.ServiceList;
+import org.uddi.api_v3.SharedRelationships;
 import org.uddi.api_v3.TModel;
+import org.uddi.api_v3.TModelBag;
 import org.uddi.api_v3.TModelDetail;
 import org.uddi.api_v3.TModelInfo;
 import org.uddi.api_v3.TModelInfos;
@@ -314,7 +346,25 @@ public class MapUDDIv2Tov3 {
         }
 
         public static RelatedBusinessesList MapRelatedBusinessesList(org.uddi.api_v2.RelatedBusinessesList findRelatedBusinesses) {
-                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+                if (findRelatedBusinesses == null) {
+                        return null;
+                }
+                RelatedBusinessesList r = new RelatedBusinessesList();
+                r.setTruncated(findRelatedBusinesses.getTruncated() == Truncated.TRUE);
+                r.setBusinessKey(findRelatedBusinesses.getBusinessKey());
+
+                if (findRelatedBusinesses.getRelatedBusinessInfos() != null) {
+                        r.setRelatedBusinessInfos(new RelatedBusinessInfos());
+                        for (int i = 0; i < findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().size(); i++) {
+                                RelatedBusinessInfo x = new RelatedBusinessInfo();
+                                x.setBusinessKey(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getBusinessKey());
+                                x.getDescription().addAll(MapDescription(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getDescription()));
+                                x.getName().addAll(MapName(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getName()));
+                                x.getSharedRelationships().addAll(MapSharedRelationship(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getSharedRelationships()));
+                                r.getRelatedBusinessInfos().getRelatedBusinessInfo().add(x);
+                        }
+                }
+                return r;
         }
 
         public static ServiceList MapServiceList(org.uddi.api_v2.ServiceList serviceDetail) {
@@ -403,25 +453,36 @@ public class MapUDDIv2Tov3 {
                 return r;
         }
 
-        public static List<PublisherAssertion> MapListPublisherAssertion(org.uddi.api_v2.PublisherAssertions publisherAssertions) {
+        public static List<PublisherAssertion> MapListPublisherAssertion(List<org.uddi.api_v2.PublisherAssertion> publisherAssertions) {
                 List<PublisherAssertion> r = new ArrayList<PublisherAssertion>();
                 if (publisherAssertions == null) {
                         return r;
                 }
-                for (int i = 0; i < publisherAssertions.getPublisherAssertion().size(); i++) {
+                for (int i = 0; i < publisherAssertions.size(); i++) {
                         PublisherAssertion x = new PublisherAssertion();
-                        x.setFromKey(publisherAssertions.getPublisherAssertion().get(i).getFromKey());
-                        x.setToKey(publisherAssertions.getPublisherAssertion().get(i).getToKey());
-                        if (publisherAssertions.getPublisherAssertion().get(i).getKeyedReference() != null) {
-                                x.setKeyedReference(new KeyedReference(publisherAssertions.getPublisherAssertion().get(i).getKeyedReference().getTModelKey(),
-                                        publisherAssertions.getPublisherAssertion().get(i).getKeyedReference().getKeyName(),
-                                        publisherAssertions.getPublisherAssertion().get(i).getKeyedReference().getKeyValue()));
+                        x.setFromKey(publisherAssertions.get(i).getFromKey());
+                        x.setToKey(publisherAssertions.get(i).getToKey());
+                        if (publisherAssertions.get(i).getKeyedReference() != null) {
+                                x.setKeyedReference(new KeyedReference(publisherAssertions.get(i).getKeyedReference().getTModelKey(),
+                                        publisherAssertions.get(i).getKeyedReference().getKeyName(),
+                                        publisherAssertions.get(i).getKeyedReference().getKeyValue()));
                         }
                         r.add(x);
                 }
                 return r;
         }
 
+        public static List<PublisherAssertion> MapListPublisherAssertion(org.uddi.api_v2.PublisherAssertions publisherAssertions) {
+                List<PublisherAssertion> r = new ArrayList<PublisherAssertion>();
+                if (publisherAssertions == null) {
+                        return r;
+                }
+
+                r.addAll(MapListPublisherAssertion(publisherAssertions.getPublisherAssertion()));
+
+                return r;
+        }
+
         public static RegisteredInfo MapListRegisteredInfo(org.uddi.api_v2.RegisteredInfo registeredInfo) {
                 if (registeredInfo == null) {
                         return null;
@@ -531,14 +592,364 @@ public class MapUDDIv2Tov3 {
                         Object next = result.getDetail().getDetailEntries().next();
                         if (next instanceof DispositionReport) {
 
-                                DispositionReport z = (DispositionReport)next;
+                                DispositionReport z = (DispositionReport) next;
                                 Result x = new Result();
                                 r.addAll(MapResult(z.getFaultInfo().getResult()));
-                                
+
                         }
-                        logger.warn("unable to parse fault detail, type:" + next.getClass().getCanonicalName()+" " + next.toString());
+                        logger.warn("unable to parse fault detail, type:" + next.getClass().getCanonicalName() + " " + next.toString());
                 }
                 return r;
         }
         private static Log logger = LogFactory.getLog(MapUDDIv2Tov3.class);
+
+        public static FindBinding MapFindBinding(org.uddi.api_v2.FindBinding body) {
+                if (body == null) {
+                        return null;
+                }
+                FindBinding r = new FindBinding();
+                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
+                r.setMaxRows(body.getMaxRows());
+                r.setTModelBag(MapTModelBag(body.getTModelBag()));
+                return r;
+
+        }
+
+        private static TModelBag MapTModelBag(org.uddi.api_v2.TModelBag tModelBag) {
+                if (tModelBag == null) {
+                        return null;
+                }
+                TModelBag r = new TModelBag();
+                r.getTModelKey().addAll(tModelBag.getTModelKey());
+                return r;
+        }
+
+        private static FindQualifiers MapFindQualifiers(org.uddi.api_v2.FindQualifiers findQualifiers) {
+                if (findQualifiers == null) {
+                        return null;
+                }
+                FindQualifiers r = new FindQualifiers();
+                for (int i = 0; i < findQualifiers.getFindQualifier().size(); i++) {
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:68DE9E80-AD09-469D-8A37-088422BFBC36")) {
+                                r.getFindQualifier().add(UDDIConstants.TRANSPORT_HTTP);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:93335D49-3EFB-48A0-ACEA-EA102B60DDC6")) {
+                                r.getFindQualifier().add(UDDIConstants.TRANSPORT_EMAIL);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:5FCF5CD0-629A-4C50-8B16-F94E9CF2A674")) {
+                                r.getFindQualifier().add(UDDIConstants.TRANSPORT_FTP);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:1A2B00BE-6E2C-42F5-875B-56F32686E0E7")) {
+                                r.getFindQualifier().add(UDDIConstants.TRANSPORT_FAX);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:38E12427-5536-4260-A6F9-B5B530E63A07")) {
+                                r.getFindQualifier().add(UDDIConstants.TRANSPORT_POTS);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:E59AE320-77A5-11D5-B898-0004AC49CC1E")) {
+                                r.getFindQualifier().add(UDDIConstants.IS_REPLACED_BY);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:4064C064-6D14-4F35-8953-9652106476A9")) {
+                                r.getFindQualifier().add(UDDIConstants.OWNING_BUSINESS);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:807A2C6A-EE22-470D-ADC7-E0424A337C03")) {
+                                r.getFindQualifier().add(UDDIConstants.RELATIONSHIPS);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:327A56F0-3299-4461-BC23-5CD513E95C55")) {
+                                r.getFindQualifier().add("uddi:uddi.org:categorization:nodes");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:A035A07C-F362-44dd-8F95-E2B134BF43B4")) {
+                                r.getFindQualifier().add("uddi:uddi.org:categorization:general_keywords");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase("uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4")) {
+                                r.getFindQualifier().add("uddi:uddi.org:categorization:types");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.EXACT_MATCH)) {
+                                r.getFindQualifier().add("exactNameMatch");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.CASE_SENSITIVE_MATCH)) {
+                                r.getFindQualifier().add("caseSensitiveMatch");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.OR_ALL_KEYS)) {
+                                r.getFindQualifier().add("orAllKeys");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.OR_LIKE_KEYS)) {
+                                r.getFindQualifier().add("orLikeKeys");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.AND_ALL_KEYS)) {
+                                r.getFindQualifier().add("andAllKeys");
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_DATE_ASC)) {
+                                r.getFindQualifier().add(UDDIConstants.SORT_BY_DATE_ASC);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_DATE_DESC)) {
+                                r.getFindQualifier().add(UDDIConstants.SORT_BY_DATE_DESC);
+                        }
+
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_NAME_ASC)) {
+                                r.getFindQualifier().add(UDDIConstants.SORT_BY_NAME_ASC);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SORT_BY_NAME_DESC)) {
+                                r.getFindQualifier().add(UDDIConstants.SORT_BY_NAME_DESC);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.SERVICE_SUBSET)) {
+                                r.getFindQualifier().add(UDDIConstants.SERVICE_SUBSET);
+                        }
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(UDDIConstants.COMBINE_CATEGORY_BAGS)) {
+                                r.getFindQualifier().add(UDDIConstants.COMBINE_CATEGORY_BAGS);
+                        }
+                }
+                return r;
+        }
+
+        public static FindBusiness MapFindBusiness(org.uddi.api_v2.FindBusiness body) {
+                if (body == null) {
+                        return null;
+                }
+                FindBusiness r = new FindBusiness();
+                r.setCategoryBag(MapCategoryBag(body.getCategoryBag()));
+                r.setDiscoveryURLs(MapDiscoveryURLs(body.getDiscoveryURLs()));
+                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
+                r.setTModelBag(MapTModelBag(body.getTModelBag()));
+                r.setMaxRows(body.getMaxRows());
+                r.getName().addAll(MapName(body.getName()));
+                return r;
+        }
+
+        private static DiscoveryURLs MapDiscoveryURLs(org.uddi.api_v2.DiscoveryURLs discoveryURLs) {
+                if (discoveryURLs == null) {
+                        return null;
+                }
+                DiscoveryURLs r = new DiscoveryURLs();
+                for (int i = 0; i < discoveryURLs.getDiscoveryURL().size(); i++) {
+                        DiscoveryURL x = new DiscoveryURL(discoveryURLs.getDiscoveryURL().get(i).getUseType(), discoveryURLs.getDiscoveryURL().get(i).getValue());
+                        r.getDiscoveryURL().add(x);
+                }
+                return r;
+        }
+
+        public static FindRelatedBusinesses MapFindRelatedBusiness(org.uddi.api_v2.FindRelatedBusinesses body) {
+                if (body == null) {
+                        return null;
+                }
+                FindRelatedBusinesses r = new FindRelatedBusinesses();
+                r.setBusinessKey(body.getBusinessKey());
+                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
+                if (body.getKeyedReference() != null) {
+                        r.setKeyedReference(new KeyedReference(body.getKeyedReference().getTModelKey(), body.getKeyedReference().getKeyName(), body.getKeyedReference().getKeyValue()));
+                }
+                r.setMaxRows(body.getMaxRows());
+                return r;
+        }
+
+        public static FindService MapFindService(org.uddi.api_v2.FindService body) {
+                if (body == null) {
+                        return null;
+                }
+                FindService r = new FindService();
+                r.setBusinessKey(body.getBusinessKey());
+                r.setCategoryBag(MapCategoryBag(body.getCategoryBag()));
+                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
+                r.setMaxRows(body.getMaxRows());
+                r.setTModelBag(MapTModelBag(body.getTModelBag()));
+                r.getName().addAll(MapName(body.getName()));
+                return r;
+
+        }
+
+        public static FindTModel MapFindTModel(org.uddi.api_v2.FindTModel body) {
+                if (body == null) {
+                        return null;
+                }
+                FindTModel r = new FindTModel();
+                r.setCategoryBag(MapCategoryBag(body.getCategoryBag()));
+                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
+                r.setMaxRows(body.getMaxRows());
+                if (body.getName() != null) {
+                        r.setName(new Name(body.getName().getValue(), body.getName().getLang()));
+                }
+                return r;
+        }
+
+        public static GetBusinessDetail MapGetBusinessDetailExt(GetBusinessDetailExt body) {
+                if (body == null) {
+                        return null;
+                }
+                GetBusinessDetail r = new GetBusinessDetail();
+                r.getBusinessKey().addAll(body.getBusinessKey());
+                return r;
+        }
+
+        public static GetServiceDetail MapGetServiceDetail(org.uddi.api_v2.GetServiceDetail body) {
+                if (body == null) {
+                        return null;
+                }
+                GetServiceDetail r = new GetServiceDetail();
+                r.getServiceKey().addAll(body.getServiceKey());
+                return r;
+        }
+
+        public static org.uddi.api_v3.GetTModelDetail MapGetTModelDetail(GetTModelDetail body) {
+                if (body == null) {
+                        return null;
+                }
+                org.uddi.api_v3.GetTModelDetail r = new org.uddi.api_v3.GetTModelDetail();
+                r.getTModelKey().addAll(body.getTModelKey());
+                return r;
+        }
+
+        public static GetBindingDetail MapGetBindingDetail(org.uddi.api_v2.GetBindingDetail body) {
+                if (body == null) {
+                        return null;
+                }
+                GetBindingDetail r = new GetBindingDetail();
+                r.getBindingKey().addAll(body.getBindingKey());
+                return r;
+        }
+
+        public static GetBusinessDetail MapGetBusinessDetail(org.uddi.api_v2.GetBusinessDetail body) {
+                if (body == null) {
+                        return null;
+                }
+                GetBusinessDetail r = new GetBusinessDetail();
+                r.getBusinessKey().addAll(body.getBusinessKey());
+                return r;
+        }
+
+        private static List<SharedRelationships> MapSharedRelationship(List<org.uddi.api_v2.SharedRelationships> sharedRelationships) {
+                if (sharedRelationships == null) {
+                        return null;
+                }
+                List<SharedRelationships> r = new ArrayList<SharedRelationships>();
+                for (int i = 0; i < sharedRelationships.size(); i++) {
+                        SharedRelationships x = new SharedRelationships();
+
+                        switch (sharedRelationships.get(i).getDirection()) {
+                                case FROM_KEY:
+                                        x.setDirection(Direction.FROM_KEY);
+                                        break;
+                                case TO_KEY:
+                                        x.setDirection(Direction.TO_KEY);
+                                        break;
+                        }
+                        x.getKeyedReference().addAll(MapKeyedReference(sharedRelationships.get(i).getKeyedReference()));
+                        r.add(x);
+                }
+                return r;
+        }
+
+        public static DeleteBinding MapDeleteBinding(org.uddi.api_v2.DeleteBinding body) {
+                if (body == null) {
+                        return null;
+                }
+                DeleteBinding r = new DeleteBinding();
+                r.setAuthInfo(body.getAuthInfo());
+                r.getBindingKey().addAll(body.getBindingKey());
+                return r;
+        }
+
+        public static DeleteBusiness MapDeleteBusiness(org.uddi.api_v2.DeleteBusiness body) {
+                if (body == null) {
+                        return null;
+                }
+                DeleteBusiness r = new DeleteBusiness();
+                r.setAuthInfo(body.getAuthInfo());
+                r.getBusinessKey().addAll(body.getBusinessKey());
+                return r;
+        }
+
+        public static DeletePublisherAssertions MapDeletePublisherAssertion(org.uddi.api_v2.DeletePublisherAssertions body) {
+                if (body == null) {
+                        return null;
+                }
+                DeletePublisherAssertions r = new DeletePublisherAssertions();
+                r.setAuthInfo(body.getAuthInfo());
+                //r.getPublisherAssertion().addAll(Map));
+                return r;
+        }
+
+        public static DeleteService MapDeleteService(org.uddi.api_v2.DeleteService body) {
+                if (body == null) {
+                        return null;
+                }
+                DeleteService r = new DeleteService();
+                r.setAuthInfo(body.getAuthInfo());
+                r.getServiceKey().addAll(body.getServiceKey());
+                return r;
+        }
+
+        public static DeleteTModel MapDeleteTModel(org.uddi.api_v2.DeleteTModel body) {
+                if (body == null) {
+                        return null;
+                }
+                DeleteTModel r = new DeleteTModel();
+                r.setAuthInfo(body.getAuthInfo());
+                r.getTModelKey().addAll(body.getTModelKey());
+                return r;
+        }
+
+        public static SaveTModel MapSaveTModel(org.uddi.api_v2.SaveTModel body) {
+                if (body == null) {
+                        return null;
+                }
+                SaveTModel r = new SaveTModel();
+                r.setAuthInfo(body.getAuthInfo());
+                for (int i = 0; i < body.getTModel().size(); i++) {
+                        r.getTModel().add(MapTModel(body.getTModel().get(i)));
+                }
+                return r;
+        }
+
+        public static SaveService MapSaveService(org.uddi.api_v2.SaveService body) {
+                if (body == null) {
+                        return null;
+                }
+                SaveService r = new SaveService();
+                r.setAuthInfo(body.getAuthInfo());
+                for (int i = 0; i < body.getBusinessService().size(); i++) {
+                        r.getBusinessService().add(MapService(body.getBusinessService().get(i)));
+                }
+                return r;
+        }
+
+        public static SaveBusiness MapSaveBusiness(org.uddi.api_v2.SaveBusiness body) {
+                if (body == null) {
+                        return null;
+                }
+                SaveBusiness r = new SaveBusiness();
+                r.setAuthInfo(body.getAuthInfo());
+                for (int i = 0; i < body.getBusinessEntity().size(); i++) {
+                        r.getBusinessEntity().add(MapBusiness(body.getBusinessEntity().get(i)));
+                }
+                return r;
+        }
+
+        public static GetRegisteredInfo MapGetRegisteredInfo(org.uddi.api_v2.GetRegisteredInfo body) {
+                if (body == null) {
+                        return null;
+                }
+                GetRegisteredInfo r = new GetRegisteredInfo();
+                r.setAuthInfo(body.getAuthInfo());
+                r.setInfoSelection(InfoSelection.ALL);
+                return r;
+        }
+
+        public static SaveBinding MapSaveBinding(org.uddi.api_v2.SaveBinding body) {
+                if (body == null) {
+                        return null;
+                }
+                SaveBinding r = new SaveBinding();
+                r.setAuthInfo(body.getAuthInfo());
+                for (int i = 0; i < body.getBindingTemplate().size(); i++) {
+                        r.getBindingTemplate().add(MapBinding(body.getBindingTemplate().get(i)));
+                }
+                return r;
+        }
+
+        public static List<PublisherAssertion> MapSetPublisherAssertions(SetPublisherAssertions body) {
+                if (body == null) {
+                        return null;
+                }
+                return MapListPublisherAssertion(body.getPublisherAssertion());
+        }
+
 }

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java Wed Jan 22 12:26:59 2014
@@ -16,14 +16,21 @@
 package org.apache.juddi.v3.client.mapping;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import javax.xml.ws.Holder;
 import org.apache.juddi.v3.client.UDDIConstants;
 import org.uddi.api_v2.AccessPoint;
 import org.uddi.api_v2.AddPublisherAssertions;
+import org.uddi.api_v2.BindingDetail;
 import org.uddi.api_v2.BindingTemplate;
 import org.uddi.api_v2.BindingTemplates;
+import org.uddi.api_v2.BusinessDetailExt;
 import org.uddi.api_v2.BusinessEntity;
+import org.uddi.api_v2.BusinessEntityExt;
+import org.uddi.api_v2.BusinessInfo;
+import org.uddi.api_v2.BusinessInfos;
+import org.uddi.api_v2.BusinessList;
 import org.uddi.api_v2.BusinessService;
 import org.uddi.api_v2.BusinessServices;
 import org.uddi.api_v2.CategoryBag;
@@ -35,6 +42,7 @@ import org.uddi.api_v2.DeleteTModel;
 import org.uddi.api_v2.Description;
 import org.uddi.api_v2.DiscoveryURL;
 import org.uddi.api_v2.DiscoveryURLs;
+import org.uddi.api_v2.ErrInfo;
 import org.uddi.api_v2.FindBinding;
 import org.uddi.api_v2.FindQualifiers;
 import org.uddi.api_v2.FindRelatedBusinesses;
@@ -63,7 +71,26 @@ import org.uddi.api_v2.GetBindingDetail;
 import org.uddi.api_v2.GetBusinessDetail;
 import org.uddi.api_v2.GetServiceDetail;
 import org.uddi.api_v2.GetTModelDetail;
+import org.uddi.api_v2.KeyType;
 import org.uddi.api_v2.PublisherAssertion;
+import org.uddi.api_v2.PublisherAssertions;
+import org.uddi.api_v2.RegisteredInfo;
+import org.uddi.api_v2.RelatedBusinessInfo;
+import org.uddi.api_v2.RelatedBusinessInfos;
+import org.uddi.api_v2.RelatedBusinessesList;
+import org.uddi.api_v2.Result;
+import org.uddi.api_v2.ServiceDetail;
+import org.uddi.api_v2.ServiceInfo;
+import org.uddi.api_v2.ServiceInfos;
+import org.uddi.api_v2.ServiceList;
+import org.uddi.api_v2.TModelDetail;
+import org.uddi.api_v2.TModelInfo;
+import org.uddi.api_v2.TModelInfos;
+import org.uddi.api_v2.TModelList;
+import org.uddi.api_v2.Truncated;
+import org.uddi.api_v3.BusinessDetail;
+import org.uddi.v2_service.DispositionReport;
+import org.uddi.v3_service.DispositionReportFaultMessage;
 
 /**
  * Converts UDDIv3 objects to UDDI v2 objects. Note: these functions do not take
@@ -386,7 +413,15 @@ public class MapUDDIv3Tov2 {
         }
 
         public static AddPublisherAssertions MapAddPublisherAssertions(org.uddi.api_v3.AddPublisherAssertions body) {
-                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+                if (body == null) {
+                        return null;
+                }
+                AddPublisherAssertions r = new AddPublisherAssertions();
+                r.setAuthInfo(body.getAuthInfo());
+                r.setGeneric(VERSION);
+                r.getPublisherAssertion().addAll(MapPublisherAssertion(body.getPublisherAssertion()));
+                return r;
+
         }
 
         public static DeleteBinding MapDeleteBinding(org.uddi.api_v3.DeleteBinding body) {
@@ -407,7 +442,11 @@ public class MapUDDIv3Tov2 {
         }
 
         public static DeletePublisherAssertions MapDeletePublisherAssertions(org.uddi.api_v3.DeletePublisherAssertions body) {
-                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+                if (body==null)return null;
+                DeletePublisherAssertions r = new  DeletePublisherAssertions();
+                r.setAuthInfo(body.getAuthInfo());
+                r.getPublisherAssertion().addAll(MapPublisherAssertion(body.getPublisherAssertion()));
+                return r;
         }
 
         public static DeleteService MapDeleteService(org.uddi.api_v3.DeleteService body) {
@@ -458,28 +497,6 @@ public class MapUDDIv3Tov2 {
                 return r;
         }
 
-        public static SetPublisherAssertions MapSetPublisherAssertions(Holder<List<PublisherAssertion>> publisherAssertion, String authinfo) {
-                if (publisherAssertion == null || publisherAssertion.value == null) {
-                        return null;
-                }
-                SetPublisherAssertions r = new SetPublisherAssertions();
-                r.setAuthInfo(authinfo);
-                r.setGeneric(VERSION);
-
-                for (int i = 0; i < publisherAssertion.value.size(); i++) {
-                        PublisherAssertion x = new PublisherAssertion();
-                        x.setFromKey(publisherAssertion.value.get(i).getFromKey());
-                        x.setToKey(publisherAssertion.value.get(i).getToKey());
-                        if (publisherAssertion.value.get(i).getKeyedReference() != null) {
-                                x.setKeyedReference(new KeyedReference(publisherAssertion.value.get(i).getKeyedReference().getTModelKey(),
-                                        publisherAssertion.value.get(i).getKeyedReference().getKeyName(),
-                                        publisherAssertion.value.get(i).getKeyedReference().getKeyValue()));
-                        }
-                        r.getPublisherAssertion().add(x);
-                }
-                return r;
-        }
-
         public static GetPublisherAssertions MapGetPublisherAssertions(String authInfo) {
                 GetPublisherAssertions r = new GetPublisherAssertions();
                 r.setAuthInfo(authInfo);
@@ -586,7 +603,6 @@ public class MapUDDIv3Tov2 {
 
                 TModelBag r = new TModelBag();
                 if (tModelBag != null) {
-                        //TODO key translation
                         r.getTModelKey().addAll(tModelBag.getTModelKey());
                 }
                 return r;
@@ -631,7 +647,317 @@ public class MapUDDIv3Tov2 {
         }
 
         public static SetPublisherAssertions MapSetPublisherAssertions(List<org.uddi.api_v3.PublisherAssertion> value) {
-                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+                if (value==null)return null;
+                SetPublisherAssertions r = new SetPublisherAssertions();
+                r.setGeneric(VERSION);
+                r.getPublisherAssertion().addAll(MapPublisherAssertion(value));
+                return r;
+                
+        }
+
+        public static BindingDetail MapBindingDetail(org.uddi.api_v3.BindingDetail findBinding) {
+                if (findBinding == null) {
+                        return null;
+                }
+                BindingDetail r = new BindingDetail();
+                r.setGeneric(VERSION);
+                if (findBinding.getListDescription().getActualCount() == findBinding.getListDescription().getIncludeCount()) {
+                        r.setTruncated(Truncated.FALSE);
+                } else {
+                        r.setTruncated(Truncated.TRUE);
+                }
+                r.getBindingTemplate().addAll(MapBinding(findBinding.getBindingTemplate()));
+                return r;
+        }
+
+        public static DispositionReport MapException(DispositionReportFaultMessage ex) {
+                if (ex == null) {
+                        return null;
+                }
+                DispositionReport r = new DispositionReport("err", MapDispositionReport(ex.getFaultInfo()));
+                return r;
+        }
+
+        private static org.uddi.api_v2.DispositionReport MapDispositionReport(org.uddi.api_v3.DispositionReport faultInfo) {
+                if (faultInfo == null) {
+                        return null;
+                }
+                org.uddi.api_v2.DispositionReport r = new org.uddi.api_v2.DispositionReport();
+                r.setGeneric(VERSION);
+                r.setTruncated(Truncated.FALSE);
+                r.getResult().addAll(MapResults(faultInfo.getResult()));
+                return r;
+        }
+
+        private static List<Result> MapResults(List<org.uddi.api_v3.Result> result) {
+                List<Result> r = new ArrayList<Result>();
+                if (result == null) {
+                        return r;
+                }
+                for (int i = 0; i < result.size(); i++) {
+                        Result x = new Result();
+                        x.setErrno(result.get(i).getErrno());
+                        x.setErrno(result.get(i).getErrno());
+                        if (result.get(i).getKeyType() != null) {
+                                switch (result.get(i).getKeyType()) {
+                                        case BINDING_KEY:
+                                                x.setKeyType(KeyType.BINDING_KEY);
+                                                break;
+                                        case BUSINESS_KEY:
+                                                x.setKeyType(KeyType.BUSINESS_KEY);
+                                                break;
+                                        case SERVICE_KEY:
+                                                x.setKeyType(KeyType.SERVICE_KEY);
+                                                break;
+                                        case T_MODEL_KEY:
+                                                x.setKeyType(KeyType.T_MODEL_KEY);
+                                                break;
+                                }
+                        }
+                        x.setErrInfo(new ErrInfo());
+                        x.getErrInfo().setErrCode(result.get(i).getErrInfo().getErrCode());
+                        x.getErrInfo().setValue(result.get(i).getErrInfo().getValue());
+                }
+
+                return r;
+        }
+
+        public static BusinessList MapBusinessListEntity(org.uddi.api_v3.BusinessList findBusiness) {
+
+                if (findBusiness == null) {
+                        return null;
+                }
+                BusinessList r = new BusinessList();
+                r.setGeneric(VERSION);
+                r.setBusinessInfos(MapBusinessInfos(findBusiness.getBusinessInfos()));
+                if (findBusiness.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                return r;
+        }
+
+        public static RelatedBusinessesList MapRelatedBusinessList(org.uddi.api_v3.RelatedBusinessesList findRelatedBusinesses) {
+                if (findRelatedBusinesses == null) {
+                        return null;
+                }
+                RelatedBusinessesList r = new RelatedBusinessesList();
+                r.setBusinessKey(findRelatedBusinesses.getBusinessKey());
+                if (findRelatedBusinesses.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                if (findRelatedBusinesses.getRelatedBusinessInfos() != null) {
+                        r.setRelatedBusinessInfos(new RelatedBusinessInfos());
+                        for (int i = 0; i < findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().size(); i++) {
+                                RelatedBusinessInfo x = new RelatedBusinessInfo();
+                                x.setBusinessKey(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getBusinessKey());
+                                x.getDescription().addAll(MapDescription(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getDescription()));
+                                x.getName().addAll(MapName(findRelatedBusinesses.getRelatedBusinessInfos().getRelatedBusinessInfo().get(i).getName()));
+                                r.getRelatedBusinessInfos().getRelatedBusinessInfo().add(x);
+                        }
+                }
+                return r;
+        }
+
+        public static ServiceList MapServiceList(org.uddi.api_v3.ServiceList findService) {
+                if (findService == null) {
+                        return null;
+                }
+                ServiceList r = new ServiceList();
+                r.setGeneric(VERSION);
+                r.setServiceInfos(MapServiceInfos(findService.getServiceInfos()));
+                if (findService.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                return r;
+        }
+
+        public static BusinessDetailExt MapBusinessDetailExt(BusinessDetail businessDetail) {
+                if (businessDetail == null) {
+                        return null;
+                }
+                BusinessDetailExt r = new BusinessDetailExt();
+
+                for (int i = 0; i < businessDetail.getBusinessEntity().size(); i++) {
+                        BusinessEntityExt x = new BusinessEntityExt();
+                        x.setBusinessEntity(MapBusiness(businessDetail.getBusinessEntity().get(i)));
+                        r.getBusinessEntityExt().add(x);
+                }
+                return r;
+
+        }
+
+        public static ServiceDetail MapServiceDetail(org.uddi.api_v3.ServiceDetail serviceDetail) {
+                if (serviceDetail == null) {
+                        return null;
+                }
+                ServiceDetail r = new ServiceDetail();
+                if (serviceDetail.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                r.setGeneric(VERSION);
+                r.getBusinessService().addAll(MapService(serviceDetail.getBusinessService()));
+                return r;
+
+        }
+
+        public static TModelList MapTModelListElement(org.uddi.api_v3.TModelList findTModel) {
+                if (findTModel == null) {
+                        return null;
+                }
+                TModelList r = new TModelList();
+                if (findTModel.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                if (findTModel.getTModelInfos() != null) {
+                        r.setTModelInfos(new TModelInfos());
+                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(findTModel.getTModelInfos().getTModelInfo()));
+                }
+                r.setGeneric(VERSION);
+                return r;
+        }
+
+        public static org.uddi.api_v2.BusinessDetail MapBusinessDetail(BusinessDetail businessDetail) {
+                if (businessDetail == null) {
+                        return null;
+                }
+                org.uddi.api_v2.BusinessDetail r = new org.uddi.api_v2.BusinessDetail();
+                r.setGeneric(VERSION);
+                if (businessDetail.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+
+                r.getBusinessEntity().addAll(MapBusinessList(businessDetail.getBusinessEntity()));
+                return r;
+        }
+
+        public static TModelDetail MapTModelDetail(org.uddi.api_v3.TModelDetail tModelDetail) {
+                if (tModelDetail == null) {
+                        return null;
+                }
+                TModelDetail r = new TModelDetail();
+                r.setGeneric(VERSION);
+                if (tModelDetail.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                r.getTModel().addAll(MapTModelList(tModelDetail.getTModel()));
+
+                return r;
+        }
+
+        private static BusinessInfos MapBusinessInfos(org.uddi.api_v3.BusinessInfos businessInfos) {
+                if (businessInfos == null) {
+                        return null;
+                }
+                BusinessInfos r = new BusinessInfos();
+                for (int i = 0; i < businessInfos.getBusinessInfo().size(); i++) {
+                        BusinessInfo x = new BusinessInfo();
+                        x.setBusinessKey(businessInfos.getBusinessInfo().get(i).getBusinessKey());
+                        x.setServiceInfos(MapServiceInfos(businessInfos.getBusinessInfo().get(i).getServiceInfos()));
+                        x.getDescription().addAll(MapDescription(businessInfos.getBusinessInfo().get(i).getDescription()));
+                        r.getBusinessInfo().add(x);
+                }
+
+                return r;
+        }
+
+        private static ServiceInfos MapServiceInfos(org.uddi.api_v3.ServiceInfos serviceInfos) {
+                if (serviceInfos == null) {
+                        return null;
+                }
+                ServiceInfos r = new ServiceInfos();
+                for (int i = 0; i < serviceInfos.getServiceInfo().size(); i++) {
+                        ServiceInfo x = new ServiceInfo();
+                        x.setBusinessKey(serviceInfos.getServiceInfo().get(i).getBusinessKey());
+                        x.setServiceKey(serviceInfos.getServiceInfo().get(i).getServiceKey());
+                        x.getName().addAll(MapName(serviceInfos.getServiceInfo().get(i).getName()));
+                        r.getServiceInfo().add(x);
+                }
+                return r;
+        }
+
+        private static List<TModelInfo> MapTModelInfo(List<org.uddi.api_v3.TModelInfo> tModelInfo) {
+                List<TModelInfo> r = new ArrayList<TModelInfo>();
+                if (tModelInfo == null) {
+                        return r;
+                }
+                for (int i = 0; i < tModelInfo.size(); i++) {
+                        TModelInfo x = new TModelInfo();
+                        x.setTModelKey(tModelInfo.get(i).getTModelKey());
+                        x.setName(new Name(tModelInfo.get(i).getName().getValue(), tModelInfo.get(i).getName().getValue()));
+                        r.add(x);
+                }
+                return r;
+        }
+
+        public static RegisteredInfo MapRegisteredInfo(org.uddi.api_v3.RegisteredInfo registeredInfo) {
+                if (registeredInfo == null) {
+                        return null;
+                }
+                RegisteredInfo r = new RegisteredInfo();
+                r.setGeneric(VERSION);
+                if (registeredInfo.isTruncated()) {
+                        r.setTruncated(Truncated.TRUE);
+                } else {
+                        r.setTruncated(Truncated.FALSE);
+                }
+                if (registeredInfo.getBusinessInfos() != null) {
+                        r.setBusinessInfos(new BusinessInfos());
+                        for (int i = 0; i < registeredInfo.getBusinessInfos().getBusinessInfo().size(); i++) {
+                                BusinessInfo x = new BusinessInfo();
+                                x.setBusinessKey(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey());
+                                x.getName().addAll(MapName(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getName()));
+                                x.getDescription().addAll(MapDescription(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getDescription()));
+                                x.setServiceInfos(MapServiceInfos(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getServiceInfos()));
+                        }
+                }
+                if (registeredInfo.getTModelInfos()!=null){
+                        r.setTModelInfos(new TModelInfos());
+                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(registeredInfo.getTModelInfos().getTModelInfo()));
+                }
+                
+                return r;
+
+        }
+
+        public static PublisherAssertions MapPublisherAssertions(List<org.uddi.api_v3.PublisherAssertion> publisherAssertions) {
+                if (publisherAssertions == null) {
+                        return null;
+                }
+                PublisherAssertions r = new PublisherAssertions();
+                r.getPublisherAssertion().addAll(MapPublisherAssertion(publisherAssertions));
+                r.setGeneric(VERSION);
+                return r;
+        }
+
+        private static List<PublisherAssertion> MapPublisherAssertion(List<org.uddi.api_v3.PublisherAssertion> publisherAssertion) {
+                List<PublisherAssertion> r = new ArrayList<PublisherAssertion>();
+
+                for (int i = 0; i < publisherAssertion.size(); i++) {
+                        PublisherAssertion x = new PublisherAssertion();
+                        x.setFromKey(publisherAssertion.get(i).getFromKey());
+                        x.setToKey(publisherAssertion.get(i).getToKey());
+                        if (publisherAssertion.get(i).getKeyedReference() != null) {
+                                x.setKeyedReference(new KeyedReference(publisherAssertion.get(i).getKeyedReference().getTModelKey(),
+                                        publisherAssertion.get(i).getKeyedReference().getKeyName(),
+                                        publisherAssertion.get(i).getKeyedReference().getKeyValue()));
+                        }
+                        r.add(x);
+                }
+                return r;
         }
 
 }

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java Wed Jan 22 12:26:59 2014
@@ -26,12 +26,8 @@ import javax.xml.ws.soap.SOAPFaultExcept
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.v3.client.UDDIServiceV2;
-import org.apache.juddi.v3.client.config.UDDIClient;
-import org.apache.juddi.v3.client.config.UDDIClientContainer;
 import org.apache.juddi.v3.client.mapping.MapUDDIv2Tov3;
 import org.apache.juddi.v3.client.mapping.MapUDDIv3Tov2;
-import org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport;
-import org.apache.juddi.v3.client.transport.TransportException;
 import org.uddi.api_v3.BindingDetail;
 import org.uddi.api_v3.BusinessDetail;
 import org.uddi.api_v3.BusinessList;

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java Wed Jan 22 12:26:59 2014
@@ -211,6 +211,7 @@ public class Publish3to2 implements UDDI
         public void setPublisherAssertions(String authInfo, Holder<List<PublisherAssertion>> publisherAssertion) throws DispositionReportFaultMessage, RemoteException {
                 try {
                         SetPublisherAssertions req = MapUDDIv3Tov2.MapSetPublisherAssertions(publisherAssertion.value);
+                        req.setAuthInfo(authInfo);
                         PublisherAssertions setPublisherAssertions = publishService.setPublisherAssertions(req);
                         publisherAssertion.value = MapUDDIv2Tov3.MapListPublisherAssertion(setPublisherAssertions);
 

Added: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2InquiryImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2InquiryImpl.java?rev=1560331&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2InquiryImpl.java (added)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2InquiryImpl.java Wed Jan 22 12:26:59 2014
@@ -0,0 +1,154 @@
+/*
+ * 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.api.impl;
+
+import javax.jws.WebService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.juddi.v3.client.mapping.MapUDDIv2Tov3;
+import org.apache.juddi.v3.client.mapping.MapUDDIv3Tov2;
+import org.apache.juddi.v3.client.transport.wrapper.Inquiry3to2;
+import org.uddi.api_v2.BindingDetail;
+import org.uddi.api_v2.BusinessDetail;
+import org.uddi.api_v2.BusinessDetailExt;
+import org.uddi.api_v2.BusinessList;
+import org.uddi.api_v2.FindBinding;
+import org.uddi.api_v2.FindBusiness;
+import org.uddi.api_v2.FindRelatedBusinesses;
+import org.uddi.api_v2.FindService;
+import org.uddi.api_v2.FindTModel;
+import org.uddi.api_v2.GetBindingDetail;
+import org.uddi.api_v2.GetBusinessDetail;
+import org.uddi.api_v2.GetBusinessDetailExt;
+import org.uddi.api_v2.GetServiceDetail;
+import org.uddi.api_v2.GetTModelDetail;
+import org.uddi.api_v2.RelatedBusinessesList;
+import org.uddi.api_v2.ServiceDetail;
+import org.uddi.api_v2.ServiceList;
+import org.uddi.api_v2.TModelDetail;
+import org.uddi.api_v2.TModelList;
+import org.uddi.v2_service.DispositionReport;
+import org.uddi.v2_service.Inquire;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ * UDDI v2 Implementation for the Inquiry service. This implementation is
+ * basically a wrapper and API translator that translates and forwards the
+ * request to our UDDIv3 Inquiry implementation
+ *
+ * @author <a href="mailto:alexoree.apache.org">Alex O'Ree</a>
+ * @since 3.2
+ */
+@WebService(serviceName = "Inquire", targetNamespace = "urn:uddi-org:inquiry_v2",
+        endpointInterface = "org.uddi.v2_service.Inquire")
+public class UDDIv2InquiryImpl implements Inquire {
+
+        private static Log logger = LogFactory.getLog(UDDIv2InquiryImpl.class);
+        static UDDIInquiryImpl inquiryService = new UDDIInquiryImpl();
+
+        
+        @Override
+        public BindingDetail findBinding(FindBinding body) throws DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapBindingDetail(inquiryService.findBinding(MapUDDIv2Tov3.MapFindBinding(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessList findBusiness(FindBusiness body) throws DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapBusinessListEntity(inquiryService.findBusiness(MapUDDIv2Tov3.MapFindBusiness(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                 
+        }
+
+        @Override
+        public RelatedBusinessesList findRelatedBusinesses(FindRelatedBusinesses body) throws DispositionReport {
+                  try {
+                        return MapUDDIv3Tov2.MapRelatedBusinessList(inquiryService.findRelatedBusinesses(MapUDDIv2Tov3.MapFindRelatedBusiness(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public ServiceList findService(FindService body) throws DispositionReport {
+                 try {
+                        return MapUDDIv3Tov2.MapServiceList(inquiryService.findService(MapUDDIv2Tov3.MapFindService(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelList findTModel(FindTModel body) throws DispositionReport {
+                 try {
+                        return MapUDDIv3Tov2.MapTModelListElement(inquiryService.findTModel(MapUDDIv2Tov3.MapFindTModel(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public BindingDetail getBindingDetail(GetBindingDetail body) throws DispositionReport {
+                   try {
+                        return MapUDDIv3Tov2.MapBindingDetail(inquiryService.getBindingDetail(MapUDDIv2Tov3.MapGetBindingDetail(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessDetail getBusinessDetail(GetBusinessDetail body) throws DispositionReport {
+                    try {
+                        return MapUDDIv3Tov2.MapBusinessDetail(inquiryService.getBusinessDetail(MapUDDIv2Tov3.MapGetBusinessDetail(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessDetailExt getBusinessDetailExt(GetBusinessDetailExt body) throws DispositionReport {
+                   try {
+                        return MapUDDIv3Tov2.MapBusinessDetailExt(inquiryService.getBusinessDetail(MapUDDIv2Tov3.MapGetBusinessDetailExt(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public ServiceDetail getServiceDetail(GetServiceDetail body) throws DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapServiceDetail(inquiryService.getServiceDetail(MapUDDIv2Tov3.MapGetServiceDetail(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelDetail getTModelDetail(GetTModelDetail body) throws DispositionReport {
+                 try {
+                        return MapUDDIv3Tov2.MapTModelDetail(inquiryService.getTModelDetail(MapUDDIv2Tov3.MapGetTModelDetail(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+}

Added: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2PublishImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2PublishImpl.java?rev=1560331&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2PublishImpl.java (added)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIv2PublishImpl.java Wed Jan 22 12:26:59 2014
@@ -0,0 +1,237 @@
+/*
+ * 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.api.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.juddi.v3.client.mapping.MapUDDIv2Tov3;
+import org.apache.juddi.v3.client.mapping.MapUDDIv3Tov2;
+import org.uddi.api_v2.AddPublisherAssertions;
+import org.uddi.api_v2.AssertionStatusReport;
+import org.uddi.api_v2.AuthToken;
+import org.uddi.api_v2.BindingDetail;
+import org.uddi.api_v2.BusinessDetail;
+import org.uddi.api_v2.DeleteBinding;
+import org.uddi.api_v2.DeleteBusiness;
+import org.uddi.api_v2.DeletePublisherAssertions;
+import org.uddi.api_v2.DeleteService;
+import org.uddi.api_v2.DeleteTModel;
+import org.uddi.api_v2.DiscardAuthToken;
+import org.uddi.api_v2.DispositionReport;
+import org.uddi.api_v2.GetAssertionStatusReport;
+import org.uddi.api_v2.GetAuthToken;
+import org.uddi.api_v2.GetPublisherAssertions;
+import org.uddi.api_v2.GetRegisteredInfo;
+import org.uddi.api_v2.PublisherAssertions;
+import org.uddi.api_v2.RegisteredInfo;
+import org.uddi.api_v2.Result;
+import org.uddi.api_v2.SaveBinding;
+import org.uddi.api_v2.SaveBusiness;
+import org.uddi.api_v2.SaveService;
+import org.uddi.api_v2.SaveTModel;
+import org.uddi.api_v2.ServiceDetail;
+import org.uddi.api_v2.SetPublisherAssertions;
+import org.uddi.api_v2.TModelDetail;
+import org.uddi.api_v2.Truncated;
+import org.uddi.api_v3.PublisherAssertion;
+import org.uddi.v2_service.Publish;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ * UDDI v2 Implementation for the Publish service. This implementation is
+ * basically a wrapper and API translator that translates and forwards the
+ * request to our UDDIv3 Publish implementation
+ *
+ * @author <a href="mailto:alexoree.apache.org">Alex O'Ree</a>
+ * @since 3.2
+ */
+@WebService(serviceName = "Publish", targetNamespace = "urn:uddi-org:inquiry_v2",
+        endpointInterface = "org.uddi.v2_service.Publish")
+public class UDDIv2PublishImpl implements Publish {
+
+        private static Log logger = LogFactory.getLog(UDDIv2PublishImpl.class);
+        static UDDIPublicationImpl publishService = new UDDIPublicationImpl();
+        static UDDISecurityImpl securityService = new UDDISecurityImpl();
+
+        @Override
+        public DispositionReport addPublisherAssertions(AddPublisherAssertions body) throws org.uddi.v2_service.DispositionReport {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public DispositionReport deleteBinding(DeleteBinding body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        publishService.deleteBinding(MapUDDIv2Tov3.MapDeleteBinding(body));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public DispositionReport deleteBusiness(DeleteBusiness body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        publishService.deleteBusiness(MapUDDIv2Tov3.MapDeleteBusiness(body));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public DispositionReport deletePublisherAssertions(DeletePublisherAssertions body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        publishService.deletePublisherAssertions(MapUDDIv2Tov3.MapDeletePublisherAssertion(body));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public DispositionReport deleteService(DeleteService body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        publishService.deleteService(MapUDDIv2Tov3.MapDeleteService(body));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public DispositionReport deleteTModel(DeleteTModel body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        publishService.deleteTModel(MapUDDIv2Tov3.MapDeleteTModel(body));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public DispositionReport discardAuthToken(DiscardAuthToken body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        securityService.discardAuthToken(new org.uddi.api_v3.DiscardAuthToken(body.getAuthInfo()));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+                return getSuccessMessage();
+        }
+
+        @Override
+        public AssertionStatusReport getAssertionStatusReport(GetAssertionStatusReport body) throws org.uddi.v2_service.DispositionReport {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public AuthToken getAuthToken(GetAuthToken body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        org.uddi.api_v3.GetAuthToken r = new org.uddi.api_v3.GetAuthToken();
+                        r.setCred(body.getCred());
+                        r.setUserID(body.getUserID());
+                        org.uddi.api_v3.AuthToken authToken = securityService.getAuthToken(r);
+                        AuthToken ret = new AuthToken();
+                        ret.setAuthInfo(authToken.getAuthInfo());
+                        ret.setGeneric("2.0");
+                        return ret;
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public PublisherAssertions getPublisherAssertions(GetPublisherAssertions body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapPublisherAssertions(publishService.getPublisherAssertions(body.getAuthInfo()));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public RegisteredInfo getRegisteredInfo(GetRegisteredInfo body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapRegisteredInfo(publishService.getRegisteredInfo(MapUDDIv2Tov3.MapGetRegisteredInfo(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+
+        }
+
+        @Override
+        public BindingDetail saveBinding(SaveBinding body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapBindingDetail(publishService.saveBinding(MapUDDIv2Tov3.MapSaveBinding(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessDetail saveBusiness(SaveBusiness body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapBusinessDetail(publishService.saveBusiness(MapUDDIv2Tov3.MapSaveBusiness(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public ServiceDetail saveService(SaveService body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapServiceDetail(publishService.saveService(MapUDDIv2Tov3.MapSaveService(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelDetail saveTModel(SaveTModel body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        return MapUDDIv3Tov2.MapTModelDetail(publishService.saveTModel(MapUDDIv2Tov3.MapSaveTModel(body)));
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        @Override
+        public PublisherAssertions setPublisherAssertions(SetPublisherAssertions body) throws org.uddi.v2_service.DispositionReport {
+                try {
+                        Holder<List<PublisherAssertion>> req = new Holder<List<PublisherAssertion>>();
+                        req.value = MapUDDIv2Tov3.MapSetPublisherAssertions(body);
+                        publishService.setPublisherAssertions(body.getAuthInfo(), req);
+                        return MapUDDIv3Tov2.MapPublisherAssertions(req.value);
+                } catch (DispositionReportFaultMessage ex) {
+                        throw MapUDDIv3Tov2.MapException(ex);
+                }
+        }
+
+        private DispositionReport getSuccessMessage() {
+                DispositionReport r = new DispositionReport();
+                r.setGeneric("2.0");
+                r.setTruncated(Truncated.FALSE);
+                Result x = new Result();
+                r.setGeneric("2.0");
+                r.getResult().add(x);
+                return r;
+        }
+
+
+}

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java Wed Jan 22 12:26:59 2014
@@ -266,7 +266,9 @@ public class UddiHub implements Serializ
                 DiscardAuthToken da = new DiscardAuthToken();
                 da.setAuthInfo(token);
                 try {
-                        security.discardAuthToken(da);
+                        if (token != null) {
+                                security.discardAuthToken(da);
+                        }
                 } catch (Exception ex) {
                         HandleException(ex);
                 }
@@ -323,8 +325,9 @@ public class UddiHub implements Serializ
                                         log.warn("'UDDI_AUTH' is not defined in the config (" + PROP_AUTH_TYPE + ")! defaulting to UDDI_AUTH");
                                         style = AuthStyle.UDDI_AUTH;
                                 }
-
-                                nodename = clientConfig.getConfiguration().getString(PROP_CONFIG_NODE);
+                                if (nodename == null) {
+                                        nodename = clientConfig.getConfiguration().getString(PROP_CONFIG_NODE);
+                                }
                                 if (nodename == null || nodename.equals("")) {
                                         log.warn("'node' is not defined in the config! defaulting to 'default'");
                                         nodename = "default";
@@ -405,6 +408,21 @@ public class UddiHub implements Serializ
                 return clientConfig;
         }
 
+        public String getNodeName() {
+                EnsureConfig();
+                return nodename;
+        }
+
+        public String switchNodes(String newnode) {
+                if (this.nodename.equalsIgnoreCase(newnode)) {
+                        this.die();
+                        clientConfig = null;
+                        this.nodename = newnode;
+                }
+                EnsureConfig();
+                return this.nodename;
+        }
+
         /**
          * returns all of the current properties defining digital signatures
          *
@@ -1234,7 +1252,7 @@ public class UddiHub implements Serializ
                 } else if (ex instanceof javax.xml.ws.soap.SOAPFaultException) {
                         javax.xml.ws.soap.SOAPFaultException x = (javax.xml.ws.soap.SOAPFaultException) ex;
 
-                        log.error("SOAP Fault returned: " + x.getMessage() + (x.getFault()!=null ? x.getFault().getFaultString() : ""));
+                        log.error("SOAP Fault returned: " + x.getMessage() + (x.getFault() != null ? x.getFault().getFaultString() : ""));
                         String err = null;
                         if (x.getFault() != null
                                 && x.getFault().getDetail() != null) {

Modified: juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties (original)
+++ juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web.properties Wed Jan 22 12:26:59 2014
@@ -397,3 +397,7 @@ items.maxitems=Maximum Items
 items.deliverymech=Delivery Mechanism
 form.missing.information=Sorry, but you forgot to fill out some required information. Add it, then try again.
 items.publisherassertion.direction=Direction
+items.switchnode=Node Switch
+items.switchnode.tooltip=jUDDI-GUI can connect to different UDDI servers (nodes). Use this to switch to another one.
+actions.continue=Continue
+items.nowconnectedto=Now connected to the UDDI Node, 

Modified: juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties?rev=1560331&r1=1560330&r2=1560331&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties (original)
+++ juddi/trunk/juddi-gui/src/main/resources/org/apache/juddi/webconsole/resources/web_es.properties Wed Jan 22 12:26:59 2014
@@ -399,3 +399,7 @@ items.maxitems=n\u00famero m\u00e1ximo d
 items.deliverymech=Mecanismo de entrega
 form.missing.information=Lo sentimos, pero usted se olvid\u00f3 de llenar algunos datos requeridos. A\u00f1ade que, a continuaci\u00f3n, int\u00e9ntelo de nuevo.
 items.publisherassertion.direction=Direcci\u00f3n
+items.switchnode=Nodo de Conmutaci\u00f3n
+items.switchnode.tooltip=jUDDI-GUI puede conectarse a diferentes servidores UDDI (nodos). Utilice esta opci\u00f3n para cambiar a otro.
+actions.continue=Continuar
+items.nowconnectedto=Ahora conectado al nodo UDDI,

Added: juddi/trunk/juddi-gui/src/main/webapp/ajax/switch.jsp
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/ajax/switch.jsp?rev=1560331&view=auto
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/ajax/switch.jsp (added)
+++ juddi/trunk/juddi-gui/src/main/webapp/ajax/switch.jsp Wed Jan 22 12:26:59 2014
@@ -0,0 +1,41 @@
+<%-- 
+    Document   : switch
+    Created on : Jan 21, 2014, 4:23:25 PM
+    Author     : Alex O'Ree
+--%>
+
+<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
+<%@page import="org.apache.juddi.webconsole.resources.ResourceLoader"%>
+<%@page import="org.apache.juddi.api_v3.Node"%>
+<%@page import="java.util.List"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include  file="../csrf.jsp" %>
+<%
+
+        UddiHub x = UddiHub.getInstance(application, session);
+        String node = request.getParameter("node");
+
+        String description=null;
+        List<Node> nodes = x.GetJuddiClientConfig().getUDDINodeList();
+        boolean found = false;
+        for (int i = 0; i < nodes.size(); i++) {
+                if (nodes.get(i).getName().equals(node)) {
+                        description = nodes.get(i).getDescription();
+                        found = true;
+                        break;
+                }
+        }
+        if (!found) {
+                response.setStatus(406);
+                out.write("Not found.");
+        } else {
+                node = x.switchNodes(node);
+                out.write(ResourceLoader.GetResource(session, "items.nodeid") + ": " + StringEscapeUtils.escapeHtml(node));
+                out.write("<br>");
+                out.write(ResourceLoader.GetResource(session, "items.description") + ": " + StringEscapeUtils.escapeHtml(description));
+                Cookie cookie = new Cookie("current_node", node);
+                cookie.setMaxAge(Integer.MAX_VALUE);
+                response.addCookie(cookie);
+        }
+%>
\ No newline at end of file



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