@Override public GetCurrentMessageResponse createGetCurrentMessageResponse() throws WSNotificationException { return new GetCurrentMessageResponseImpl(WSNotificationJAXBContext.wsnbFactory.createGetCurrentMessageResponse(), null); }
/** * Default constructor */ protected GetCurrentMessageResponseImpl(NotificationMessageHolderType.Message notification) { this.jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createGetCurrentMessageResponse(); this.jaxbTypeObj.getAny().add(notification.getAny()); }
/** * A way to create a {@link com.ebmwebsourcing.wsstar.notification.base.GetCurrentMessageResponse} * "Jaxb model type" object from a {@link GetCurrentMessageResponse} "api type" one * * @param apiTypeObj */ public static com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse toJaxbModel(GetCurrentMessageResponse apiTypeObj) { com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse jaxbTypeObj = null; if (apiTypeObj instanceof GetCurrentMessageResponseImpl){ jaxbTypeObj = ((GetCurrentMessageResponseImpl)apiTypeObj).getJaxbTypeObj(); } else { jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createGetCurrentMessageResponse(); // ~~~~ Set Notification(s) ~~~~ List<NotificationMessageHolderType.Message> notifications = apiTypeObj.getNotifications(); List<Object> jaxbAny = jaxbTypeObj.getAny(); if (notifications != null){ for (NotificationMessageHolderType.Message notificationItem : notifications) { jaxbAny.add(notificationItem.getAny()); } } } return jaxbTypeObj; } }