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