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/21 21:01:24 UTC

svn commit: r1560161 - in /juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper: Inquiry3to2.java Publish3to2.java Security3to2.java

Author: alexoree
Date: Tue Jan 21 20:01:24 2014
New Revision: 1560161

URL: http://svn.apache.org/r1560161
Log:
JUDDI-782 updating mapping classes and transport classes to make it possible for the transport adapter to work

Added:
    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-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Security3to2.java

Added: 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=1560161&view=auto
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java (added)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Inquiry3to2.java Tue Jan 21 20:01:24 2014
@@ -0,0 +1,212 @@
+/*
+ * 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.v3.client.transport.wrapper;
+
+import java.io.StringWriter;
+import java.rmi.RemoteException;
+import java.util.Map;
+import javax.xml.bind.JAXB;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.soap.SOAPFaultException;
+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;
+import org.uddi.api_v3.FindBinding;
+import org.uddi.api_v3.FindBusiness;
+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.GetOperationalInfo;
+import org.uddi.api_v3.GetServiceDetail;
+import org.uddi.api_v3.GetTModelDetail;
+import org.uddi.api_v3.OperationalInfos;
+import org.uddi.api_v3.RelatedBusinessesList;
+import org.uddi.api_v3.ServiceDetail;
+import org.uddi.api_v3.ServiceList;
+import org.uddi.api_v3.TModelDetail;
+import org.uddi.api_v3.TModelList;
+import org.uddi.v2_service.DispositionReport;
+import org.uddi.v2_service.Inquire;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+import org.uddi.v3_service.UDDIInquiryPortType;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class Inquiry3to2 implements UDDIInquiryPortType, BindingProvider {
+
+        private static Log logger = LogFactory.getLog(Inquiry3to2.class);
+        Inquire inquiryService = null;
+
+        public Inquiry3to2() {
+
+                UDDIServiceV2 service = new UDDIServiceV2();
+                inquiryService = service.getInquire();
+
+        }
+
+        @Override
+        public BindingDetail findBinding(FindBinding body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapBindingDetail(inquiryService.findBinding(MapUDDIv3Tov2.MapFindBinding(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessList findBusiness(FindBusiness body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        org.uddi.api_v2.FindBusiness MapFindBusiness = MapUDDIv3Tov2.MapFindBusiness(body);
+                        StringWriter sw = new StringWriter();
+                        JAXB.marshal(MapFindBusiness, sw);
+                        logger.info(sw.toString());
+                        org.uddi.api_v2.BusinessList s = inquiryService.findBusiness(MapFindBusiness);
+                        sw = new StringWriter();
+                        JAXB.marshal(s, sw);
+                        logger.info(sw.toString());
+                        return MapUDDIv2Tov3.MapBusinessList(s);
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public RelatedBusinessesList findRelatedBusinesses(FindRelatedBusinesses body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapRelatedBusinessesList(inquiryService.findRelatedBusinesses(MapUDDIv3Tov2.MapFindRelatedBusiness(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public ServiceList findService(FindService body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapServiceList(inquiryService.findService(MapUDDIv3Tov2.MapFindService(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelList findTModel(FindTModel body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapTModelList(inquiryService.findTModel(MapUDDIv3Tov2.MapFindTModel(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public BindingDetail getBindingDetail(GetBindingDetail body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapBindingDetail(inquiryService.getBindingDetail(MapUDDIv3Tov2.MapGetBindingDetail(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessDetail getBusinessDetail(GetBusinessDetail body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapBusinessDetail(inquiryService.getBusinessDetail(MapUDDIv3Tov2.MapGetBusinessDetail(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public OperationalInfos getOperationalInfo(GetOperationalInfo body) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public ServiceDetail getServiceDetail(GetServiceDetail body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapServiceDetail(inquiryService.getServiceDetail(MapUDDIv3Tov2.MapGetServiceDetail(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelDetail getTModelDetail(GetTModelDetail body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapTModelDetail(inquiryService.getTModelDetail(MapUDDIv3Tov2.MapGetTModelDetail(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public Map<String, Object> getRequestContext() {
+                return ((BindingProvider) inquiryService).getRequestContext();
+        }
+
+        @Override
+        public Map<String, Object> getResponseContext() {
+                return ((BindingProvider) inquiryService).getResponseContext();
+        }
+
+        @Override
+        public Binding getBinding() {
+                return ((BindingProvider) inquiryService).getBinding();
+        }
+
+        @Override
+        public EndpointReference getEndpointReference() {
+                return ((BindingProvider) inquiryService).getEndpointReference();
+        }
+
+        @Override
+        public <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+                return ((BindingProvider) inquiryService).getEndpointReference(clazz);
+        }
+
+}

Added: 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=1560161&view=auto
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java (added)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Publish3to2.java Tue Jan 21 20:01:24 2014
@@ -0,0 +1,250 @@
+/*
+ * 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.v3.client.transport.wrapper;
+
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Map;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Holder;
+import javax.xml.ws.soap.SOAPFaultException;
+import org.apache.juddi.v3.client.UDDIServiceV2;
+import org.apache.juddi.v3.client.mapping.MapUDDIv2Tov3;
+import org.apache.juddi.v3.client.mapping.MapUDDIv3Tov2;
+import org.uddi.api_v2.PublisherAssertions;
+import org.uddi.api_v2.SetPublisherAssertions;
+import org.uddi.api_v3.AddPublisherAssertions;
+import org.uddi.api_v3.AssertionStatusItem;
+import org.uddi.api_v3.BindingDetail;
+import org.uddi.api_v3.BusinessDetail;
+import org.uddi.api_v3.CompletionStatus;
+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.GetRegisteredInfo;
+import org.uddi.api_v3.PublisherAssertion;
+import org.uddi.api_v3.RegisteredInfo;
+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.TModelDetail;
+import org.uddi.v2_service.DispositionReport;
+import org.uddi.v2_service.Publish;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+import org.uddi.v3_service.UDDIPublicationPortType;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class Publish3to2 implements UDDIPublicationPortType, BindingProvider {
+
+        Publish publishService=null;
+        public Publish3to2(){
+                
+                UDDIServiceV2 service = new UDDIServiceV2();
+                publishService = service.getPublish();
+
+        }
+        @Override
+        public void addPublisherAssertions(AddPublisherAssertions body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.addPublisherAssertions(MapUDDIv3Tov2.MapAddPublisherAssertions(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public void deleteBinding(DeleteBinding body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.deleteBinding(MapUDDIv3Tov2.MapDeleteBinding(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public void deleteBusiness(DeleteBusiness body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.deleteBusiness(MapUDDIv3Tov2.MapDeleteBusiness(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public void deletePublisherAssertions(DeletePublisherAssertions body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.deletePublisherAssertions(MapUDDIv3Tov2.MapDeletePublisherAssertions(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public void deleteService(DeleteService body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.deleteService(MapUDDIv3Tov2.MapDeleteService(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public void deleteTModel(DeleteTModel body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        publishService.deleteTModel(MapUDDIv3Tov2.MapDeleteTModel(body));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public List<AssertionStatusItem> getAssertionStatusReport(String authInfo, CompletionStatus completionStatus) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public List<PublisherAssertion> getPublisherAssertions(String authInfo) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapListPublisherAssertion(publishService.getPublisherAssertions(MapUDDIv3Tov2.MapGetPublisherAssertions(authInfo)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public RegisteredInfo getRegisteredInfo(GetRegisteredInfo body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapListRegisteredInfo(publishService.getRegisteredInfo(MapUDDIv3Tov2.MapGetRegisteredInfo(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+
+        }
+
+        @Override
+        public BindingDetail saveBinding(SaveBinding body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapBindingDetail(publishService.saveBinding(MapUDDIv3Tov2.MapSaveBinding(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+                catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public BusinessDetail saveBusiness(SaveBusiness body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapBusinessDetail(publishService.saveBusiness(MapUDDIv3Tov2.MapSaveBusiness(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+                 catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public ServiceDetail saveService(SaveService body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapServiceDetail(publishService.saveService(MapUDDIv3Tov2.MapSaveService(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+                 catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public TModelDetail saveTModel(SaveTModel body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        return MapUDDIv2Tov3.MapTModelDetail(publishService.saveTModel(MapUDDIv3Tov2.MapSaveTModel(body)));
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+                
+        }
+
+        @Override
+        public void setPublisherAssertions(String authInfo, Holder<List<PublisherAssertion>> publisherAssertion) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        SetPublisherAssertions req = MapUDDIv3Tov2.MapSetPublisherAssertions(publisherAssertion.value);
+                        PublisherAssertions setPublisherAssertions = publishService.setPublisherAssertions(req);
+                        publisherAssertion.value = MapUDDIv2Tov3.MapListPublisherAssertion(setPublisherAssertions);
+
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+
+        @Override
+        public Map<String, Object> getRequestContext() {
+                return ((BindingProvider)publishService).getRequestContext();
+        }
+
+        @Override
+        public Map<String, Object> getResponseContext() {
+                return ((BindingProvider)publishService).getResponseContext();
+        }
+
+        @Override
+        public Binding getBinding() {
+                return ((BindingProvider)publishService).getBinding();
+        }
+
+        @Override
+        public EndpointReference getEndpointReference() {
+                return ((BindingProvider)publishService).getEndpointReference();
+        }
+
+        @Override
+        public <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+                return ((BindingProvider)publishService).getEndpointReference(clazz);
+        }
+
+}

Added: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Security3to2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Security3to2.java?rev=1560161&view=auto
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Security3to2.java (added)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/Security3to2.java Tue Jan 21 20:01:24 2014
@@ -0,0 +1,107 @@
+/*
+ * 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.v3.client.transport.wrapper;
+
+import java.rmi.RemoteException;
+import java.util.Map;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.soap.SOAPFaultException;
+import org.apache.juddi.v3.client.UDDIServiceV2;
+import org.apache.juddi.v3.client.mapping.MapUDDIv2Tov3;
+import org.apache.juddi.v3.client.mapping.MapUDDIv3Tov2;
+import org.uddi.api_v3.AuthToken;
+import org.uddi.api_v3.DiscardAuthToken;
+import org.uddi.api_v3.GetAuthToken;
+import org.uddi.v2_service.DispositionReport;
+import org.uddi.v2_service.Publish;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class Security3to2 implements UDDISecurityPortType, BindingProvider {
+
+        Publish publishService = null;
+
+        public Security3to2() {
+
+                UDDIServiceV2 service = new UDDIServiceV2();
+                publishService = service.getPublish();
+
+        }
+
+        @Override
+        public void discardAuthToken(DiscardAuthToken body) throws DispositionReportFaultMessage, RemoteException {
+                try {
+                        org.uddi.api_v2.DiscardAuthToken discardAuthToken = new org.uddi.api_v2.DiscardAuthToken();
+                        discardAuthToken.setAuthInfo(body.getAuthInfo());
+                        discardAuthToken.setGeneric(MapUDDIv3Tov2.VERSION);
+                        org.uddi.api_v2.DispositionReport discardAuthToken1 = publishService.discardAuthToken(discardAuthToken);
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                } catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        @Override
+        public AuthToken getAuthToken(GetAuthToken body) throws DispositionReportFaultMessage, RemoteException {
+                org.uddi.api_v2.GetAuthToken authToken = new org.uddi.api_v2.GetAuthToken();
+                authToken.setGeneric(MapUDDIv3Tov2.VERSION);
+                authToken.setCred(body.getCred());
+                authToken.setUserID(body.getUserID());
+                try {
+                        org.uddi.api_v2.AuthToken authToken1 = publishService.getAuthToken(authToken);
+                        AuthToken r = new AuthToken();
+                        r.setAuthInfo(authToken1.getAuthInfo());
+                        return r;
+                } catch (DispositionReport ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }  catch (SOAPFaultException ex) {
+                        throw MapUDDIv2Tov3.MapException(ex);
+                }
+        }
+
+        
+        @Override
+        public Map<String, Object> getRequestContext() {
+                return ((BindingProvider)publishService).getRequestContext();
+        }
+
+        @Override
+        public Map<String, Object> getResponseContext() {
+                return ((BindingProvider)publishService).getResponseContext();
+        }
+
+        @Override
+        public Binding getBinding() {
+                return ((BindingProvider)publishService).getBinding();
+        }
+
+        @Override
+        public EndpointReference getEndpointReference() {
+                return ((BindingProvider)publishService).getEndpointReference();
+        }
+
+        @Override
+        public <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+                return ((BindingProvider)publishService).getEndpointReference(clazz);
+        }
+}



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