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.onap.so.adapters.sdnc.client;
24 import java.io.StringWriter;
26 import javax.xml.bind.JAXBContext;
27 import javax.xml.bind.Marshaller;
28 import javax.xml.bind.annotation.XmlAccessType;
29 import javax.xml.bind.annotation.XmlAccessorType;
30 import javax.xml.bind.annotation.XmlElement;
31 import javax.xml.bind.annotation.XmlRootElement;
32 import javax.xml.bind.annotation.XmlType;
34 import org.onap.so.logger.MessageEnum;
35 import org.onap.so.logger.MsoLogger;
37 * <p>Java class for anonymous complex type.
39 * <p>The following schema fragment specifies the expected content contained within this class.
44 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
46 * <element ref="{http://org.onap/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
47 * <element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
50 * </complexContent>
56 //SDNCAdapter to BPEL Async response
57 @XmlAccessorType(XmlAccessType.FIELD)
58 @XmlType(name = "", propOrder = {
62 @XmlRootElement(name = "SDNCAdapterCallbackRequest")
63 public class SDNCAdapterCallbackRequest {
65 @XmlElement(name = "CallbackHeader", required = true)
66 protected CallbackHeader callbackHeader;
67 @XmlElement(name = "RequestData")
68 protected Object requestData;
70 private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, SDNCAdapterCallbackRequest.class);
73 * Gets the value of the callbackHeader property.
77 * {@link CallbackHeader }
80 public CallbackHeader getCallbackHeader() {
81 return callbackHeader;
85 * Sets the value of the callbackHeader property.
89 * {@link CallbackHeader }
92 public void setCallbackHeader(CallbackHeader value) {
93 this.callbackHeader = value;
97 * Gets the value of the requestData property.
104 public Object getRequestData() {
109 * Sets the value of the requestData property.
116 public void setRequestData(Object value) {
117 this.requestData = value;
121 public String toString() {
123 JAXBContext ctx = JAXBContext.newInstance("org.onap.so.adapters.sdnc.client");
124 Marshaller m = ctx.createMarshaller();
125 m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
126 m.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
127 StringWriter w = new StringWriter();
133 msoLogger.error(MessageEnum.RA_MARSHING_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception - MARSHING_ERROR", e);