2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.adapters.sdnc.client;
24 import javax.xml.bind.annotation.XmlAccessType;
25 import javax.xml.bind.annotation.XmlAccessorType;
26 import javax.xml.bind.annotation.XmlElement;
27 import javax.xml.bind.annotation.XmlRootElement;
28 import javax.xml.bind.annotation.XmlType;
30 import javax.xml.bind.JAXBContext;
31 import javax.xml.bind.Marshaller;
32 import java.io.StringWriter;
33 import org.openecomp.mso.logger.MsoLogger;
34 import org.openecomp.mso.logger.MessageEnum;
36 * <p>Java class for anonymous complex type.
38 * <p>The following schema fragment specifies the expected content contained within this class.
43 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
45 * <element ref="{http://org.openecomp/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
46 * <element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
49 * </complexContent>
55 //SDNCAdapter to BPEL Async response
56 @XmlAccessorType(XmlAccessType.FIELD)
57 @XmlType(name = "", propOrder = {
61 @XmlRootElement(name = "SDNCAdapterCallbackRequest")
62 public class SDNCAdapterCallbackRequest {
64 @XmlElement(name = "CallbackHeader", required = true)
65 protected CallbackHeader callbackHeader;
66 @XmlElement(name = "RequestData")
67 protected Object requestData;
69 private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
72 * Gets the value of the callbackHeader property.
76 * {@link CallbackHeader }
79 public CallbackHeader getCallbackHeader() {
80 return callbackHeader;
84 * Sets the value of the callbackHeader property.
88 * {@link CallbackHeader }
91 public void setCallbackHeader(CallbackHeader value) {
92 this.callbackHeader = value;
96 * Gets the value of the requestData property.
103 public Object getRequestData() {
108 * Sets the value of the requestData property.
115 public void setRequestData(Object value) {
116 this.requestData = value;
120 public String toString() {
122 JAXBContext ctx = JAXBContext.newInstance("org.openecomp.mso.adapters.sdnc.client");
123 Marshaller m = ctx.createMarshaller();
124 m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
125 m.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
126 StringWriter w = new StringWriter();
128 return (w.toString());
132 msoLogger.error(MessageEnum.RA_MARSHING_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception - MARSHING_ERROR", e);