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