Initial OpenECOMP MSO commit
[so.git] / adapters / mso-sdnc-adapter / src / main / java / org / openecomp / mso / adapters / sdnc / SDNCAdapterService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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.openecomp.mso.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.openecomp.mso.adapters.sdnc.impl.MsoLogger;
33 import org.openecomp.mso.logger.MsoLogger;
34 import org.openecomp.mso.logger.MessageEnum;
35
36 /**
37  * This class was generated by Apache CXF 2.7.11.redhat-3
38  * 2015-01-27T18:25:50.994-05:00
39  * Generated source version: 2.7.11.redhat-3
40  *
41  */
42 //BPEL SDNCAdapter SOAP WebService
43 @WebServiceClient(name = "SDNCAdapterService",
44                   wsdlLocation = "main/resources/SDNCAdapter.wsdl",
45                   targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1")
46 public class SDNCAdapterService extends Service {
47
48         private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
49
50     public final static URL WSDL_LOCATION;
51
52     public final static QName SERVICE = new QName("http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterService");
53     public final static QName SDNCAdapterSoapHttpPort = new QName("http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterSoapHttpPort");
54     static {
55         URL wsdlUrl = null;
56         try {
57                 wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl");
58                 //wsdlUrl = SDNCAdapterService.class.getClassLoader().getResource("SDNCAdapter.wsdl");
59         } catch (Exception e) {
60             logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e);
61         }
62         if(wsdlUrl == null) {
63                 logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "WSDL not found");
64         } else {
65                 try {
66                                 logger.info(MessageEnum.RA_PRINT_URL, "SDNCAdpater.wsdl", wsdlUrl.toURI().toString(), "", "");
67                         } catch (Exception e) {
68                                 logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e);
69                         }
70         }
71         WSDL_LOCATION = wsdlUrl;
72     }
73
74     public SDNCAdapterService(URL wsdlLocation) {
75         super(wsdlLocation, SERVICE);
76     }
77
78     public SDNCAdapterService(URL wsdlLocation, QName serviceName) {
79         super(wsdlLocation, serviceName);
80     }
81
82     public SDNCAdapterService() {
83         super(WSDL_LOCATION, SERVICE);
84     }
85
86     //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
87     //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
88     //compliant code instead.
89     public SDNCAdapterService(WebServiceFeature ... features) {
90         super(WSDL_LOCATION, SERVICE, features);
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(URL wsdlLocation, WebServiceFeature ... features) {
97         super(wsdlLocation, 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, QName serviceName, WebServiceFeature ... features) {
104         super(wsdlLocation, serviceName, features);
105     }
106
107     /**
108      *
109      * @return
110      *     returns SDNCAdapterPortType
111      */
112     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
113     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort() {
114         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class);
115     }
116
117     /**
118      *
119      * @param features
120      *     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.
121      * @return
122      *     returns SDNCAdapterPortType
123      */
124     @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
125     public SDNCAdapterPortType getSDNCAdapterSoapHttpPort(WebServiceFeature... features) {
126         return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class, features);
127     }
128 }