Replaced all tabs with spaces in java and pom.xml
[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 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 import org.onap.so.logger.ErrorCode;
34 import org.onap.so.logger.MessageEnum;
35 import org.slf4j.Logger;
36 import org.slf4j.LoggerFactory;
37
38 /**
39  * This class was generated by Apache CXF 2.7.11.redhat-3 2015-01-27T18:25:50.994-05:00 Generated source version:
40  * 2.7.11.redhat-3
41  *
42  */
43 // BPEL SDNCAdapter SOAP WebService
44 @WebServiceClient(name = "SDNCAdapterService", wsdlLocation = "main/resources/SDNCAdapter.wsdl",
45         targetNamespace = "http://org.onap/workflow/sdnc/adapter/wsdl/v1")
46 public class SDNCAdapterService extends Service {
47
48     private static Logger logger = LoggerFactory.getLogger(SDNCAdapterService.class);
49     private static final String SDNC_ADAPTER_WSDL = "SDNCAdapter.wsdl";
50
51     public static final URL WSDL_LOCATION;
52
53     public static final QName SERVICE =
54             new QName("http://org.onap/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterService");
55     public static final QName SDNCAdapterSoapHttpPort =
56             new QName("http://org.onap/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterSoapHttpPort");
57     static {
58         URL wsdlUrl = null;
59         try {
60             wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl");
61         } catch (Exception e) {
62             logger.error("{} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_ADAPTER_WSDL,
63                     ErrorCode.DataError.getValue(), "Exception - WSDL not found", e);
64         }
65         if (wsdlUrl == null) {
66             logger.error("{} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_ADAPTER_WSDL,
67                     ErrorCode.DataError.getValue(), "WSDL not found");
68         } else {
69             try {
70                 logger.info("{} {} {}", MessageEnum.RA_PRINT_URL.toString(), SDNC_ADAPTER_WSDL,
71                         wsdlUrl.toURI().toString());
72             } catch (Exception e) {
73                 logger.error("{} {} {} {}", MessageEnum.RA_WSDL_URL_CONVENTION_EXC.toString(), SDNC_ADAPTER_WSDL,
74                         ErrorCode.DataError.getValue(), "Exception - print URL", e);
75             }
76         }
77         WSDL_LOCATION = wsdlUrl;
78     }
79
80     public SDNCAdapterService(URL wsdlLocation) {
81         super(wsdlLocation, SERVICE);
82     }
83
84     public SDNCAdapterService(URL wsdlLocation, QName serviceName) {
85         super(wsdlLocation, serviceName);
86     }
87
88     public SDNCAdapterService() {
89         super(WSDL_LOCATION, SERVICE);
90     }
91
92     // This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
93     // API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
94     // compliant code instead.
95     public SDNCAdapterService(WebServiceFeature... features) {
96         super(WSDL_LOCATION, SERVICE, features);
97     }
98
99     // This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
100     // API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
101     // compliant code instead.
102     public SDNCAdapterService(URL wsdlLocation, WebServiceFeature... features) {
103         super(wsdlLocation, SERVICE, features);
104     }
105
106     // This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
107     // API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
108     // compliant code instead.
109     public SDNCAdapterService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
110         super(wsdlLocation, serviceName, features);
111     }
112
113     /**
114      *
115      * @return returns SDNCAdapterPortType
116      */
117     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
118     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort() {
119         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class);
120     }
121
122     /**
123      *
124      * @param features A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features
125      *        not in the <code>features</code> parameter will have their default values.
126      * @return returns SDNCAdapterPortType
127      */
128     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
129     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort(WebServiceFeature... features) {
130         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class, features);
131     }
132 }