Commit c1745d51 authored by michael.simon's avatar michael.simon
Browse files

Adding XML Capabilities to attribute query interface

parent 9689164e
......@@ -48,6 +48,7 @@ import edu.kit.scc.webreg.service.RegistryService;
import edu.kit.scc.webreg.service.ServiceService;
import edu.kit.scc.webreg.service.UserService;
import edu.kit.scc.webreg.service.UserUpdateService;
import edu.kit.scc.webreg.util.ResourceBundleHelper;
@Path("/attrq")
public class AttributeQueryController {
......@@ -70,6 +71,9 @@ public class AttributeQueryController {
@Inject
private KnowledgeSessionService knowledgeSessionService;
@Inject
private ResourceBundleHelper resourceHelper;
@GET
@Path("/eppn/{service}/{eppn}")
@Produces(MediaType.APPLICATION_JSON)
......@@ -162,7 +166,7 @@ public class AttributeQueryController {
response.setMessage("rules failed");
for (UnauthorizedUser uu : unauthorizedUserList) {
addXmlError(response, uu.getMessage(), "");
addXmlError(response, uu.getMessage(), resourceHelper.resolveMessage(uu.getMessage()));
}
}
......
......@@ -2,10 +2,13 @@ package edu.kit.scc.webreg.rest.dto;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="attrq-response")
@XmlAccessorType(XmlAccessType.FIELD)
public class AttributeQueryResponse {
@XmlElement(name = "code")
......
package edu.kit.scc.webreg.rest.dto;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class RestError {
@XmlElement(name="short")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment