Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 8113b21e authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix missing XML Error entity

parent 4bd7035d
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 85 deletions
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2023.04.13 at 02:31:58 PM CEST
//
package ec.services.smp._1;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the ec.services.smp._1 package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: ec.services.smp._1
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ErrorResponse }
*
*/
public ErrorResponse createErrorResponse() {
return new ErrorResponse();
}
}
......@@ -13,7 +13,7 @@
package eu.europa.ec.edelivery.smp.error;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.data.ui.exceptions.ErrorResponseRO;
import eu.europa.ec.edelivery.smp.exceptions.ErrorBusinessCode;
import org.slf4j.Logger;
......
......@@ -15,7 +15,7 @@ package eu.europa.ec.edelivery.smp.error;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.exceptions.ErrorBusinessCode;
import eu.europa.ec.edelivery.smp.ui.ResourceConstants;
import org.apache.commons.lang3.StringUtils;
......
......@@ -13,7 +13,7 @@
package eu.europa.ec.edelivery.smp.error;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.exceptions.BadRequestException;
import eu.europa.ec.edelivery.smp.error.exceptions.SMPResponseStatusException;
import eu.europa.ec.edelivery.smp.exceptions.ErrorBusinessCode;
......
......@@ -6,14 +6,14 @@
//
package ec.services.smp._1;
package eu.europa.ec.edelivery.smp.error.xml;
import javax.xml.bind.annotation.*;
/**
* <p>Java class for ErrorResponseType complex type.
* XML exception for REST API responses
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
......
......@@ -6,4 +6,4 @@
//
@javax.xml.bind.annotation.XmlSchema(namespace = "ec:services:SMP:1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package ec.services.smp._1;
package eu.europa.ec.edelivery.smp.error.xml;
package eu.europa.ec.edelivery.smp.ui.exception;
import org.springframework.http.HttpStatus;
import java.util.Arrays;
import java.util.List;
public class UIException {
private HttpStatus status;
private String message;
private List<String> errors;
public UIException(HttpStatus status, String message, List<String> errors) {
super();
this.status = status;
this.message = message;
this.errors = errors;
}
public UIException(HttpStatus status, String message, String error) {
super();
this.status = status;
this.message = message;
errors = Arrays.asList(error);
}
}
......@@ -13,7 +13,7 @@
package eu.europa.ec.edelivery.smp.error;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.exceptions.ErrorBusinessCode;
import org.junit.Test;
import org.springframework.http.ResponseEntity;
......
......@@ -2,7 +2,7 @@ package eu.europa.ec.edelivery.smp.error;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.exceptions.ErrorBusinessCode;
import eu.europa.ec.edelivery.smp.ui.ResourceConstants;
import org.junit.Test;
......@@ -134,4 +134,4 @@ public class SMPSecurityExceptionHandlerTest {
assertEquals(error.getErrorDescription(), result.getErrorDescription());
assertEquals(error.getErrorUniqueId(), result.getErrorUniqueId());
}
}
\ No newline at end of file
}
package eu.europa.ec.edelivery.smp.error;
import ec.services.smp._1.ErrorResponse;
import eu.europa.ec.edelivery.smp.error.xml.ErrorResponse;
import eu.europa.ec.edelivery.smp.exceptions.BadRequestException;
import eu.europa.ec.edelivery.smp.exceptions.*;
import org.junit.Test;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment