From 21835c3992570b981a85bd9f4eeab2e623d863dd Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 11 Feb 2009 20:12:17 +0000 Subject: GetStatusRequest git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@305 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../stal/service/translator/STALTranslator.java | 23 ++++++++- .../service/types/GetNextRequestResponseType.java | 15 +++--- .../stal/service/types/GetNextRequestType.java | 15 +++--- .../gv/egiz/stal/service/types/ObjectFactory.java | 39 +++++++++++++- .../at/gv/egiz/stal/service/types/RequestType.java | 7 +-- .../gv/egiz/stal/service/types/ResponseType.java | 5 +- .../egiz/stal/service/types/StatusRequestType.java | 32 ++++++++++++ .../stal/service/types/StatusResponseType.java | 60 ++++++++++++++++++++++ .../src/test/resources/commons-logging.properties | 1 - 9 files changed, 177 insertions(+), 20 deletions(-) create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/types/StatusRequestType.java create mode 100644 STALService/src/main/java/at/gv/egiz/stal/service/types/StatusResponseType.java delete mode 100644 STALService/src/test/resources/commons-logging.properties (limited to 'STALService/src') diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java b/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java index a52de482..1e6f4133 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java @@ -24,6 +24,8 @@ import at.gv.egiz.stal.STALRequest; import at.gv.egiz.stal.STALResponse; import at.gv.egiz.stal.SignRequest; import at.gv.egiz.stal.SignResponse; +import at.gv.egiz.stal.StatusRequest; +import at.gv.egiz.stal.StatusResponse; import at.gv.egiz.stal.service.types.ErrorResponseType; import at.gv.egiz.stal.service.types.InfoboxReadRequestType; import at.gv.egiz.stal.service.types.InfoboxReadResponseType; @@ -33,6 +35,8 @@ import at.gv.egiz.stal.service.types.RequestType; import at.gv.egiz.stal.service.types.ResponseType; import at.gv.egiz.stal.service.types.SignRequestType; import at.gv.egiz.stal.service.types.SignResponseType; +import at.gv.egiz.stal.service.types.StatusRequestType; +import at.gv.egiz.stal.service.types.StatusResponseType; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -181,15 +185,19 @@ public class STALTranslator { return Arrays.asList(new Class[]{InfoboxReadRequest.class, SignRequest.class, QuitRequest.class, + StatusRequest.class, InfoboxReadRequestType.class, SignRequestType.class, QuitRequestType.class, + StatusRequestType.class, InfoboxReadResponse.class, SignResponse.class, ErrorResponse.class, + StatusResponse.class, InfoboxReadResponseType.class, SignResponseType.class, - ErrorResponseType.class + ErrorResponseType.class, + StatusResponseType.class }); } @@ -209,6 +217,9 @@ public class STALTranslator { return of.createGetNextRequestResponseTypeInfoboxReadRequest(req); } else if (request instanceof QuitRequest) { return of.createGetNextRequestResponseTypeQuitRequest(of.createQuitRequestType()); + } else if (request instanceof StatusRequest) { + StatusRequestType req = of.createStatusRequestType(); + return of.createGetNextRequestResponseTypeStatusRequest(req); } throw new TranslationException(request.getClass()); } @@ -227,6 +238,8 @@ public class STALTranslator { return stalReq; } else if (request instanceof QuitRequestType) { return new QuitRequest(); + } else if (request instanceof StatusRequestType) { + return new StatusRequest(); } throw new TranslationException(request.getClass()); } @@ -246,6 +259,10 @@ public class STALTranslator { resp.setErrorCode(((ErrorResponse) response).getErrorCode()); resp.setErrorMessage(((ErrorResponse) response).getErrorMessage()); return of.createGetNextRequestTypeErrorResponse(resp); + } else if (response instanceof StatusResponse) { + StatusResponseType resp = of.createStatusResponseType(); + resp.setCardReady(((StatusResponse) response).isCardReady()); + return of.createGetNextRequestTypeStatusResponse(resp); } throw new TranslationException(response.getClass()); } @@ -265,6 +282,10 @@ public class STALTranslator { stalResp.setErrorCode(((ErrorResponseType) response).getErrorCode()); stalResp.setErrorMessage(((ErrorResponseType) response).getErrorMessage()); return stalResp; + } else if (response instanceof StatusResponseType) { + StatusResponse stalResp = new StatusResponse(); + stalResp.setCardReady(((StatusResponseType) response).isCardReady()); + return stalResp; } throw new TranslationException(response.getClass()); } diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestResponseType.java index 0f56c3ce..7c1f881e 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestResponseType.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestResponseType.java @@ -10,7 +10,7 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementRefs; import javax.xml.bind.annotation.XmlType; -//import at.buergerkarte.namespaces.cardchannel.ScriptType; +//import at.buergerkarte.namespaces.cardchannel.service.ScriptType; /** @@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlType; * <element name="InfoboxReadRequest" type="{http://www.egiz.gv.at/stal}InfoboxReadRequestType"/> * <element name="SignRequest" type="{http://www.egiz.gv.at/stal}SignRequestType"/> * <element name="QuitRequest" type="{http://www.egiz.gv.at/stal}QuitRequestType"/> + * <element name="StatusRequest" type="{http://www.egiz.gv.at/stal}StatusRequestType"/> * <element ref="{http://www.egiz.gv.at/stal}OtherRequest"/> * </choice> * <attribute name="SessionId" type="{http://www.w3.org/2001/XMLSchema}string" /> @@ -43,10 +44,11 @@ import javax.xml.bind.annotation.XmlType; public class GetNextRequestResponseType { @XmlElementRefs({ - @XmlElementRef(name = "SignRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), - @XmlElementRef(name = "QuitRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), @XmlElementRef(name = "OtherRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), - @XmlElementRef(name = "InfoboxReadRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class) + @XmlElementRef(name = "QuitRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "InfoboxReadRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "SignRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "StatusRequest", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class) }) protected List> infoboxReadRequestOrSignRequestOrQuitRequest; @XmlAttribute(name = "SessionId") @@ -70,10 +72,11 @@ public class GetNextRequestResponseType { * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link QuitRequestType }{@code >} * {@link JAXBElement }{@code <}{@link RequestType }{@code >} - * {@link JAXBElement }{@code <}{@link ScriptType }{@code >} + * {@link JAXBElement }{@code <}{@link QuitRequestType }{@code >} * {@link JAXBElement }{@code <}{@link InfoboxReadRequestType }{@code >} + * {@link JAXBElement }{@code <}{@link ScriptType }{@code >} + * {@link JAXBElement }{@code <}{@link StatusRequestType }{@code >} * {@link JAXBElement }{@code <}{@link SignRequestType }{@code >} * * diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestType.java index 320d9136..691ecd9b 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestType.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/GetNextRequestType.java @@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlType; * <element name="InfoboxReadResponse" type="{http://www.egiz.gv.at/stal}InfoboxReadResponseType"/> * <element name="SignResponse" type="{http://www.egiz.gv.at/stal}SignResponseType"/> * <element name="ErrorResponse" type="{http://www.egiz.gv.at/stal}ErrorResponseType"/> + * <element name="StatusResponse" type="{http://www.egiz.gv.at/stal}StatusResponseType"/> * <element ref="{http://www.egiz.gv.at/stal}OtherResponse"/> * </choice> * <attribute name="SessionId" type="{http://www.w3.org/2001/XMLSchema}string" /> @@ -42,10 +43,11 @@ import javax.xml.bind.annotation.XmlType; public class GetNextRequestType { @XmlElementRefs({ - @XmlElementRef(name = "ErrorResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), - @XmlElementRef(name = "SignResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "StatusResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "InfoboxReadResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), @XmlElementRef(name = "OtherResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), - @XmlElementRef(name = "InfoboxReadResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class) + @XmlElementRef(name = "ErrorResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class), + @XmlElementRef(name = "SignResponse", namespace = "http://www.egiz.gv.at/stal", type = JAXBElement.class) }) protected List> infoboxReadResponseOrSignResponseOrErrorResponse; @XmlAttribute(name = "SessionId") @@ -69,10 +71,11 @@ public class GetNextRequestType { * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link SignResponseType }{@code >} - * {@link JAXBElement }{@code <}{@link at.buergerkarte.namespaces.cardchannel.ResponseType }{@code >} - * {@link JAXBElement }{@code <}{@link ErrorResponseType }{@code >} + * {@link JAXBElement }{@code <}{@link at.buergerkarte.namespaces.cardchannel.service.ResponseType }{@code >} + * {@link JAXBElement }{@code <}{@link StatusResponseType }{@code >} * {@link JAXBElement }{@code <}{@link at.gv.egiz.stal.service.types.ResponseType }{@code >} + * {@link JAXBElement }{@code <}{@link ErrorResponseType }{@code >} + * {@link JAXBElement }{@code <}{@link SignResponseType }{@code >} * {@link JAXBElement }{@code <}{@link InfoboxReadResponseType }{@code >} * * diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/ObjectFactory.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/ObjectFactory.java index 8b6fb76a..297fc924 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/types/ObjectFactory.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/ObjectFactory.java @@ -38,7 +38,9 @@ public class ObjectFactory { private final static QName _GetNextRequestTypeErrorResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "ErrorResponse"); private final static QName _GetNextRequestTypeSignResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "SignResponse"); private final static QName _GetNextRequestTypeInfoboxReadResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "InfoboxReadResponse"); - + private final static QName _GetNextRequestResponseTypeStatusRequest_QNAME = new QName("http://www.egiz.gv.at/stal", "StatusRequest"); + private final static QName _GetNextRequestTypeStatusResponse_QNAME = new QName("http://www.egiz.gv.at/stal", "StatusResponse"); + /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.egiz.stal.service.types * @@ -46,6 +48,22 @@ public class ObjectFactory { public ObjectFactory() { } + /** + * Create an instance of {@link StatusResponseType } + * + */ + public StatusResponseType createStatusResponseType() { + return new StatusResponseType(); + } + + /** + * Create an instance of {@link StatusRequestType } + * + */ + public StatusRequestType createStatusRequestType() { + return new StatusRequestType(); + } + /** * Create an instance of {@link GetHashDataInputType } * @@ -150,6 +168,25 @@ public class ObjectFactory { return new GetHashDataInputFaultType(); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link StatusRequestType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "StatusRequest", scope = GetNextRequestResponseType.class) + public JAXBElement createGetNextRequestResponseTypeStatusRequest(StatusRequestType value) { + return new JAXBElement(_GetNextRequestResponseTypeStatusRequest_QNAME, StatusRequestType.class, GetNextRequestResponseType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link StatusResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.egiz.gv.at/stal", name = "StatusResponse", scope = GetNextRequestType.class) + public JAXBElement createGetNextRequestTypeStatusResponse(StatusResponseType value) { + return new JAXBElement(_GetNextRequestTypeStatusResponse_QNAME, StatusResponseType.class, GetNextRequestType.class, value); + } + + /** * Create an instance of {@link JAXBElement }{@code <}{@link GetHashDataInputType }{@code >}} * diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/RequestType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/RequestType.java index 9e5ebf59..407fc8a4 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/types/RequestType.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/RequestType.java @@ -5,7 +5,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; -//import at.buergerkarte.namespaces.cardchannel.ScriptType; +//import at.buergerkarte.namespaces.cardchannel.service.ScriptType; /** @@ -27,10 +27,11 @@ import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RequestType") @XmlSeeAlso({ +// ScriptType.class, SignRequestType.class, InfoboxReadRequestType.class, - QuitRequestType.class -// ScriptType.class + QuitRequestType.class, + StatusRequestType.class }) public abstract class RequestType { diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/ResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/ResponseType.java index e9b732fe..8d5e1e77 100644 --- a/STALService/src/main/java/at/gv/egiz/stal/service/types/ResponseType.java +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/ResponseType.java @@ -26,10 +26,11 @@ import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ResponseType") @XmlSeeAlso({ +// at.buergerkarte.namespaces.cardchannel.service.ResponseType.class, ErrorResponseType.class, InfoboxReadResponseType.class, - SignResponseType.class -// at.buergerkarte.namespaces.cardchannel.ResponseType.class + SignResponseType.class, + StatusResponseType.class }) public abstract class ResponseType { diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusRequestType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusRequestType.java new file mode 100644 index 00000000..44269a0c --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusRequestType.java @@ -0,0 +1,32 @@ + +package at.gv.egiz.stal.service.types; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for StatusRequestType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StatusRequestType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}RequestType">
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StatusRequestType") +public class StatusRequestType + extends RequestType +{ + + +} diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusResponseType.java new file mode 100644 index 00000000..581fdc0e --- /dev/null +++ b/STALService/src/main/java/at/gv/egiz/stal/service/types/StatusResponseType.java @@ -0,0 +1,60 @@ + +package at.gv.egiz.stal.service.types; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for StatusResponseType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="StatusResponseType">
+ *   <complexContent>
+ *     <extension base="{http://www.egiz.gv.at/stal}ResponseType">
+ *       <attribute name="cardReady" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StatusResponseType") +public class StatusResponseType + extends ResponseType +{ + + @XmlAttribute + protected Boolean cardReady; + + /** + * Gets the value of the cardReady property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isCardReady() { + return cardReady; + } + + /** + * Sets the value of the cardReady property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setCardReady(Boolean value) { + this.cardReady = value; + } + +} diff --git a/STALService/src/test/resources/commons-logging.properties b/STALService/src/test/resources/commons-logging.properties deleted file mode 100644 index 29292562..00000000 --- a/STALService/src/test/resources/commons-logging.properties +++ /dev/null @@ -1 +0,0 @@ -org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger -- cgit v1.2.3