
org.mockserver.model.XmlSchemaBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-core Show documentation
Show all versions of mockserver-core Show documentation
Functionality used by all MockServer modules for matching and expectations
package org.mockserver.model;
import com.google.common.net.MediaType;
import org.mockserver.file.FileReader;
/**
* @author jamesdbloom
*/
public class XmlSchemaBody extends Body {
private final String xmlSchema;
public XmlSchemaBody(String xmlSchema) {
super(Type.XML_SCHEMA);
this.xmlSchema = xmlSchema;
}
public static XmlSchemaBody xmlSchema(String xmlSchema) {
return new XmlSchemaBody(xmlSchema);
}
public static XmlSchemaBody xmlSchemaFromResource(String xmlSchemaPath) {
return new XmlSchemaBody(FileReader.readFileFromClassPathOrPath(xmlSchemaPath));
}
public String getValue() {
return xmlSchema;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy