Java class for anonymous complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + *+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "id" +}) +@XmlRootElement(name = "getProductRequest") +public class GetProductRequest { + + @XmlElement(required = true) + protected String id; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/GetProductResponse.java b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/GetProductResponse.java new file mode 100644 index 0000000000..f8fcaa094f --- /dev/null +++ b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/GetProductResponse.java @@ -0,0 +1,64 @@ + +package com.baeldung.webservice.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *
Java class for anonymous complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="product" type="{http://baeldung.com/spring-boot-web-service}product"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + *+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "product" +}) +@XmlRootElement(name = "getProductResponse") +public class GetProductResponse { + + @XmlElement(required = true) + protected Product product; + + /** + * Gets the value of the product property. + * + * @return + * possible object is + * {@link Product } + * + */ + public Product getProduct() { + return product; + } + + /** + * Sets the value of the product property. + * + * @param value + * allowed object is + * {@link Product } + * + */ + public void setProduct(Product value) { + this.product = value; + } + +} diff --git a/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/ObjectFactory.java b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/ObjectFactory.java new file mode 100644 index 0000000000..015ecc3f0a --- /dev/null +++ b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/ObjectFactory.java @@ -0,0 +1,56 @@ + +package com.baeldung.webservice.generated; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the com.baeldung.webservice.generated package. + *
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: com.baeldung.webservice.generated + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetProductRequest } + * + */ + public GetProductRequest createGetProductRequest() { + return new GetProductRequest(); + } + + /** + * Create an instance of {@link GetProductResponse } + * + */ + public GetProductResponse createGetProductResponse() { + return new GetProductResponse(); + } + + /** + * Create an instance of {@link Product } + * + */ + public Product createProduct() { + return new Product(); + } + +} diff --git a/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/Product.java b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/Product.java new file mode 100644 index 0000000000..5957aa44b4 --- /dev/null +++ b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/Product.java @@ -0,0 +1,90 @@ + +package com.baeldung.webservice.generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *
Java class for product complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="product"> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/> + * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + *+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "product", propOrder = { + "id", + "name" +}) +public class Product { + + @XmlElement(required = true) + protected String id; + @XmlElement(required = true) + protected String name; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/package-info.java b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/package-info.java new file mode 100644 index 0000000000..298ae9374b --- /dev/null +++ b/spring-boot-modules/spring-boot-testing-2/src/main/java/com/baeldung/webservice/generated/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://baeldung.com/spring-boot-web-service", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package com.baeldung.webservice.generated; diff --git a/spring-boot-modules/spring-boot-testing-2/src/main/resources/webservice/products.xsd b/spring-boot-modules/spring-boot-testing-2/src/main/resources/webservice/products.xsd new file mode 100644 index 0000000000..3819b465be --- /dev/null +++ b/spring-boot-modules/spring-boot-testing-2/src/main/resources/webservice/products.xsd @@ -0,0 +1,26 @@ +