From cce2405273dc3c941015860c3d8926741cebc4bd Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 4 Apr 2019 17:15:53 -0400 Subject: add custom mapper to soap endpoint argument add custom mapper to soap endpoint argument Change-Id: Ib57a3ac98c788461bf305965b6d34e7db2433d0a Issue-ID: SO-1747 Signed-off-by: Benjamin, Max (mb388a) --- .../src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java | 10 ++++++---- .../main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'adapters') diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java index aafcb1c600..349aa78d44 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java @@ -28,6 +28,7 @@ import javax.jws.WebParam; import javax.jws.WebParam.Mode; import javax.jws.WebService; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.ws.Holder; import org.onap.so.adapters.vnf.exceptions.VnfAlreadyExists; @@ -35,6 +36,7 @@ import org.onap.so.adapters.vnf.exceptions.VnfException; import org.onap.so.entity.MsoRequest; import org.onap.so.openstack.beans.VnfRollback; import org.onap.so.openstack.beans.VnfStatus; +import org.onap.so.openstack.mappers.MapAdapter; @WebService (name="VnfAdapter", targetNamespace="http://org.onap.so/vnf") public interface MsoVnfAdapter @@ -51,7 +53,7 @@ public interface MsoVnfAdapter @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -70,7 +72,7 @@ public interface MsoVnfAdapter @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="outputs", mode=Mode.OUT) Holder> outputs, @WebParam(name="rollback", mode=Mode.OUT) Holder rollback ) @@ -114,7 +116,7 @@ public interface MsoVnfAdapter @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId, @WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -145,7 +147,7 @@ public interface MsoVnfAdapter @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId, @WebParam(name="vfModuleStackId") @XmlElement(required=false) String vfModuleStackId, @WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="outputs", mode=Mode.OUT) Holder> outputs, @WebParam(name="rollback", mode=Mode.OUT) Holder rollback ) diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java index 70afb1c69c..5642e01a72 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java @@ -28,9 +28,11 @@ import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.onap.so.entity.MsoRequest; import org.onap.so.openstack.beans.VnfRollback; +import org.onap.so.openstack.mappers.MapAdapter; /** * This webservice defines the Asynchronous versions of VNF adapter calls. @@ -54,7 +56,7 @@ public interface MsoVnfAdapterAsync @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="failIfExists") Boolean failIfExists, @WebParam(name="backout") Boolean backout, @WebParam(name="enableBridge") Boolean enableBridge, @@ -72,7 +74,7 @@ public interface MsoVnfAdapterAsync @WebParam(name="vnfName") @XmlElement(required=true) String vnfName, @WebParam(name="requestType") @XmlElement(required=false) String requestType, @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId, - @WebParam(name="inputs") Map inputs, + @WebParam(name="inputs") @XmlJavaTypeAdapter(MapAdapter.class) Map inputs, @WebParam(name="messageId") @XmlElement(required=true) String messageId, @WebParam(name="request") MsoRequest msoRequest, @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl ); -- cgit 1.2.3-korg