Containerization feature of SO
[so.git] / adapters / mso-sdnc-adapter / src / main / java / org / onap / so / adapters / sdnc / SDNCAdapterService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.adapters.sdnc;
22
23
24 import java.net.URL;
25
26 import javax.xml.namespace.QName;
27 import javax.xml.ws.Service;
28 import javax.xml.ws.WebEndpoint;
29 import javax.xml.ws.WebServiceClient;
30 import javax.xml.ws.WebServiceFeature;
31
32 import org.onap.so.logger.MessageEnum;
33 import org.onap.so.logger.MsoLogger;
34
35 /**
36  * This class was generated by Apache CXF 2.7.11.redhat-3
37  * 2015-01-27T18:25:50.994-05:00
38  * Generated source version: 2.7.11.redhat-3
39  *
40  */
41 //BPEL SDNCAdapter SOAP WebService
42 @WebServiceClient(name = "SDNCAdapterService",
43                   wsdlLocation = "main/resources/SDNCAdapter.wsdl",
44                   targetNamespace = "http://org.onap/workflow/sdnc/adapter/wsdl/v1")
45 public class SDNCAdapterService extends Service {
46
47         private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, SDNCAdapterService.class);
48
49     public static final URL WSDL_LOCATION;
50
51     public static final QName SERVICE = new QName("http://org.onap/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterService");
52     public static final QName SDNCAdapterSoapHttpPort = new QName("http://org.onap/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterSoapHttpPort");
53     static {
54         URL wsdlUrl = null;
55         try {
56                 wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl");
57         } catch (Exception e) {
58             logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e);
59         }
60         if(wsdlUrl == null) {
61                 logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "WSDL not found");
62         } else {
63                 try {
64                                 logger.info(MessageEnum.RA_PRINT_URL, "SDNCAdpater.wsdl", wsdlUrl.toURI().toString(), "");
65                         } catch (Exception e) {
66                                 logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e);
67                         }
68         }
69         WSDL_LOCATION = wsdlUrl;
70     }
71
72     public SDNCAdapterService(URL wsdlLocation) {
73         super(wsdlLocation, SERVICE);
74     }
75
76     public SDNCAdapterService(URL wsdlLocation, QName serviceName) {
77         super(wsdlLocation, serviceName);
78     }
79
80     public SDNCAdapterService() {
81         super(WSDL_LOCATION, SERVICE);
82     }
83
84     //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
85     //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
86     //compliant code instead.
87     public SDNCAdapterService(WebServiceFeature ... features) {
88         super(WSDL_LOCATION, SERVICE, features);
89     }
90
91     //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
92     //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
93     //compliant code instead.
94     public SDNCAdapterService(URL wsdlLocation, WebServiceFeature ... features) {
95         super(wsdlLocation, SERVICE, features);
96     }
97
98     //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
99     //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
100     //compliant code instead.
101     public SDNCAdapterService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
102         super(wsdlLocation, serviceName, features);
103     }
104
105     /**
106      *
107      * @return
108      *     returns SDNCAdapterPortType
109      */
110     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
111     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort() {
112         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class);
113     }
114
115     /**
116      *
117      * @param features
118      *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
119      * @return
120      *     returns SDNCAdapterPortType
121      */
122     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
123     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort(WebServiceFeature... features) {
124         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class, features);
125     }
126 }