From 1e12c62cab20d1279bbb935cf67c8e9c341bd372 Mon Sep 17 00:00:00 2001 From: hperadin Date: Mon, 10 Mar 2014 09:57:21 +0100 Subject: [PATCH 01/30] An XML -> JSON deserializer draft; An XmlNamespaceManager (should be excluded in the next iteration - is neither better,faster nor stronger); Tests for XML -> JSON conversion, also drafts of tests for JSON->XML conversion which fail since there is yet no converter --- .../deserializers/XmlJsonDeserializer.java | 28 ++ .../json/serializers/XmlJsonSerializer.java | 454 ++++++++++++++++++ .../java/io/jvm/xml/XmlNamespaceManager.java | 123 +++++ .../io/jvm/json/Json2XmlRoundTripTest.java | 14 + .../io/jvm/json/Xml2JsonRoundTripTest.java | 199 ++++++++ .../test/resources/roundtripTests/README.md | 32 ++ .../generate_reference_conversions.sh | 13 + .../reference/CurrencyConvertor.xml.json | 1 + .../reference/CurrencyConvertor.xml.json.xml | 1 + .../roundtripTests/reference/Weather.xml.json | 1 + .../reference/Weather.xml.json.xml | 1 + .../roundtripTests/reference/boox.xml.json | 1 + .../reference/boox.xml.json.xml | 22 + .../reference/cdatatest.xml.json | 1 + .../reference/cdatatest.xml.json.xml | 13 + .../roundtripTests/reference/hello.xml.json | 1 + .../reference/hello.xml.json.xml | 1 + .../roundtripTests/reference/modes.xml.json | 1 + .../reference/modes.xml.json.xml | 1 + .../reference/purchaseOrder.xml.json | 1 + .../reference/purchaseOrder.xml.json.xml | 9 + .../reference/purchaseOrderInstance.xml.json | 1 + .../purchaseOrderInstance.xml.json.xml | 1 + .../reference/samlRequest.xml.json | 1 + .../reference/samlRequest.xml.json.xml | 5 + .../reference/samlResponse.xml.json | 1 + .../reference/samlResponse.xml.json.xml | 41 ++ .../source/CurrencyConvertor.xml | 280 +++++++++++ .../roundtripTests/source/Weather.xml | 348 ++++++++++++++ .../resources/roundtripTests/source/boox.xml | 120 +++++ .../roundtripTests/source/cdatatest.xml | 16 + .../resources/roundtripTests/source/hello.xml | 50 ++ .../resources/roundtripTests/source/modes.xml | 177 +++++++ .../roundtripTests/source/purchaseOrder.xml | 75 +++ .../source/purchaseOrderInstance.xml | 31 ++ .../roundtripTests/source/samlRequest.xml | 11 + .../roundtripTests/source/samlResponse.xml | 125 +++++ .../source/withComments/modes.xml | 181 +++++++ .../source/withComments/purchaseOrder.xml | 76 +++ .../source/withprolog/CurrencyConvertor.xml | 281 +++++++++++ .../source/withprolog/Weather.xml | 349 ++++++++++++++ .../roundtripTests/source/withprolog/boox.xml | 121 +++++ .../source/withprolog/modes.xml | 178 +++++++ .../source/withprolog/purchaseOrder.xml | 75 +++ 44 files changed, 3462 insertions(+) create mode 100644 json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java create mode 100644 json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java create mode 100644 json/src/main/java/io/jvm/xml/XmlNamespaceManager.java create mode 100644 json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java create mode 100644 json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java create mode 100644 json/src/test/resources/roundtripTests/README.md create mode 100755 json/src/test/resources/roundtripTests/generate_reference_conversions.sh create mode 100644 json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/Weather.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/boox.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/boox.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/cdatatest.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/hello.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/hello.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/modes.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/modes.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/samlRequest.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/reference/samlResponse.xml.json create mode 100644 json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml create mode 100644 json/src/test/resources/roundtripTests/source/Weather.xml create mode 100644 json/src/test/resources/roundtripTests/source/boox.xml create mode 100644 json/src/test/resources/roundtripTests/source/cdatatest.xml create mode 100644 json/src/test/resources/roundtripTests/source/hello.xml create mode 100644 json/src/test/resources/roundtripTests/source/modes.xml create mode 100644 json/src/test/resources/roundtripTests/source/purchaseOrder.xml create mode 100644 json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml create mode 100644 json/src/test/resources/roundtripTests/source/samlRequest.xml create mode 100644 json/src/test/resources/roundtripTests/source/samlResponse.xml create mode 100644 json/src/test/resources/roundtripTests/source/withComments/modes.xml create mode 100644 json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml create mode 100644 json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml create mode 100644 json/src/test/resources/roundtripTests/source/withprolog/Weather.xml create mode 100644 json/src/test/resources/roundtripTests/source/withprolog/boox.xml create mode 100644 json/src/test/resources/roundtripTests/source/withprolog/modes.xml create mode 100644 json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java new file mode 100644 index 0000000..fd09a13 --- /dev/null +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -0,0 +1,28 @@ +package io.jvm.json.deserializers; + +import java.io.IOException; +import java.util.UUID; + +import org.w3c.dom.Document; + +import io.jvm.json.JsonDeserializer; +import io.jvm.json.JsonReader; + +public class XmlJsonDeserializer implements JsonDeserializer{ + + private static final Document[] ZERO_ARRAY = new Document[0]; + + @Override + public Document[] getZeroArray() { + return ZERO_ARRAY; + } + + @Override + public Document fromJson(JsonReader jsonReader) throws IOException { + // TODO Auto-generated method stub + return null; + } + + + +} diff --git a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java new file mode 100644 index 0000000..a2661c2 --- /dev/null +++ b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java @@ -0,0 +1,454 @@ +package io.jvm.json.serializers; + +import io.jvm.json.JsonSerializer; +import io.jvm.json.JsonWriter; +import io.jvm.xml.XmlNamespaceManager; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * Converts an org.w3c.dom.Element to JSON, matching the scheme used in the + * serialization library Json.Net, Version 6.0.1 (@see documentation at Json.NET) + */ +public class XmlJsonSerializer implements JsonSerializer { + + /* Interface methods */ + + @Override + public boolean isDefault(Element value) { + return false; + } + + @Override + public void toJson(JsonWriter jsonWriter, Element value) throws IOException { + if (value != null) + writeJson(jsonWriter, value); + } + + /* Implementation */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; + + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; + + // This is only a partial reimplementation, so the following fields are + // fixed and made private: + private final String deserializeRootElementName = null; + private final boolean writeArrayAttribute = false; + private final boolean omitRootObject = false; + + /** + * Write a Json representation of a given org.w3c.dom.Element. + * + * @param writer + * The writer to write to. + * @param element + * The element to be converted. + * @throws IOException + */ + private void writeJson(final JsonWriter writer, final Element element) + throws IOException { + + final XmlNamespaceManager manager = new XmlNamespaceManager(); + pushParentNamespaces(element, manager); + + if (!omitRootObject) + writer.writeOpenObject(); + + //writeXmlDeclaration(writer,element.getOwnerDocument(),manager); + + serializeNode(writer, element, manager, !omitRootObject); + + if (!omitRootObject) + writer.writeCloseObject(); + } + + private void pushParentNamespaces(final Element element, + final XmlNamespaceManager manager) { + final List parentElements = new ArrayList(); + + /* Collect all ancestors from the document tree for the current element */ + Node parent = element; + while (parent.getParentNode() != null) { + parent = parent.getParentNode(); + if (parent.getNodeType() == Node.ELEMENT_NODE) + parentElements.add((Element) parent); + } + + /* If the current element has ancestors */ + if (parentElements.isEmpty() == false) { + + /* + * Add a namespace scope for each ancestor of the current node, top + * to bottom + */ + Collections.reverse(parentElements); + for (final Element parentElement : parentElements) { + + manager.pushScope(); + + /* + * Find if there are any namespace attributes, and add them to + * the current namespace scope + */ + final NamedNodeMap attributes = parentElement.getAttributes(); + for (int i = 0; i < attributes.getLength(); i++) { + final Attr attribute = (Attr) attributes.item(i); + if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL) + && (equalsWithNull(resolveLocalName(attribute),xmlnsPrefix) == false)) { + manager.addNamespace(resolveLocalName(attribute), attribute.getValue()); + } + } + } + } + } + + private String resolveLocalName(Node node){ + + if(node.getLocalName() == null && node.getPrefix()==null) + return node.getNodeName(); + else + return node.getLocalName(); + } + + /** + * Returns the full name of the given node, along with the prefix resolved + * from the namespace manager + */ + private String resolveFullName(final Node node, final XmlNamespaceManager manager){ + + String prefix; + String fullName; + + /* If it's an xmlns node with the default xmlnsURL namespace, prefix is null, otherwise we pull it out from the namespace manager */ + if(node.getNamespaceURI() == null + || (equalsWithNull(resolveLocalName(node),xmlnsPrefix) && equalsWithNull(node.getNamespaceURI(),xmlnsURL))) + prefix = null; + else + prefix = manager.lookupPrefix(node.getNamespaceURI()); + + /* If the prefix is null or empty we return just the local name, without any prepended prefix*/ + if(prefix == null || equalsWithNull(prefix,"")) + fullName=resolveLocalName(node); + /* Otherwise we return the full prefix:localName string */ + else + fullName=prefix + ":" + resolveLocalName(node); + + return fullName; + } + + /** + * Returns one of the string constants names for the type of the given node type. + * throws IOException if type is unknown. + * @throws IOException + */ + private String getPropertyName(final Node node, final XmlNamespaceManager manager) throws IOException { + switch (node.getNodeType()) { + case Node.ATTRIBUTE_NODE: + if (equalsWithNull(node.getNamespaceURI(),jsonNamespaceUri)) + return "$" + resolveLocalName(node); + else + return "@" + resolveFullName(node, manager); + case Node.CDATA_SECTION_NODE: + return cDataNodeTag; + case Node.COMMENT_NODE: + return commentNodeTag; + case Node.ELEMENT_NODE: + return resolveFullName(node, manager); + case Node.PROCESSING_INSTRUCTION_NODE: + return "?" + resolveFullName(node, manager); + // XXX: The .NET System.Xml.XmlNodeType and org.w3c.dom.Node enumerations are not mapped 1:1 + // case Node.XmlDeclaration: + // return DeclarationName; + // case Node.SignificantWhitespace: + // return SignificantWhitespaceName; + case Node.TEXT_NODE: + return textNodeTag; + // case Node.Whitespace: + // return WhitespaceName; + default: + throw new IOException( + "Unexpected Node when getting node name: " + node.getNodeType()); + } + } + + /** + * Returns true if this node has the property json:Array from jsonNamespaceUri set to 'true', + * false otherwise + */ + private boolean isArray(final Node node){ + final NamedNodeMap attributes = node.getAttributes(); + + if(attributes == null || attributes.getLength() == 0) + return false; + else { + /* Return true the attribute json:Array from the jsonNamespaceUri is 'true': */ + for(int i=0; i + * If the node has no children, an empty map is returned. + * @throws IOException + */ + private Map> getNodesGroupedByName(final Node root, final XmlNamespaceManager manager) throws IOException{ + + final Map> nodesGroupedByName = new HashMap>(); + + final NodeList children = root.getChildNodes(); + + for (int i = 0; i < children.getLength(); i++){ + /* Get the i-th child*/ + final Node child = children.item(i); + + /* Get the name of the current child */ + String nodeName=getPropertyName(child, manager); + + /* If the node list is not instantiated for this nodeName, make an instance */ + if(nodesGroupedByName.get(nodeName) == null) + nodesGroupedByName.put(nodeName, new ArrayList()); + + /* Add the node to the list for this nodeName*/ + nodesGroupedByName.get(nodeName).add(child); + } + + return nodesGroupedByName; + } + + private void serializeArray(final JsonWriter writer, final String nameOfTheElements, final List nodes, final XmlNamespaceManager manager, boolean writePropertyName) throws IOException{ + + if (writePropertyName){ + writer.writeString(nameOfTheElements); + writer.writeColon(); + } + + writer.writeOpenArray(); + + for (int i = 0; i < nodes.size(); i++) + { + serializeNode(writer, nodes.get(i), manager, false); + } + + writer.writeCloseArray(); + } + + /** + * True if all children's local name is equal to node's local name. + */ + private boolean allChildrenHaveSameLocalName(final Node node){ + + final NodeList children = node.getChildNodes(); + + for(int i=0; i> nodesGroupedByName = getNodesGroupedByName(node, manager); + + /* Loop through grouped nodes. write single name instances as normal, write multiple names together in an array */ + for(Map.Entry> nameNodesMapping : nodesGroupedByName.entrySet()){ + + final String name=nameNodesMapping.getKey(); + final List nodesHavingName=nameNodesMapping.getValue(); + + /* By default we don't write nodes as arrays */ + boolean writeAsArray=false; + + /* All groups of nodes are written as arrays, while single nodes are written as an array only if they have the Array attribute set */ + if(nodesHavingName.size() == 1) + writeAsArray = isArray(nodesHavingName.get(0)); + else + writeAsArray = true; + + if(!writeAsArray) + serializeNode(writer,nodesHavingName.get(0),manager, writePropertyName); + else + serializeArray(writer, name, nodesHavingName,manager, writePropertyName); + + } + } + + private boolean equalsWithNull(Object lhs, Object rhs){ + if(lhs == null && rhs == null) + return true; + else if(lhs ==null || rhs == null) + return false; + else + return lhs.equals(rhs); + } +} diff --git a/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java new file mode 100644 index 0000000..ae7d04a --- /dev/null +++ b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java @@ -0,0 +1,123 @@ +package io.jvm.xml; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Stack; + +/** + * An ad-hoc implementation of an XmlNamespaceManager. + * Provides operations for adding/removing and resolving namespaces, + * and scope management. + * + * Partially mirrors the functionality of .NET's System.Xml.XmlNamespaceManager. + * + * Used for the implementation of XmlJsonSerializer and XmlJsonDeserializer. + */ +public class XmlNamespaceManager { + + /* Fields */ + + /** + * A stack of namespace prefix:uri mappings + */ + private Stack> xmlNamespaceScopes; + + /* Properties */ + + private String defaultNamespace=""; + + /** + * The default namespace URI if exists, otherwise an empty string + */ + public String getDefaultNamespace() { + return defaultNamespace; + } + + public void setDefaultNamespace(String defaultNamespace) { + this.defaultNamespace = defaultNamespace; + } + + /* Methods */ + + public XmlNamespaceManager(){ + xmlNamespaceScopes = new Stack>(); + } + + public void pushScope(){ + xmlNamespaceScopes.push(new HashMap()); + } + + public Map popScope(){ + return xmlNamespaceScopes.pop(); + } + + /** + * Add a namespace to the current namespace context + */ + public void addNamespace(String prefix, String uri){ + getCurrentScope().put(prefix, uri); + } + + /** + * Remove a namespace from the current namespace context + */ + public void removeNamespace(String prefix, String uri){ + getCurrentScope().remove(prefix); + } + + /** + * Gets the namespace URI in the current scope for the given prefix. + * If the prefix is an empty string, returns the default namespace + */ + public String lookupNamespace(String prefix){ + if(prefix=="") + return getDefaultNamespace(); + else + return getCurrentScope().get(prefix); + } + + /** + * Finds the first prefix for a given URI in the current scope and returns + * it if it exists, otherwise returns "". If the URI is null, returns null. + */ + public String lookupPrefix(String uri) { + if (uri == null) + return null; + else { + Map namespaceScope = xmlNamespaceScopes.peek(); + + for (Entry entry : namespaceScope.entrySet()) { + if (uri.equals(entry.getValue())) + return entry.getKey(); + } + return ""; + } + } + + /** + + * The given prefix has a namespace defined for current scope + */ + public boolean hasNamespace(String prefix){ + return getCurrentScope().get(prefix) != null; + } + + /* Private methods */ + + private Map getCurrentScope(){ + return xmlNamespaceScopes.peek(); + } + + /* TODOs */ + // Not reimplemented from .NET's System.Xml.*: + // Data types: + // - NameTable + // - XmlNamespaceScope + // Constructors: + // - XmlNamespaceManager(NameTable) + // Methods: + // - getNamespacesInScope + // - getEnumerator + +} diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java new file mode 100644 index 0000000..a5122d6 --- /dev/null +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -0,0 +1,14 @@ +package io.jvm.json; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class Json2XmlRoundTripTest { + + @Test + public void test() { + fail("Not yet implemented"); + } + +} diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java new file mode 100644 index 0000000..fd0cef5 --- /dev/null +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -0,0 +1,199 @@ +package io.jvm.json; + +import static org.junit.Assert.assertTrue; +import io.jvm.json.deserializers.XmlJsonDeserializer; +import io.jvm.json.serializers.XmlJsonSerializer; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.net.URISyntaxException; +import java.net.URL; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.custommonkey.xmlunit.Diff; +import org.json.JSONException; +import org.junit.Test; +import org.skyscreamer.jsonassert.JSONAssert; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +public class Xml2JsonRoundTripTest { + + /** + * For each of the XML files in 'resources/roundtripTests/source/xml' + * generates the entire roundtrip conversion (xml -> json -> xml) using + * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML + * equivalence with the reference conversions (obtained by using Json.NET) + */ + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() + throws URISyntaxException, JSONException, SAXException, + IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError { + + final File xmlSources_dir = getFileForResource("/roundtripTests/source/"); + + /* Iterate through the sources directory */ + for (final File xmlSourceFile : xmlSources_dir.listFiles()) { + + /* If perchance this is a directory, skip */ + if (xmlSourceFile.isFile()) { + /* + * In short, we deal with five files: + * - source/source.xml + * - converted/source.xml.json + * - converted/source.xml.json.xml + * - reference/source.xml.json + * - reference/source.xml.json + */ + + final String sourceFilename_xml = xmlSourceFile.getName(); + final String convertedFilename_json = sourceFilename_xml + ".json"; + final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; + + final File referenceFile_json = getFileForResource("/roundtripTests/reference/"+ convertedFilename_json); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, (referenceFile_json != null && referenceFile_json.exists())); + + final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/reference/"+ roundtripFilename_xml); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); + + final Document source_xml = parseXmlFile(xmlSourceFile); + final String referenceJson = stringFromFile(referenceFile_json); + final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); + + final String convertedJson = jsonStringFromXml(source_xml); + + System.out.println("Converted JSon: "); + System.out.println(convertedJson); + +// saveToFile("roundtripTests/converted/"+convertedFilename_json, convertedJson); + + assertJsonEquivalence(convertedJson, referenceJson); + + //final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); + // For when the implementation of the deserializer is complete + //assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); + //assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); + //assertXmlEquivalence("The reference roundtrip XML does not match the source XML",roundtripXmlDocument, source_xml); + + /* Save the newly generated files for future reference */ + // TODO: +// saveXmlToFile("roundtripTests/converted/"+roundtripFilename_xml, roundtripXmlDocument); + } + } + } + + /** + * Saves an XML file to a given resource path + */ + private static void saveXmlToFile(String fileResourcePath, Document xmlDocument) throws URISyntaxException, IOException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError{ + StringWriter sw = new StringWriter(); + + TransformerFactory + .newInstance() + .newTransformer() + .transform(new DOMSource(xmlDocument), new StreamResult(sw)); + + String xmlDocument_string=sw.toString(); + + saveToFile(fileResourcePath, xmlDocument_string); + } + + /** + * Saves a text file to a given resource path + */ + private static void saveToFile(String fileResourcePath, String text) throws URISyntaxException, IOException{ + File targetFile = new File(Xml2JsonRoundTripTest.class.getResource(fileResourcePath).toURI()); + + if (targetFile.exists() == false) + targetFile.createNewFile(); + + BufferedWriter bw = new BufferedWriter(new FileWriter(targetFile.getAbsoluteFile())); + + bw.write(text); + bw.close(); + } + + private static Document xmlDocumentfromJson(String json) throws IOException + { + JsonReader jr = new JsonReader(new StringReader(json)); + + return new XmlJsonDeserializer().fromJson(jr); + } + + private static String jsonStringFromXml(final Document source_xml) throws IOException{ + + System.out.println("Konvertiramo: "+ source_xml.getDocumentURI()); + + final StringWriter sw = new StringWriter(); + new XmlJsonSerializer().toJson(new JsonWriter(sw), source_xml.getDocumentElement()); + return sw.toString(); + } + + + /* XXX: Does not care for encoding */ + private static String stringFromFile(File file) throws IOException + { + BufferedReader br = new BufferedReader(new FileReader(file)); + try { + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + + while (line != null) { + sb.append(line); + sb.append("\n"); + line = br.readLine(); + } + return sb.toString(); + } finally { + br.close(); + } + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException + { + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) + { + final Diff diff = new Diff(lhs, rhs); + assertTrue(message, diff.similar()); + } + + private static File getFileForResource(String resourcePath) throws URISyntaxException + { + final URL resourceURL = Xml2JsonRoundTripTest.class.getResource(resourcePath); + + if (resourceURL==null) + return null; + else + return new File(resourceURL.toURI()); + + } + + private static Document parseXmlFile(final File file) + throws SAXException, IOException, ParserConfigurationException { + + final Document doc = DocumentBuilderFactory + .newInstance() + .newDocumentBuilder() + .parse(file); + doc.getDocumentElement().normalize(); + + return doc; + } +} diff --git a/json/src/test/resources/roundtripTests/README.md b/json/src/test/resources/roundtripTests/README.md new file mode 100644 index 0000000..f526c2d --- /dev/null +++ b/json/src/test/resources/roundtripTests/README.md @@ -0,0 +1,32 @@ + +TODO: Update, directory layout changed for source file type + +Round trip tests xml->json and vice versa. + + +Directories: + - source - source XML and JSON files + - converted - converted files and roundtrip files (conversions by our jvm.io converter) + - reference - reference converted files and roundtrip files (conversions by Json.NET's converter) + +E.g. for _source.xml_: + - source + - source.xml + - converted + - source.xml.json + - source.xml.json.xml + - reference + - source.xml.json + - source.xml.json.xml + +Likewise, for _source.json_ + - source + - source.json + - converted + - source.json.xml + - source.json.xml.json + - reference + - source.json.xml + - source.json.xml.json + +The script generate\_reference\_conversions.sh generates neccessary fresh conversions to xml and json using Json.Net (includes round-tripping). diff --git a/json/src/test/resources/roundtripTests/generate_reference_conversions.sh b/json/src/test/resources/roundtripTests/generate_reference_conversions.sh new file mode 100755 index 0000000..9b5353c --- /dev/null +++ b/json/src/test/resources/roundtripTests/generate_reference_conversions.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Convert source XMLs to JSON +cd source +for f in *.xml +do + xml2json $f > ../reference/$f.json +done +cd ../reference +# Convert resulting JSONs to XML again +for g in *.json +do + json2xml $g > $g.xml +done diff --git a/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json new file mode 100644 index 0000000..be75f5e --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml new file mode 100644 index 0000000..510345e --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml @@ -0,0 +1 @@ +<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/Weather.xml.json b/json/src/test/resources/roundtripTests/reference/Weather.xml.json new file mode 100644 index 0000000..080f817 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/Weather.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml new file mode 100644 index 0000000..466789b --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml @@ -0,0 +1 @@ +Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/boox.xml.json b/json/src/test/resources/roundtripTests/reference/boox.xml.json new file mode 100644 index 0000000..20fe148 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/boox.xml.json @@ -0,0 +1 @@ +{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/reference/boox.xml.json.xml new file mode 100644 index 0000000..ce1c998 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/boox.xml.json.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json b/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json new file mode 100644 index 0000000..99ad17c --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json @@ -0,0 +1 @@ +{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml b/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml new file mode 100644 index 0000000..85e4411 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/hello.xml.json b/json/src/test/resources/roundtripTests/reference/hello.xml.json new file mode 100644 index 0000000..ed34e7f --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/hello.xml.json @@ -0,0 +1 @@ +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/hello.xml.json.xml b/json/src/test/resources/roundtripTests/reference/hello.xml.json.xml new file mode 100644 index 0000000..641ae8c --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/hello.xml.json.xml @@ -0,0 +1 @@ +WSDL File for HelloService \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/modes.xml.json b/json/src/test/resources/roundtripTests/reference/modes.xml.json new file mode 100644 index 0000000..4ae5e0f --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/modes.xml.json @@ -0,0 +1 @@ +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/reference/modes.xml.json.xml new file mode 100644 index 0000000..f0fdf83 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/modes.xml.json.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json new file mode 100644 index 0000000..a3d8679 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json @@ -0,0 +1 @@ +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml b/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml new file mode 100644 index 0000000..a0a0d0b --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml @@ -0,0 +1,9 @@ + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + Application info. + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json b/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json new file mode 100644 index 0000000..82ca4fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json @@ -0,0 +1 @@ +{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml b/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml new file mode 100644 index 0000000..5f4fd35 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml @@ -0,0 +1 @@ +Alice Smith123 Maple StreetMill ValleyCA90952Robert Smith8 Oak AvenueOld TownPA95819Hurry, my lawn is going wild!Lawnmower1148.95Confirm this is electricBaby Monitor139.981999-05-21 \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json b/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json new file mode 100644 index 0000000..3ccfa8f --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json @@ -0,0 +1 @@ +{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml b/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml new file mode 100644 index 0000000..6350387 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml @@ -0,0 +1,5 @@ + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json b/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json new file mode 100644 index 0000000..c99220f --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json @@ -0,0 +1 @@ +{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml b/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml new file mode 100644 index 0000000..e92c002 --- /dev/null +++ b/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml @@ -0,0 +1,41 @@ + + max.feide.no + + max.feide.no + + k7z/t3iPKiyY9P7B87FIsMxnlnk= + + KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY= + + MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw== + + UB/WJAaKAPrSHbqlbcKWu7JktcKY + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ== + + dGVzdEBmZWlkZS5ubw== + + VU5JTkVUVA== + + VU5JTkVUVA== + + ZGM9dW5pbmV0dCxkYz1ubw== + + c3R1ZGVudA== + + bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v + + bm8= + + b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw== + + RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF + + RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF + + ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA== + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml new file mode 100644 index 0000000..9dc5019 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/Weather.xml b/json/src/test/resources/roundtripTests/source/Weather.xml new file mode 100644 index 0000000..cafa4fe --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/Weather.xml @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/boox.xml b/json/src/test/resources/roundtripTests/source/boox.xml new file mode 100644 index 0000000..0ed0a15 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/boox.xml @@ -0,0 +1,120 @@ + + + Gambardella, Matthew + XML Developer's Guide + Computer + 44.95 + 2000-10-01 + An in-depth look at creating applications + with XML. + + + Ralls, Kim + Midnight Rain + Fantasy + 5.95 + 2000-12-16 + A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world. + + + Corets, Eva + Maeve Ascendant + Fantasy + 5.95 + 2000-11-17 + After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society. + + + Corets, Eva + Oberon's Legacy + Fantasy + 5.95 + 2001-03-10 + In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant. + + + Corets, Eva + The Sundered Grail + Fantasy + 5.95 + 2001-09-10 + The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy. + + + Randall, Cynthia + Lover Birds + Romance + 4.95 + 2000-09-02 + When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled. + + + Thurman, Paula + Splish Splash + Romance + 4.95 + 2000-11-02 + A deep sea diver finds true love twenty + thousand leagues beneath the sea. + + + Knorr, Stefan + Creepy Crawlies + Horror + 4.95 + 2000-12-06 + An anthology of horror stories about roaches, + centipedes, scorpions and other insects. + + + Kress, Peter + Paradox Lost + Science Fiction + 6.95 + 2000-11-02 + After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum. + + + O'Brien, Tim + Microsoft .NET: The Programming Bible + Computer + 36.95 + 2000-12-09 + Microsoft's .NET initiative is explored in + detail in this deep programmer's reference. + + + O'Brien, Tim + MSXML3: A Comprehensive Guide + Computer + 36.95 + 2000-12-01 + The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more. + + + Galos, Mike + Visual Studio 7: A Comprehensive Guide + Computer + 49.95 + 2001-04-16 + Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. + + + diff --git a/json/src/test/resources/roundtripTests/source/cdatatest.xml b/json/src/test/resources/roundtripTests/source/cdatatest.xml new file mode 100644 index 0000000..f6d5e4c --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/cdatatest.xml @@ -0,0 +1,16 @@ + + + + diff --git a/json/src/test/resources/roundtripTests/source/hello.xml b/json/src/test/resources/roundtripTests/source/hello.xml new file mode 100644 index 0000000..4b8ea77 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/hello.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WSDL File for HelloService + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/modes.xml b/json/src/test/resources/roundtripTests/source/modes.xml new file mode 100644 index 0000000..4bc8af1 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/modes.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/purchaseOrder.xml b/json/src/test/resources/roundtripTests/source/purchaseOrder.xml new file mode 100644 index 0000000..e2de63b --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/purchaseOrder.xml @@ -0,0 +1,75 @@ + + + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + + + + + + + + + + + + + + + + + + + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + + Application info. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml b/json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml new file mode 100644 index 0000000..b5e6f44 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml @@ -0,0 +1,31 @@ + + + Alice Smith + 123 Maple Street + Mill Valley + CA + 90952 + + + Robert Smith + 8 Oak Avenue + Old Town + PA + 95819 + + Hurry, my lawn is going wild! + + + Lawnmower + 1 + 148.95 + Confirm this is electric + + + Baby Monitor + 1 + 39.98 + 1999-05-21 + + + diff --git a/json/src/test/resources/roundtripTests/source/samlRequest.xml b/json/src/test/resources/roundtripTests/source/samlRequest.xml new file mode 100644 index 0000000..f4728fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/samlRequest.xml @@ -0,0 +1,11 @@ + + + urn:mace:feide.no:services:no.feide.moodle + + + + + urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport + + + diff --git a/json/src/test/resources/roundtripTests/source/samlResponse.xml b/json/src/test/resources/roundtripTests/source/samlResponse.xml new file mode 100644 index 0000000..356658d --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/samlResponse.xml @@ -0,0 +1,125 @@ + + + max.feide.no + + + + + + + + max.feide.no + + + + + + + + + + + + + k7z/t3iPKiyY9P7B87FIsMxnlnk= + + + + + KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY= + + + + + MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw== + + + + + + + UB/WJAaKAPrSHbqlbcKWu7JktcKY + + + + + + + + + + urn:mace:feide.no:services:no.feide.moodle + + + + + + + urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + + + + + + RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ== + + + + + dGVzdEBmZWlkZS5ubw== + + + + + VU5JTkVUVA== + + + + + VU5JTkVUVA== + + + + + ZGM9dW5pbmV0dCxkYz1ubw== + + + + + c3R1ZGVudA== + + + + + bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v + + + + + bm8= + + + + + b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw== + + + + + RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF + + + + + RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF + + + + + ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA== + + + + + diff --git a/json/src/test/resources/roundtripTests/source/withComments/modes.xml b/json/src/test/resources/roundtripTests/source/withComments/modes.xml new file mode 100644 index 0000000..9133dba --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withComments/modes.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml b/json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml new file mode 100644 index 0000000..685d31c --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml @@ -0,0 +1,76 @@ + + + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + + + + + + + + + + + + + + + + + + + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + + Application info. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml new file mode 100644 index 0000000..bd2e3ba --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/source/withprolog/Weather.xml b/json/src/test/resources/roundtripTests/source/withprolog/Weather.xml new file mode 100644 index 0000000..062edd0 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withprolog/Weather.xml @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + Gets Information for each WeatherID + + + + + Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only + + + + + Allows you to get your City's Weather, which is updated hourly. U.S. Only + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/source/withprolog/boox.xml b/json/src/test/resources/roundtripTests/source/withprolog/boox.xml new file mode 100644 index 0000000..ffae1a1 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withprolog/boox.xml @@ -0,0 +1,121 @@ + + + + Gambardella, Matthew + XML Developer's Guide + Computer + 44.95 + 2000-10-01 + An in-depth look at creating applications + with XML. + + + Ralls, Kim + Midnight Rain + Fantasy + 5.95 + 2000-12-16 + A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world. + + + Corets, Eva + Maeve Ascendant + Fantasy + 5.95 + 2000-11-17 + After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society. + + + Corets, Eva + Oberon's Legacy + Fantasy + 5.95 + 2001-03-10 + In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant. + + + Corets, Eva + The Sundered Grail + Fantasy + 5.95 + 2001-09-10 + The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy. + + + Randall, Cynthia + Lover Birds + Romance + 4.95 + 2000-09-02 + When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled. + + + Thurman, Paula + Splish Splash + Romance + 4.95 + 2000-11-02 + A deep sea diver finds true love twenty + thousand leagues beneath the sea. + + + Knorr, Stefan + Creepy Crawlies + Horror + 4.95 + 2000-12-06 + An anthology of horror stories about roaches, + centipedes, scorpions and other insects. + + + Kress, Peter + Paradox Lost + Science Fiction + 6.95 + 2000-11-02 + After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum. + + + O'Brien, Tim + Microsoft .NET: The Programming Bible + Computer + 36.95 + 2000-12-09 + Microsoft's .NET initiative is explored in + detail in this deep programmer's reference. + + + O'Brien, Tim + MSXML3: A Comprehensive Guide + Computer + 36.95 + 2000-12-01 + The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more. + + + Galos, Mike + Visual Studio 7: A Comprehensive Guide + Computer + 49.95 + 2001-04-16 + Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. + + + diff --git a/json/src/test/resources/roundtripTests/source/withprolog/modes.xml b/json/src/test/resources/roundtripTests/source/withprolog/modes.xml new file mode 100644 index 0000000..f3fab87 --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withprolog/modes.xml @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml b/json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml new file mode 100644 index 0000000..e2de63b --- /dev/null +++ b/json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml @@ -0,0 +1,75 @@ + + + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + + + + + + + + + + + + + + + + + + + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + + Application info. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1c6a19536a9859a7b3a47f25bd9d0b2be19f927d Mon Sep 17 00:00:00 2001 From: hperadin Date: Mon, 10 Mar 2014 10:04:05 +0100 Subject: [PATCH 02/30] An XML -> JSON deserializer draft; An XmlNamespaceManager (should be excluded in the next iteration - is neither better,faster nor stronger); Tests for XML -> JSON conversion, also drafts of tests for JSON->XML conversion which fail since there is yet no converter --- .../src/main/java/io/jvm/json/EntryPoint.java | 16 +- .../src/main/java/io/jvm/json/JsonWriter.java | 5 + .../java/io/jvm/xml/XmlNamespaceManager.java | 7 +- .../io/jvm/json/Xml2JsonRoundTripTest.java | 149 +++++++++++------- project/JvmIoBuild.scala | 8 +- 5 files changed, 119 insertions(+), 66 deletions(-) diff --git a/json/src/main/java/io/jvm/json/EntryPoint.java b/json/src/main/java/io/jvm/json/EntryPoint.java index a8c3084..4e6c201 100644 --- a/json/src/main/java/io/jvm/json/EntryPoint.java +++ b/json/src/main/java/io/jvm/json/EntryPoint.java @@ -1,3 +1,17 @@ +package io.jvm.json; + +import io.jvm.json.serializers.XmlJsonSerializer; + +import java.io.StringWriter; + +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.w3c.dom.Element; + public class EntryPoint { public static String toString(org.w3c.dom.Element doc) { try @@ -45,7 +59,7 @@ public static void main(final String[] args) throws Exception { final Element elem = toXml(input).getDocumentElement(); System.out.println("INPUT: " + toString(elem)); - final JsonSerializer xmlSerialization = new XMLJsonSerializer(); + final JsonSerializer xmlSerialization = new XmlJsonSerializer(); final StringWriter sw = new StringWriter(); xmlSerialization.toJson(new JsonWriter(sw), elem); diff --git a/json/src/main/java/io/jvm/json/JsonWriter.java b/json/src/main/java/io/jvm/json/JsonWriter.java index 06693b5..c7f6a39 100644 --- a/json/src/main/java/io/jvm/json/JsonWriter.java +++ b/json/src/main/java/io/jvm/json/JsonWriter.java @@ -55,6 +55,10 @@ public void writeNull() throws IOException { writer.write("null"); } + public void writeOpenObject(boolean needsComma) throws IOException { + writer.write('{'); + } + public void writeOpenObject() throws IOException { writer.write('{'); } @@ -129,6 +133,7 @@ public void writeCharArray(final char[] values) throws IOException { } public void writeString(final String value) throws IOException { + writeCharArray(value.toCharArray()); } diff --git a/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java index ae7d04a..41c53d1 100644 --- a/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java +++ b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java @@ -1,9 +1,10 @@ package io.jvm.xml; +import java.util.ArrayDeque; +import java.util.Deque; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import java.util.Stack; /** * An ad-hoc implementation of an XmlNamespaceManager. @@ -21,7 +22,7 @@ public class XmlNamespaceManager { /** * A stack of namespace prefix:uri mappings */ - private Stack> xmlNamespaceScopes; + private Deque> xmlNamespaceScopes; /* Properties */ @@ -41,7 +42,7 @@ public void setDefaultNamespace(String defaultNamespace) { /* Methods */ public XmlNamespaceManager(){ - xmlNamespaceScopes = new Stack>(); + xmlNamespaceScopes = new ArrayDeque>(); } public void pushScope(){ diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index fd0cef5..e62696b 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -5,10 +5,8 @@ import io.jvm.json.serializers.XmlJsonSerializer; import java.io.BufferedReader; -import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; -import java.io.FileWriter; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -17,6 +15,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; @@ -24,11 +23,14 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import org.custommonkey.xmlunit.DetailedDiff; import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.XMLUnit; import org.json.JSONException; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.w3c.dom.Document; +import org.w3c.dom.Node; import org.xml.sax.SAXException; public class Xml2JsonRoundTripTest { @@ -39,18 +41,19 @@ public class Xml2JsonRoundTripTest { * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML * equivalence with the reference conversions (obtained by using Json.NET) */ + // TODO: Separate tests for these cases @Test public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, SAXException, - IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError { - + IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError { final File xmlSources_dir = getFileForResource("/roundtripTests/source/"); /* Iterate through the sources directory */ for (final File xmlSourceFile : xmlSources_dir.listFiles()) { /* If perchance this is a directory, skip */ - if (xmlSourceFile.isFile()) { + if (xmlSourceFile.isFile()) { + /* * In short, we deal with five files: * - source/source.xml @@ -60,6 +63,7 @@ public void assertRoundTripEquivalenceWithReferenceConversion() * - reference/source.xml.json */ + /* Filename initialisation */ final String sourceFilename_xml = xmlSourceFile.getName(); final String convertedFilename_json = sourceFilename_xml + ".json"; final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; @@ -70,70 +74,35 @@ public void assertRoundTripEquivalenceWithReferenceConversion() final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/reference/"+ roundtripFilename_xml); assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); + /* Parse input files */ final Document source_xml = parseXmlFile(xmlSourceFile); final String referenceJson = stringFromFile(referenceFile_json); final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); - final String convertedJson = jsonStringFromXml(source_xml); - - System.out.println("Converted JSon: "); - System.out.println(convertedJson); - -// saveToFile("roundtripTests/converted/"+convertedFilename_json, convertedJson); - - assertJsonEquivalence(convertedJson, referenceJson); + /* Convert to json and compare with reference conversion */ + final String convertedJson = jsonStringFromXml(source_xml); + assertJsonEquivalence(convertedJson, referenceJson); - //final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); - // For when the implementation of the deserializer is complete - //assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); - //assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); - //assertXmlEquivalence("The reference roundtrip XML does not match the source XML",roundtripXmlDocument, source_xml); + /* Convert back to XML, and compare with reference documents */ +// final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); +// +// assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); +// assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); +// assertXmlEquivalence("The reference roundtrip XML does not match the source XML",referenceRoundTrip_xml, source_xml); /* Save the newly generated files for future reference */ - // TODO: -// saveXmlToFile("roundtripTests/converted/"+roundtripFilename_xml, roundtripXmlDocument); + // TODO: } - } - } - - /** - * Saves an XML file to a given resource path - */ - private static void saveXmlToFile(String fileResourcePath, Document xmlDocument) throws URISyntaxException, IOException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError{ - StringWriter sw = new StringWriter(); - - TransformerFactory - .newInstance() - .newTransformer() - .transform(new DOMSource(xmlDocument), new StreamResult(sw)); - - String xmlDocument_string=sw.toString(); - - saveToFile(fileResourcePath, xmlDocument_string); - } - - /** - * Saves a text file to a given resource path - */ - private static void saveToFile(String fileResourcePath, String text) throws URISyntaxException, IOException{ - File targetFile = new File(Xml2JsonRoundTripTest.class.getResource(fileResourcePath).toURI()); - - if (targetFile.exists() == false) - targetFile.createNewFile(); - - BufferedWriter bw = new BufferedWriter(new FileWriter(targetFile.getAbsoluteFile())); + } + } - bw.write(text); - bw.close(); - } - private static Document xmlDocumentfromJson(String json) throws IOException { JsonReader jr = new JsonReader(new StringReader(json)); return new XmlJsonDeserializer().fromJson(jr); } - + private static String jsonStringFromXml(final Document source_xml) throws IOException{ System.out.println("Konvertiramo: "+ source_xml.getDocumentURI()); @@ -164,14 +133,35 @@ private static String stringFromFile(File file) throws IOException } private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException - { + { + System.out.println("Checking for json equivalence of the following:"); + System.out.println(lhs); + System.out.println(rhs); + JSONAssert.assertEquals(lhs, rhs, false); } private static void assertXmlEquivalence(String message, Document lhs, Document rhs) - { + { + XMLUnit.setIgnoreAttributeOrder(true); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setNormalize(true); + + /*System.out.println("Roundtrip"); + System.out.println(xmlDocumentToString(lhs)); + System.out.println("Source"); + System.out.println(xmlDocumentToString(rhs));*/ + final Diff diff = new Diff(lhs, rhs); - assertTrue(message, diff.similar()); + final DetailedDiff dd = new DetailedDiff(diff); + + StringBuffer msg = new StringBuffer(); + diff.appendMessage(msg); + + System.out.println(msg); + + assertTrue(message, dd.similar()); + //assertTrue(message, diff.similar()); } private static File getFileForResource(String resourcePath) throws URISyntaxException @@ -192,8 +182,47 @@ private static Document parseXmlFile(final File file) .newInstance() .newDocumentBuilder() .parse(file); - doc.getDocumentElement().normalize(); + trimWhitespaceTextNodes(doc); return doc; - } -} + } + + private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { + if (node != null && node.getChildNodes() != null) + for (int i = 0; i < node.getChildNodes().getLength(); i++) { + final org.w3c.dom.Node child = node.getChildNodes().item(i); + if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE + && child.getNodeValue().trim().length() == 0) + node.removeChild(child); + trimWhitespaceTextNodes(node.getChildNodes().item(i)); + } + } + + + /* =================================== Irrelevant helpers ======================================================*/ + + private static void printDocumentTree(Node el){ + System.out.println(el.toString()); + for(int i=0;i Date: Fri, 14 Mar 2014 10:31:31 +0100 Subject: [PATCH 03/30] Separated files for XMl and JSON testing --- .../json/generate_reference_conversions.sh | 13 ++++++ .../reference/CurrencyConvertor.xml.json.xml | 0 .../CurrencyConvertor.xml.json.xml.json} | 0 .../{ => json}/reference/Weather.xml.json.xml | 0 .../reference/Weather.xml.json.xml.json} | 0 .../{ => json}/reference/boox.xml.json.xml | 0 .../reference/boox.xml.json.xml.json} | 0 .../reference/cdatatest.xml.json.xml | 0 .../reference/cdatatest.xml.json.xml.json} | 0 .../{ => json}/reference/hello.xml.json.xml | 0 .../reference/hello.xml.json.xml.json} | 0 .../{ => json}/reference/modes.xml.json.xml | 0 .../reference/modes.xml.json.xml.json} | 0 .../reference/purchaseOrder.xml.json.xml | 0 .../purchaseOrder.xml.json.xml.json} | 0 .../purchaseOrderInstance.xml.json.xml | 0 .../purchaseOrderInstance.xml.json.xml.json} | 0 .../reference/samlRequest.xml.json.xml | 0 .../reference/samlRequest.xml.json.xml.json} | 0 .../reference/samlResponse.xml.json.xml | 0 .../reference/samlResponse.xml.json.xml.json} | 0 .../json/source/CurrencyConvertor.xml.json | 1 + .../json/source/Weather.xml.json | 1 + .../roundtripTests/json/source/boox.xml.json | 1 + .../json/source/cdatatest.xml.json | 1 + .../roundtripTests/json/source/hello.xml.json | 1 + .../roundtripTests/json/source/modes.xml.json | 1 + .../json/source/purchaseOrder.xml.json | 1 + .../source/purchaseOrderInstance.xml.json | 1 + .../json/source/samlRequest.xml.json | 1 + .../json/source/samlResponse.xml.json | 1 + .../generate_reference_conversions.sh | 0 .../xml/reference/CurrencyConvertor.xml.json | 1 + .../reference/CurrencyConvertor.xml.json.xml | 1 + .../xml/reference/Weather.xml.json | 1 + .../xml/reference/Weather.xml.json.xml | 1 + .../xml/reference/boox.xml.json | 1 + .../xml/reference/boox.xml.json.xml | 22 ++++++++++ .../xml/reference/cdatatest.xml.json | 1 + .../xml/reference/cdatatest.xml.json.xml | 13 ++++++ .../xml/reference/hello.xml.json | 1 + .../xml/reference/hello.xml.json.xml | 1 + .../xml/reference/modes.xml.json | 1 + .../xml/reference/modes.xml.json.xml | 1 + .../xml/reference/purchaseOrder.xml.json | 1 + .../xml/reference/purchaseOrder.xml.json.xml | 9 ++++ .../reference/purchaseOrderInstance.xml.json | 1 + .../purchaseOrderInstance.xml.json.xml | 1 + .../xml/reference/samlRequest.xml.json | 1 + .../xml/reference/samlRequest.xml.json.xml | 5 +++ .../xml/reference/samlResponse.xml.json | 1 + .../xml/reference/samlResponse.xml.json.xml | 41 +++++++++++++++++++ .../{ => xml}/source/CurrencyConvertor.xml | 0 .../{ => xml}/source/Weather.xml | 0 .../roundtripTests/{ => xml}/source/boox.xml | 0 .../{ => xml}/source/cdatatest.xml | 0 .../roundtripTests/{ => xml}/source/hello.xml | 0 .../roundtripTests/{ => xml}/source/modes.xml | 0 .../{ => xml}/source/purchaseOrder.xml | 0 .../source/purchaseOrderInstance.xml | 0 .../{ => xml}/source/samlRequest.xml | 0 .../{ => xml}/source/samlResponse.xml | 0 .../{ => xml}/source/withComments/modes.xml | 0 .../source/withComments/purchaseOrder.xml | 0 .../source/withprolog/CurrencyConvertor.xml | 0 .../{ => xml}/source/withprolog/Weather.xml | 0 .../{ => xml}/source/withprolog/boox.xml | 0 .../{ => xml}/source/withprolog/modes.xml | 0 .../source/withprolog/purchaseOrder.xml | 0 69 files changed, 128 insertions(+) create mode 100755 json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh rename json/src/test/resources/roundtripTests/{ => json}/reference/CurrencyConvertor.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/CurrencyConvertor.xml.json => json/reference/CurrencyConvertor.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/Weather.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/Weather.xml.json => json/reference/Weather.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/boox.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/boox.xml.json => json/reference/boox.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/cdatatest.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/cdatatest.xml.json => json/reference/cdatatest.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/hello.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/hello.xml.json => json/reference/hello.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/modes.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/modes.xml.json => json/reference/modes.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/purchaseOrder.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/purchaseOrder.xml.json => json/reference/purchaseOrder.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/purchaseOrderInstance.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/purchaseOrderInstance.xml.json => json/reference/purchaseOrderInstance.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/samlRequest.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/samlRequest.xml.json => json/reference/samlRequest.xml.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{ => json}/reference/samlResponse.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/{reference/samlResponse.xml.json => json/reference/samlResponse.xml.json.xml.json} (100%) create mode 100644 json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/Weather.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/boox.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/hello.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/modes.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json rename json/src/test/resources/roundtripTests/{ => xml}/generate_reference_conversions.sh (100%) create mode 100644 json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/boox.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/hello.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/hello.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/modes.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json.xml rename json/src/test/resources/roundtripTests/{ => xml}/source/CurrencyConvertor.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/Weather.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/boox.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/cdatatest.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/hello.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/modes.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/purchaseOrder.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/purchaseOrderInstance.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/samlRequest.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/samlResponse.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withComments/modes.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withComments/purchaseOrder.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withprolog/CurrencyConvertor.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withprolog/Weather.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withprolog/boox.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withprolog/modes.xml (100%) rename json/src/test/resources/roundtripTests/{ => xml}/source/withprolog/purchaseOrder.xml (100%) diff --git a/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh b/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh new file mode 100755 index 0000000..689c06b --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Convert source XMLs to JSON +cd source +for f in *.json +do + json2xml $f > ../reference/$f.xml +done +cd ../reference +# Convert resulting JSONs to XML again +for g in *.xml +do + xml2json $g > $g.json +done diff --git a/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/CurrencyConvertor.xml.json rename to json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/Weather.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/Weather.xml.json b/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/Weather.xml.json rename to json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/boox.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/boox.xml.json b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/boox.xml.json rename to json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/cdatatest.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/cdatatest.xml.json b/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/cdatatest.xml.json rename to json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/hello.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/hello.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/hello.xml.json b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/hello.xml.json rename to json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/modes.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/modes.xml.json b/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/modes.xml.json rename to json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/purchaseOrder.xml.json rename to json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/purchaseOrderInstance.xml.json rename to json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/samlRequest.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/samlRequest.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/samlRequest.xml.json rename to json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/reference/samlResponse.xml.json.xml rename to json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/reference/samlResponse.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/reference/samlResponse.xml.json rename to json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json diff --git a/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json new file mode 100644 index 0000000..be75f5e --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/Weather.xml.json b/json/src/test/resources/roundtripTests/json/source/Weather.xml.json new file mode 100644 index 0000000..080f817 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/Weather.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/boox.xml.json b/json/src/test/resources/roundtripTests/json/source/boox.xml.json new file mode 100644 index 0000000..20fe148 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/boox.xml.json @@ -0,0 +1 @@ +{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json b/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json new file mode 100644 index 0000000..99ad17c --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json @@ -0,0 +1 @@ +{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/hello.xml.json b/json/src/test/resources/roundtripTests/json/source/hello.xml.json new file mode 100644 index 0000000..ed34e7f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/hello.xml.json @@ -0,0 +1 @@ +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/modes.xml.json b/json/src/test/resources/roundtripTests/json/source/modes.xml.json new file mode 100644 index 0000000..4ae5e0f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/modes.xml.json @@ -0,0 +1 @@ +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json new file mode 100644 index 0000000..a3d8679 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json @@ -0,0 +1 @@ +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json new file mode 100644 index 0000000..82ca4fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json @@ -0,0 +1 @@ +{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json b/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json new file mode 100644 index 0000000..3ccfa8f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json @@ -0,0 +1 @@ +{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json b/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json new file mode 100644 index 0000000..c99220f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json @@ -0,0 +1 @@ +{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/generate_reference_conversions.sh b/json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh similarity index 100% rename from json/src/test/resources/roundtripTests/generate_reference_conversions.sh rename to json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json new file mode 100644 index 0000000..be75f5e --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml new file mode 100644 index 0000000..510345e --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml @@ -0,0 +1 @@ +<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json new file mode 100644 index 0000000..080f817 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml new file mode 100644 index 0000000..466789b --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml @@ -0,0 +1 @@ +Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json new file mode 100644 index 0000000..20fe148 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json @@ -0,0 +1 @@ +{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml new file mode 100644 index 0000000..ce1c998 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json b/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json new file mode 100644 index 0000000..99ad17c --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json @@ -0,0 +1 @@ +{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json.xml new file mode 100644 index 0000000..85e4411 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/cdatatest.xml.json.xml @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json b/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json new file mode 100644 index 0000000..ed34e7f --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json @@ -0,0 +1 @@ +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json.xml new file mode 100644 index 0000000..641ae8c --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/hello.xml.json.xml @@ -0,0 +1 @@ +WSDL File for HelloService \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json new file mode 100644 index 0000000..4ae5e0f --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json @@ -0,0 +1 @@ +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml new file mode 100644 index 0000000..f0fdf83 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json new file mode 100644 index 0000000..a3d8679 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json @@ -0,0 +1 @@ +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json.xml new file mode 100644 index 0000000..a0a0d0b --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrder.xml.json.xml @@ -0,0 +1,9 @@ + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + Application info. + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json new file mode 100644 index 0000000..82ca4fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json @@ -0,0 +1 @@ +{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json.xml new file mode 100644 index 0000000..5f4fd35 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/purchaseOrderInstance.xml.json.xml @@ -0,0 +1 @@ +Alice Smith123 Maple StreetMill ValleyCA90952Robert Smith8 Oak AvenueOld TownPA95819Hurry, my lawn is going wild!Lawnmower1148.95Confirm this is electricBaby Monitor139.981999-05-21 \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json b/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json new file mode 100644 index 0000000..3ccfa8f --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json @@ -0,0 +1 @@ +{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json.xml new file mode 100644 index 0000000..6350387 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/samlRequest.xml.json.xml @@ -0,0 +1,5 @@ + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json b/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json new file mode 100644 index 0000000..c99220f --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json @@ -0,0 +1 @@ +{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json.xml new file mode 100644 index 0000000..e92c002 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/samlResponse.xml.json.xml @@ -0,0 +1,41 @@ + + max.feide.no + + max.feide.no + + k7z/t3iPKiyY9P7B87FIsMxnlnk= + + KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY= + + MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw== + + UB/WJAaKAPrSHbqlbcKWu7JktcKY + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ== + + dGVzdEBmZWlkZS5ubw== + + VU5JTkVUVA== + + VU5JTkVUVA== + + ZGM9dW5pbmV0dCxkYz1ubw== + + c3R1ZGVudA== + + bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v + + bm8= + + b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw== + + RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF + + RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF + + ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA== + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/CurrencyConvertor.xml rename to json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml diff --git a/json/src/test/resources/roundtripTests/source/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/Weather.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/Weather.xml rename to json/src/test/resources/roundtripTests/xml/source/Weather.xml diff --git a/json/src/test/resources/roundtripTests/source/boox.xml b/json/src/test/resources/roundtripTests/xml/source/boox.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/boox.xml rename to json/src/test/resources/roundtripTests/xml/source/boox.xml diff --git a/json/src/test/resources/roundtripTests/source/cdatatest.xml b/json/src/test/resources/roundtripTests/xml/source/cdatatest.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/cdatatest.xml rename to json/src/test/resources/roundtripTests/xml/source/cdatatest.xml diff --git a/json/src/test/resources/roundtripTests/source/hello.xml b/json/src/test/resources/roundtripTests/xml/source/hello.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/hello.xml rename to json/src/test/resources/roundtripTests/xml/source/hello.xml diff --git a/json/src/test/resources/roundtripTests/source/modes.xml b/json/src/test/resources/roundtripTests/xml/source/modes.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/modes.xml rename to json/src/test/resources/roundtripTests/xml/source/modes.xml diff --git a/json/src/test/resources/roundtripTests/source/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/purchaseOrder.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/purchaseOrder.xml rename to json/src/test/resources/roundtripTests/xml/source/purchaseOrder.xml diff --git a/json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml b/json/src/test/resources/roundtripTests/xml/source/purchaseOrderInstance.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/purchaseOrderInstance.xml rename to json/src/test/resources/roundtripTests/xml/source/purchaseOrderInstance.xml diff --git a/json/src/test/resources/roundtripTests/source/samlRequest.xml b/json/src/test/resources/roundtripTests/xml/source/samlRequest.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/samlRequest.xml rename to json/src/test/resources/roundtripTests/xml/source/samlRequest.xml diff --git a/json/src/test/resources/roundtripTests/source/samlResponse.xml b/json/src/test/resources/roundtripTests/xml/source/samlResponse.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/samlResponse.xml rename to json/src/test/resources/roundtripTests/xml/source/samlResponse.xml diff --git a/json/src/test/resources/roundtripTests/source/withComments/modes.xml b/json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withComments/modes.xml rename to json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml diff --git a/json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withComments/purchaseOrder.xml rename to json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml diff --git a/json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/withprolog/CurrencyConvertor.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withprolog/CurrencyConvertor.xml rename to json/src/test/resources/roundtripTests/xml/source/withprolog/CurrencyConvertor.xml diff --git a/json/src/test/resources/roundtripTests/source/withprolog/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/withprolog/Weather.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withprolog/Weather.xml rename to json/src/test/resources/roundtripTests/xml/source/withprolog/Weather.xml diff --git a/json/src/test/resources/roundtripTests/source/withprolog/boox.xml b/json/src/test/resources/roundtripTests/xml/source/withprolog/boox.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withprolog/boox.xml rename to json/src/test/resources/roundtripTests/xml/source/withprolog/boox.xml diff --git a/json/src/test/resources/roundtripTests/source/withprolog/modes.xml b/json/src/test/resources/roundtripTests/xml/source/withprolog/modes.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withprolog/modes.xml rename to json/src/test/resources/roundtripTests/xml/source/withprolog/modes.xml diff --git a/json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/withprolog/purchaseOrder.xml similarity index 100% rename from json/src/test/resources/roundtripTests/source/withprolog/purchaseOrder.xml rename to json/src/test/resources/roundtripTests/xml/source/withprolog/purchaseOrder.xml From b8d93ed9fc68a7faca6a8da4bb20c2a016ab6b0c Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 10:34:18 +0100 Subject: [PATCH 04/30] A thorough XML subtrees comparator. --- .../io/jvm/xml/XmlBruteForceComparator.java | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java diff --git a/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java new file mode 100644 index 0000000..4bc7177 --- /dev/null +++ b/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java @@ -0,0 +1,178 @@ +package io.jvm.xml; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +import org.w3c.dom.Attr; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. + * The subtrees are considered equivalent if they contain the same nodes, + * having the same attributes and values. The order of elements is ignored. + * + * The comparator builds a list of all paths from root to leaf and compares those paths. + */ +public class XmlBruteForceComparator implements Comparator { + + private List> xmlStrips_lhs = new ArrayList>(); + private List> xmlStrips_rhs = new ArrayList>(); + + @Override + public int compare(Element lhs, Element rhs) { + + buildStrip(xmlStrips_lhs, null, (Node) lhs); + buildStrip(xmlStrips_rhs, null, (Node) rhs); + + return compareAllPaths(xmlStrips_lhs, xmlStrips_rhs); + } + + /** + * Recursively builds a list of all path from root to leaf + * @param allPaths The list containing all paths for the current tree + * @param currentPath The current path being built; {@code null} in the first step + * @param node The current node on the path; root in the first step, a leaf in the last step + */ + private void buildStrip(List> allPaths, List currentPath, Node node) { + if (currentPath == null) + currentPath = new ArrayList(); + + currentPath.add(node); + + if (node.hasChildNodes()) { + for(Node child : getListOfChildren(node)){ + buildStrip(allPaths,currentPath,child); + } + } else { + allPaths.add(currentPath); + } + } + + /** + * Compares all root-to-leaf paths of the two XML trees. + * @param lhs The lhs XML tree paths + * @param rhs The rhs XML tree paths + * @return {@code 0} if they are equal {@code -1} otherwise + */ + private int compareAllPaths(List> lhs, List> rhs) { + if (lhs.size() != rhs.size()) + return -1; + + for (List leftStrip : lhs) { + boolean found = false; + for (List rightStrip : rhs) { + if (nodeListsEqual(leftStrip, rightStrip)) + found = true; + } + if (!found) + return -1; + } + + return 0; + } + + private boolean nodeListsEqual(List lhs, List rhs) { + + if (lhs.size() != rhs.size()) + return false; + + for (Node e1 : lhs) { + boolean found = false; + for (Node e2 : rhs) { + if (nodesEqual(e1, e2)) { + found = true; + break; + } + } + if (!found) + return false; + } + + return true; + } + + private boolean nodesEqual(Node node1, Node node2) { + if (node1 == null && node2 == null) + return true; + else if (node1.getNodeName() == null && node2.getNodeName() == null) + return true; + else if (node1.hasAttributes() != node2.hasAttributes()) + return false; + else if ((node1.getNodeValue() != null && node2.getNodeValue() != null) + && !node1.getNodeValue().equals(node2.getNodeValue())) + return false; + else if (node1.hasAttributes() + && node2.hasAttributes() + && (node1.getAttributes().getLength() != node2.getAttributes() + .getLength())) + return false; + else if (node1.getChildNodes().getLength() != node2.getChildNodes() + .getLength()) + return false; + else if (!node1.getNodeName().equals(node2.getNodeName())) + return false; + else if (!nodesHaveEqualAttributes(node1, node2)) + return false; + + return true; + } + + private boolean nodesHaveEqualAttributes(Node node1, Node node2) { + if (node1.hasAttributes() != node2.hasAttributes()) + return false; + else if (node1.hasAttributes() == false && node2.hasAttributes() == false) + return true; + else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) + return false; + else { + + for(Attr attr1 : getListOfAttributes(node1)){ + boolean found=false; + for(Attr attr2 : getListOfAttributes(node2)){ + if(equalsWithNull(attr1.getName(), attr2.getName()) + && equalsWithNull(attr1.getValue(), attr2.getValue())){ + found = true; + break; + } + } + if(!found) + return false; + } + } + + return true; + } + + private List getListOfAttributes(Node node){ + List aListOfAttributes = new ArrayList(); + + for(int i=0; i getListOfChildren(Node node){ + List nodes = new ArrayList(); + + NodeList nodeList = node.getChildNodes(); + + for(int i=0; i Date: Fri, 14 Mar 2014 10:35:20 +0100 Subject: [PATCH 05/30] Helper functions for tests --- json/src/test/java/io/jvm/json/Helpers.java | 93 +++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 json/src/test/java/io/jvm/json/Helpers.java diff --git a/json/src/test/java/io/jvm/json/Helpers.java b/json/src/test/java/io/jvm/json/Helpers.java new file mode 100644 index 0000000..de48e97 --- /dev/null +++ b/json/src/test/java/io/jvm/json/Helpers.java @@ -0,0 +1,93 @@ +package io.jvm.json; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringWriter; +import java.net.URISyntaxException; +import java.net.URL; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.xml.sax.SAXException; + +public class Helpers { + + public static File getFileForResource(String resourcePath) throws URISyntaxException + { + final URL resourceURL = Xml2JsonRoundTripTest.class.getResource(resourcePath); + + if (resourceURL==null) + return null; + else + return new File(resourceURL.toURI()); + + } + + public static Document parseXmlFile(final File file) + throws SAXException, IOException, ParserConfigurationException { + + final Document doc = DocumentBuilderFactory + .newInstance() + .newDocumentBuilder() + .parse(file); + + doc.normalizeDocument(); + + return doc; + } + + public static String stringFromFile(File file) throws IOException + { + BufferedReader br = new BufferedReader(new FileReader(file)); + try { + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + + while (line != null) { + sb.append(line); + sb.append("\n"); + line = br.readLine(); + } + return sb.toString(); + } finally { + br.close(); + } + } + + public static void printDocumentTree(Node el){ + System.out.println(el.toString()); + for(int i=0;i Date: Fri, 14 Mar 2014 10:35:45 +0100 Subject: [PATCH 06/30] Roundtrip tests for Json->XML conversions and vice versa --- .../io/jvm/json/Json2XmlRoundTripTest.java | 95 ++++++++- .../io/jvm/json/Xml2JsonRoundTripTest.java | 188 ++++-------------- 2 files changed, 134 insertions(+), 149 deletions(-) diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index a5122d6..7ee940a 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -1,14 +1,103 @@ package io.jvm.json; import static org.junit.Assert.*; +import io.jvm.json.deserializers.XmlJsonDeserializer; +import io.jvm.json.serializers.XmlJsonSerializer; +import io.jvm.xml.XmlBruteForceComparator; +import java.io.File; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.net.URISyntaxException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactoryConfigurationError; + +import org.json.JSONException; import org.junit.Test; +import org.skyscreamer.jsonassert.JSONAssert; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +import static io.jvm.json.Helpers.*; public class Json2XmlRoundTripTest { - @Test - public void test() { - fail("Not yet implemented"); + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() + throws URISyntaxException, JSONException, SAXException, + IOException, ParserConfigurationException, + TransformerConfigurationException, TransformerException, + TransformerFactoryConfigurationError { + + final File jsonSources_dir = getFileForResource("/roundtripTests/json/source/"); + + for (final File jsonSourceFile : jsonSources_dir.listFiles()) { + if (jsonSourceFile.isFile()) { + System.out.println("Testiramo za datoteku: " + jsonSourceFile.getName()); + + /* Filename initialisation */ + final String sourceFilename_json = jsonSourceFile.getName(); + final String convertedFilename_xml = sourceFilename_json + ".xml"; + final String roundtripFilename_json = sourceFilename_json + + ".xml.json"; + + final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" + convertedFilename_xml); + assertTrue("The reference JSON file does not exist for: "+ sourceFilename_json, (referenceFile_xml != null && referenceFile_xml.exists())); + + final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" + roundtripFilename_json); + assertTrue("The reference XML->JSON roundtrip file does not exist for: "+ sourceFilename_json,(referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); + + /* Parse input files */ + final String source_json = stringFromFile(jsonSourceFile); + final Document referenceXml = parseXmlFile(referenceFile_xml); + final String referenceRoundTrip_json = stringFromFile(referenceRoundtripFile_json); + + /* Convert to XML and compare with reference conversion */ + final Document convertedXml = xmlDocumentFromJson(source_json); + assertXmlEquivalence("The converted XML does not match the reference XML",convertedXml, referenceXml); + + /* Convert back to Json, and compare with reference documents */ + final String roundtripJsonString = jsonStringFromXml(convertedXml); + + assertJsonEquivalence(roundtripJsonString, referenceRoundTrip_json); + assertJsonEquivalence(roundtripJsonString, source_json); + assertJsonEquivalence(referenceRoundTrip_json, source_json); + } } + } + + private static Document xmlDocumentFromJson(String json) throws IOException { + JsonReader jr = new JsonReader(new StringReader(json)); + + return new XmlJsonDeserializer().fromJson(jr); + } + + private static String jsonStringFromXml(final Document source_xml) + throws IOException { + + final StringWriter sw = new StringWriter(); + new XmlJsonSerializer().toJson(new JsonWriter(sw), + source_xml.getDocumentElement()); + return sw.toString(); + } + + private static void assertJsonEquivalence(String lhs, String rhs) + throws JSONException { + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, + Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + + assertTrue( + message, + comparator.compare(lhs.getDocumentElement(), + rhs.getDocumentElement()) == 0); + } } diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index e62696b..ecdc61f 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -1,77 +1,57 @@ package io.jvm.json; +import static io.jvm.json.Helpers.getFileForResource; +import static io.jvm.json.Helpers.parseXmlFile; +import static io.jvm.json.Helpers.stringFromFile; import static org.junit.Assert.assertTrue; import io.jvm.json.deserializers.XmlJsonDeserializer; import io.jvm.json.serializers.XmlJsonSerializer; +import io.jvm.xml.XmlBruteForceComparator; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.net.URISyntaxException; -import java.net.URL; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import org.custommonkey.xmlunit.DetailedDiff; -import org.custommonkey.xmlunit.Diff; -import org.custommonkey.xmlunit.XMLUnit; import org.json.JSONException; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.w3c.dom.Document; -import org.w3c.dom.Node; import org.xml.sax.SAXException; public class Xml2JsonRoundTripTest { - + /** * For each of the XML files in 'resources/roundtripTests/source/xml' * generates the entire roundtrip conversion (xml -> json -> xml) using * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML * equivalence with the reference conversions (obtained by using Json.NET) */ - // TODO: Separate tests for these cases @Test public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError { - final File xmlSources_dir = getFileForResource("/roundtripTests/source/"); - /* Iterate through the sources directory */ - for (final File xmlSourceFile : xmlSources_dir.listFiles()) { - - /* If perchance this is a directory, skip */ - if (xmlSourceFile.isFile()) { + final File xmlSources_dir = getFileForResource("/roundtripTests/xml/source/"); - /* - * In short, we deal with five files: - * - source/source.xml - * - converted/source.xml.json - * - converted/source.xml.json.xml - * - reference/source.xml.json - * - reference/source.xml.json - */ - + for (final File xmlSourceFile : xmlSources_dir.listFiles()) { + if (xmlSourceFile.isFile()) { + System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); /* Filename initialisation */ final String sourceFilename_xml = xmlSourceFile.getName(); final String convertedFilename_json = sourceFilename_xml + ".json"; final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; - final File referenceFile_json = getFileForResource("/roundtripTests/reference/"+ convertedFilename_json); + final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/"+ convertedFilename_json); assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, (referenceFile_json != null && referenceFile_json.exists())); - final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/reference/"+ roundtripFilename_xml); + final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/"+ roundtripFilename_xml); assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); /* Parse input files */ @@ -84,14 +64,11 @@ public void assertRoundTripEquivalenceWithReferenceConversion() assertJsonEquivalence(convertedJson, referenceJson); /* Convert back to XML, and compare with reference documents */ -// final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); -// -// assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); -// assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); -// assertXmlEquivalence("The reference roundtrip XML does not match the source XML",referenceRoundTrip_xml, source_xml); + final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); - /* Save the newly generated files for future reference */ - // TODO: + assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); + assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); + assertXmlEquivalence("The reference roundtrip XML does not match the source XML",referenceRoundTrip_xml, source_xml); } } } @@ -103,126 +80,45 @@ private static Document xmlDocumentfromJson(String json) throws IOException return new XmlJsonDeserializer().fromJson(jr); } - private static String jsonStringFromXml(final Document source_xml) throws IOException{ - - System.out.println("Konvertiramo: "+ source_xml.getDocumentURI()); - + private static String jsonStringFromXml(final Document source_xml) throws IOException{ final StringWriter sw = new StringWriter(); new XmlJsonSerializer().toJson(new JsonWriter(sw), source_xml.getDocumentElement()); return sw.toString(); - } - - - /* XXX: Does not care for encoding */ - private static String stringFromFile(File file) throws IOException - { - BufferedReader br = new BufferedReader(new FileReader(file)); - try { - StringBuilder sb = new StringBuilder(); - String line = br.readLine(); - - while (line != null) { - sb.append(line); - sb.append("\n"); - line = br.readLine(); - } - return sb.toString(); - } finally { - br.close(); - } - } + } private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { - System.out.println("Checking for json equivalence of the following:"); - System.out.println(lhs); - System.out.println(rhs); JSONAssert.assertEquals(lhs, rhs, false); } - private static void assertXmlEquivalence(String message, Document lhs, Document rhs) - { - XMLUnit.setIgnoreAttributeOrder(true); - XMLUnit.setIgnoreWhitespace(true); - XMLUnit.setNormalize(true); - - /*System.out.println("Roundtrip"); - System.out.println(xmlDocumentToString(lhs)); - System.out.println("Source"); - System.out.println(xmlDocumentToString(rhs));*/ - - final Diff diff = new Diff(lhs, rhs); - final DetailedDiff dd = new DetailedDiff(diff); - - StringBuffer msg = new StringBuffer(); - diff.appendMessage(msg); - - System.out.println(msg); - - assertTrue(message, dd.similar()); - //assertTrue(message, diff.similar()); - } - - private static File getFileForResource(String resourcePath) throws URISyntaxException - { - final URL resourceURL = Xml2JsonRoundTripTest.class.getResource(resourcePath); - - if (resourceURL==null) - return null; - else - return new File(resourceURL.toURI()); + private static void assertXmlEquivalence(String message, Document lhs, Document rhs){ + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement())==0); } - private static Document parseXmlFile(final File file) - throws SAXException, IOException, ParserConfigurationException { - - final Document doc = DocumentBuilderFactory - .newInstance() - .newDocumentBuilder() - .parse(file); - trimWhitespaceTextNodes(doc); - - return doc; - } +// private static void assertXmlEquivalence(String message, Document lhs, Document rhs) +// { +// XMLUnit.setIgnoreAttributeOrder(true); +// XMLUnit.setIgnoreWhitespace(true); +//// XMLUnit.setNormalize(true); +// +// System.out.println("Roundtrip:"); +// System.out.println(xmlDocumentToString(lhs)); +// System.out.println("Source:"); +// System.out.println(xmlDocumentToString(rhs)); +// +// final Diff diff = new Diff(lhs, rhs); +// final DetailedDiff dd = new DetailedDiff(diff); +// +// StringBuffer msg = new StringBuffer(); +// diff.appendMessage(msg); +// +//// System.out.println(msg); +// +// //assertTrue(message, dd.similar()); +// assertTrue(message, diff.similar()); +// } - private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { - if (node != null && node.getChildNodes() != null) - for (int i = 0; i < node.getChildNodes().getLength(); i++) { - final org.w3c.dom.Node child = node.getChildNodes().item(i); - if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE - && child.getNodeValue().trim().length() == 0) - node.removeChild(child); - trimWhitespaceTextNodes(node.getChildNodes().item(i)); - } - } - - - /* =================================== Irrelevant helpers ======================================================*/ - - private static void printDocumentTree(Node el){ - System.out.println(el.toString()); - for(int i=0;i Date: Fri, 14 Mar 2014 10:40:20 +0100 Subject: [PATCH 07/30] Added method for consuming whitespaces. (whitespace however not yet supported) --- .../src/main/java/io/jvm/json/JsonReader.java | 106 +++++++++++++++--- 1 file changed, 93 insertions(+), 13 deletions(-) diff --git a/json/src/main/java/io/jvm/json/JsonReader.java b/json/src/main/java/io/jvm/json/JsonReader.java index d02e89b..62e7476 100644 --- a/json/src/main/java/io/jvm/json/JsonReader.java +++ b/json/src/main/java/io/jvm/json/JsonReader.java @@ -16,11 +16,16 @@ public JsonReader(final Reader reader) { private char _last; private boolean _lastValid; + /** + * The next character read from the stream + * @return The character read + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public char next() throws IOException { if (_endOfStream) throw new IOException("Could not read past the end of stream"); final int next = reader.read(); - System.out.println("READ: " + (char) next + " (" + next + ")"); + //System.out.println("READ: " + (char) next + " (" + next + ")"); if (next == -1) { _lastValid = false; _endOfStream = true; @@ -31,11 +36,16 @@ public char next() throws IOException { return _last = (char) next; } + /** + * Consumes the next character from the streem and returns it's {@code int} value; + * @return The {@code int} value of the next character from the stream + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public int peek() throws IOException { if (_endOfStream) throw new IOException("Could not peek past the end of stream"); - final int peek = reader.read(); - System.out.println("PEEK: " + (char) peek + " (" + peek + ")"); + final int peek = reader.read(); + //System.out.println("PEEK: " + (char) peek + " (" + peek + ")"); if (peek == -1) { _lastValid = false; @@ -48,6 +58,11 @@ public int peek() throws IOException { return peek; } + /** + * The value of the last character consumed from the stream. + * @return The last character consumed from the stream. + * @throws IOException If the last character consumed is invalid, or the end of the stream is reached + */ public char last() throws IOException { if (!_lastValid) { if (_endOfStream) @@ -57,36 +72,82 @@ public char last() throws IOException { return _last; } + /** + * Reads a character from the stream. + * @return The value of the last character read, if valid, otherwise the value of the next valid character. + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public char read() throws IOException { return _lastValid ? _last : next(); } - public void invalidate() throws IOException { + /** + * Invalidates the last character read from the stream. + */ + public void invalidate() { _lastValid = false; } + /** + * Consumes whitespace characters in the stream (if any) and discards them + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ + public void consumeWhitespaces() throws IOException{ + while(Character.isWhitespace(read())); + } + + /** + * Asserts that the method {@link JsonReader#next()} returns expected + * @param expected The expected value of the character + * @throws IOException The next character read has a value different than expected + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public void assertNext(final char expected) throws IOException { if (next() != expected) throw new IOException("Could not parse token, expected '" + expected + "', got '" + last() + "'"); invalidate(); } + /** + * Assert that the method {@link JsonReader#last()} returns expected + * @param expected The expected value of the character + * @throws IOException The last character read from the stream has a value different than expected + * @throws IOException The last character read is invalid, or the end of the stream has been reached + */ public void assertLast(final char expected) throws IOException { if (last() != expected) throw new IOException("Could not parse token, expected '" + expected + "', got '" + last() + "'"); invalidate(); } + /** + * Assert that the method {@link JsonReader#read()} returns expected + * @param expected The expected value of the character + * @throws IOException The character has a value different than expected + * @throws IOException The last character read is invalid, or the end of the stream has been reached + */ public void assertRead(final char expected) throws IOException { if (_lastValid) assertLast(expected); else assertNext(expected); } + /** + * Returns {@code int} value of the next hex digit read, or fails if the next character is not a hex digit. + * @return The {@code int} value of the next hex digit read + * @throws IOException The next character is not a hex digit + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public int nextHexDigit() throws IOException { final char next = next(); if (next >= '0' && next <= '9') return next - 0x30; if (next >= 'A' && next <= 'F') return next - 0x37; if (next >= 'a' && next <= 'f') return next - 0x57; throw new IOException("Could not parse unicode escape, expected a hexadecimal digit, got '" + next + "'"); - } - + } + + /** + * Reads a {@code null} value from the stream + * @return {@code (T) null} + * @throws IOException The token read from the stream was not 'null' + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public T readNull() throws IOException { if (read() == 'n' && next() == 'u' && next() == 'l' && next() == 'l') { invalidate(); @@ -96,6 +157,12 @@ public T readNull() throws IOException { throw new IOException("Could not parse token, expected 'null'"); } + /** + * Reads a {@code true} value from the stream + * @return The {@code boolean} literal {@code true} + * @throws IOException The token read from the stream was not 'true' + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public boolean readTrue() throws IOException { if (read() == 't' && next() == 'r' && next() == 'u' && next() == 'e') { invalidate(); @@ -105,6 +172,12 @@ public boolean readTrue() throws IOException { throw new IOException("Could not parse token, expected 'true'"); } + /** + * Reads a {@code false} value from the stream + * @return The {@code boolean} literal {@code false} + * @throws IOException The token read from the stream was not 'false' + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public boolean readFalse() throws IOException { if (read() == 'f' && next() == 'a' && next() == 'l' && next() == 's' && next() == 'e') { invalidate(); @@ -114,6 +187,13 @@ public boolean readFalse() throws IOException { throw new IOException("Could not parse token, expected 'false'"); } + /** + * Reads a raw number from the stream, and returns it as a {@link java.lang.StringBuilder} + * @param sb The {@link StringBuilder} to read the number into + * @return the populated {@link StringBuilder} + * @throws IOException The number was not in a correct format + * @throws IOException The end of the stream was reached, or an I/O error has occured + */ public StringBuilder readRawNumber(final StringBuilder sb) throws IOException { char ch = read(); if (ch == '-') { @@ -182,8 +262,8 @@ public StringBuilder readRawNumber(final StringBuilder sb) throws IOException { throw new IOException("Could not parse number - no leading digits found!"); return sb; - } - + } + @SuppressWarnings("unchecked") public T readOpt(final JsonDeserializer deserializer) throws IOException { return read() == 'n' ? (T) readNull() : deserializer.fromJson(this); @@ -206,15 +286,16 @@ public T[] readOptArray(final JsonDeserializer deserializer) throws IOExc public T[] readOptArrayOpt(final JsonDeserializer deserializer) throws IOException { return read() == 'n' ? (T[]) readNull() : readArrayOpt(deserializer); } - - + public ArrayList readList(final JsonDeserializer deserializer) throws IOException { assertRead('['); - + consumeWhitespaces(); + final ArrayList values = new ArrayList(); final StringBuilder sb = new StringBuilder(); boolean needComma = false; while (read() != ']') { + consumeWhitespaces(); if (needComma) { assertLast(','); sb.setLength(0); @@ -265,7 +346,6 @@ public ArrayList readOptListOpt(final JsonDeserializer deserializer) t return read() == 'n' ? (ArrayList) readNull() : readListOpt(deserializer); } - public HashSet readSet(final JsonDeserializer deserializer) throws IOException { assertRead('['); @@ -355,7 +435,7 @@ public String readString() throws IOException { invalidate(); return sb.toString(); - } + } } // private Map readObject(final StringBuilder sb) throws IOException { From 94c431ae96f1512e829606dd1ac335cb3c518788 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 10:45:09 +0100 Subject: [PATCH 08/30] XML -> Json deserializer, does not support whitespace --- .../deserializers/XmlJsonDeserializer.java | 204 +++++++++++++++++- 1 file changed, 194 insertions(+), 10 deletions(-) diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java index fd09a13..e9a55d5 100644 --- a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -1,28 +1,212 @@ package io.jvm.json.deserializers; +import io.jvm.json.JsonDeserializer; +import io.jvm.json.JsonReader; + import java.io.IOException; -import java.util.UUID; -import org.w3c.dom.Document; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; -import io.jvm.json.JsonDeserializer; -import io.jvm.json.JsonReader; +import org.w3c.dom.Document; +import org.w3c.dom.Element; public class XmlJsonDeserializer implements JsonDeserializer{ - + private static final Document[] ZERO_ARRAY = new Document[0]; + /* Implementation */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; + + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; + @Override public Document[] getZeroArray() { return ZERO_ARRAY; } - + + /** + * Constructs an {@link org.w3c.dom.Document} + * object using the given {@link io.jvm.json.JsonReader} + * @return The constructed {@link org.w3c.dom.Document} object + * @throws IOException + */ @Override - public Document fromJson(JsonReader jsonReader) throws IOException { - // TODO Auto-generated method stub - return null; + public Document fromJson(final JsonReader reader) throws IOException { + + Document document; + + try{ + document = DocumentBuilderFactory + .newInstance() + .newDocumentBuilder() + .newDocument(); + + /* The document must have a single Json node */ + reader.assertRead('{'); + + /* The first element is the root node */ + String rootElementName = reader.readString(); + + Element root = document.createElement(rootElementName); + document.appendChild(root); + + reader.assertRead(':'); + + buildNodeValueSubtree(document, root, reader); + + reader.assertRead('}'); + /* TODO: if this is not a single json object node, throw */ + } + catch(ParserConfigurationException ex){ + document = null; // TODO: Handle the exception, this is just until we implement the deserializer + } + + return document; + } + + private boolean valueIsObject(JsonReader reader) throws IOException{ + return reader.read() == '{'; + } + + private boolean valueIsArray(JsonReader reader) throws IOException{ + return reader.read() == '['; } - + private void buildTextValue(Document document, Element node, JsonReader reader) throws IOException{ + switch(reader.read()){ + case '"': + /* String */ + node.appendChild(document.createTextNode(reader.readString())); + break; + case 't': + /* true */ + node.setNodeValue(new Boolean(reader.readTrue()).toString()); + break; + case 'f': + /* false */ + node.setNodeValue(new Boolean(reader.readFalse()).toString()); + break; + case 'n': + /* null */ + reader.readNull(); + node.setNodeValue(null); + break; + default: + /* Number or invalid */ + node.setNodeValue(reader.readRawNumber(new StringBuilder()).toString()); + break; + } + } + /** + * Recursively builds an XML Element node's subtree from the content of the given JsonReader. + * The node needs to exist, and the JsonReader needs to be positioned at the Json element's value. + */ + private void buildNodeValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ + if(valueIsObject(reader)){ + buildObjectValueSubtree(document,parent,reader); + } + else if(valueIsArray(reader)){ + String arrayNodesName=parent.getNodeName(); + Element grandParent = (Element)parent.getParentNode(); + grandParent.removeChild(parent); + buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); + } + else{ // TODO: for special document names + /* Otherwise the value is string/true/false/null/number or invalid*/ + // Note: JSON converted from XML should never have non-string true/false/null + buildTextValue(document, parent,reader); + } + } + + /** + * Builds an XML subtree from a JSON object element + * @param document the {@link Document} this tree belongs too + * @param parent the parent {@link Element} node of the subtree + * @param reader the {@link JsonReader} we are currently using to read the Json stream + */ + private void buildObjectValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ + reader.assertRead('{'); + + boolean needsComma=false; + while (reader.read() != '}') { + if(needsComma){ + reader.assertLast(','); + reader.next(); + } + + String childNodeName = reader.readString(); + reader.assertRead(':'); + + /* If it's an attribute node */ + if(childNodeName.startsWith("@")){ + String nodeValue = reader.readString(); + parent.setAttribute(childNodeName.substring(1), nodeValue); + } + /* If it's a special node */ + else if(childNodeName.startsWith("#")){ + if(childNodeName.equals(commentNodeTag)){ + String commentText = reader.readString(); + parent.appendChild(document.createComment(commentText)); + } + else if(childNodeName.equals(cDataNodeTag)){ + String cDataText = reader.readString(); + parent.appendChild(document.createCDATASection(cDataText)); + } + else if(childNodeName.equals(textNodeTag)){ + String textNodeData = reader.readString(); + parent.appendChild(document.createTextNode(textNodeData)); + } + } + /* If it's a normal node */ + else{ + Element childElement = document.createElement(childNodeName); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } + + needsComma=true; + } + reader.assertRead('}'); + } + + /** + * Builds a sequence of XML elements from a Json array. The first element of the sequence must + * exist before calling this method + * + * E.g. {@code "array":["1","2","3"]} translates to {@code 123} + * + * @param document + * @param parent + * @param reader + * @throws IOException + */ + private void buildArrayValueSubtree(Document document, Element parent, String arrayNodesName, JsonReader reader) throws IOException{ + reader.assertRead('['); + + boolean needsComma = false; + while(reader.read()!=']'){ + if(needsComma){ + reader.assertLast(','); + reader.next(); + } + + Element childNode = document.createElement(arrayNodesName); + parent.appendChild(childNode); + buildNodeValueSubtree(document, childNode, reader); + + needsComma=true; + } + + reader.assertRead(']'); + } } From 01fd836635f9f40e42596e001ad996564b82ba23 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 10:47:11 +0100 Subject: [PATCH 09/30] tweaks --- .../json/serializers/XmlJsonSerializer.java | 104 +++++++++++++----- 1 file changed, 77 insertions(+), 27 deletions(-) diff --git a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java index a2661c2..c8290f3 100644 --- a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java +++ b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java @@ -57,6 +57,8 @@ public void toJson(JsonWriter jsonWriter, Element value) throws IOException { private final boolean writeArrayAttribute = false; private final boolean omitRootObject = false; + private boolean needsComma = false; + /** * Write a Json representation of a given org.w3c.dom.Element. * @@ -69,20 +71,33 @@ public void toJson(JsonWriter jsonWriter, Element value) throws IOException { private void writeJson(final JsonWriter writer, final Element element) throws IOException { + trimWhitespaceTextNodes(element.getOwnerDocument()); + final XmlNamespaceManager manager = new XmlNamespaceManager(); pushParentNamespaces(element, manager); if (!omitRootObject) - writer.writeOpenObject(); + writeOpenObjectWithComma(writer); //writeXmlDeclaration(writer,element.getOwnerDocument(),manager); serializeNode(writer, element, manager, !omitRootObject); if (!omitRootObject) - writer.writeCloseObject(); + writeCloseObjectWithComma(writer); } + private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { + if (node != null && node.getChildNodes() != null) + for (int i = 0; i < node.getChildNodes().getLength(); i++) { + final org.w3c.dom.Node child = node.getChildNodes().item(i); + if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE + && child.getNodeValue().trim().length() == 0) + node.removeChild(child); + trimWhitespaceTextNodes(node.getChildNodes().item(i)); + } + } + private void pushParentNamespaces(final Element element, final XmlNamespaceManager manager) { final List parentElements = new ArrayList(); @@ -248,18 +263,17 @@ private Map> getNodesGroupedByName(final Node root, final Xml private void serializeArray(final JsonWriter writer, final String nameOfTheElements, final List nodes, final XmlNamespaceManager manager, boolean writePropertyName) throws IOException{ if (writePropertyName){ - writer.writeString(nameOfTheElements); - writer.writeColon(); + writePropertyNameAndColon(writer, nameOfTheElements); } - writer.writeOpenArray(); + writeOpenArrayWithComma(writer); for (int i = 0; i < nodes.size(); i++) { serializeNode(writer, nodes.get(i), manager, false); } - writer.writeCloseArray(); + writeCloseArrayWithComma(writer); } /** @@ -282,27 +296,23 @@ private boolean allChildrenHaveSameLocalName(final Node node){ ///XXX: incomplete, does not add a comma after closing tag private void writeXmlDeclaration(final JsonWriter writer, final Document document, final XmlNamespaceManager manager) throws IOException{ /* Deserializirat deklaraciju, iako ovo zvuči krivo staviti ovdje */ - writer.writeString(declarationNodeTag); - writer.writeColon(); - writer.writeOpenObject(); + writePropertyNameAndColon(writer,declarationNodeTag); + writeOpenObjectWithComma(writer); if(document.getXmlVersion()!=null){ - writer.writeString("@version"); - writer.writeColon(); - writer.writeString(document.getXmlVersion()); + writePropertyNameAndColon(writer,"@version"); + writePropertyValue(writer,document.getXmlVersion()); } writer.writeComma(); if(document.getXmlVersion()!=null){ - writer.writeString("@encoding"); - writer.writeColon(); - writer.writeString(document.getXmlEncoding()); + writePropertyNameAndColon(writer,"@encoding"); + writePropertyValue(writer,document.getXmlEncoding()); } writer.writeComma(); if(document.getXmlVersion()!=null){ - writer.writeString("@standalone"); - writer.writeColon(); - writer.writeString(document.getXmlStandalone()?"yes":"no"); + writePropertyNameAndColon(writer,"@standalone"); + writePropertyValue(writer,document.getXmlStandalone()?"yes":"no"); } - writer.writeCloseObject(); + writeCloseObjectWithComma(writer); } private void serializeNode(final JsonWriter writer, final Node node, final XmlNamespaceManager manager, final boolean writePropertyName) throws IOException{ @@ -335,17 +345,16 @@ private void serializeNode(final JsonWriter writer, final Node node, final XmlNa } if(writePropertyName){ - writer.writeString(getPropertyName(node, manager)); - writer.writeColon(); + writePropertyNameAndColon(writer, getPropertyName(node, manager)); } if(hasSingleTextChild(node)) - writer.writeString(node.getChildNodes().item(0).getNodeValue()); + writePropertyValue(writer,node.getChildNodes().item(0).getNodeValue()); else if(nodeIsEmpty(node)){ writer.writeNull(); } else{ - writer.writeOpenObject(); + writeOpenObjectWithComma(writer); /* First serialize the attributes */ @@ -355,7 +364,7 @@ else if(nodeIsEmpty(node)){ /* Then serialize the nodes by groups */ serializeGroupedNodes(writer, node, manager, true); - writer.writeCloseObject(); + writeCloseObjectWithComma(writer); } manager.popScope(); @@ -376,10 +385,9 @@ else if(nodeIsEmpty(node)){ } if(writePropertyName){ - writer.writeString(getPropertyName(node, manager)); - writer.writeColon(); + writePropertyNameAndColon(writer,getPropertyName(node, manager)); } - writer.writeString(node.getNodeValue()); + writePropertyValue(writer,node.getNodeValue()); break; // Not covered by org.w2c.dom specs: @@ -450,5 +458,47 @@ else if(lhs ==null || rhs == null) return false; else return lhs.equals(rhs); + } + + private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException{ + if(needsComma){ + writer.writeComma(); + needsComma=false; + } + } + + private void writePropertyNameAndColon(JsonWriter writer, String propertyName) throws IOException{ + writeStringWithComma(writer, propertyName); + writer.writeColon(); + } + + private void writePropertyValue(JsonWriter writer, String propertyValue) throws IOException{ + writer.writeString(propertyValue); + needsComma=true; + } + + private void writeStringWithComma(JsonWriter writer, String text) throws IOException{ + writeCommaIfNeedsComma(writer); + writer.writeString(text); + } + + private void writeOpenObjectWithComma(JsonWriter writer) throws IOException{ + writeCommaIfNeedsComma(writer); + writer.writeOpenObject(); + } + + private void writeOpenArrayWithComma(JsonWriter writer) throws IOException{ + writeCommaIfNeedsComma(writer); + writer.writeOpenArray(); + } + + private void writeCloseObjectWithComma(JsonWriter writer) throws IOException{ + needsComma=true; + writer.writeCloseObject(); + } + + private void writeCloseArrayWithComma(JsonWriter writer) throws IOException{ + needsComma=true; + writer.writeCloseArray(); } } From 648c844082e77f97b643231c7f0d1584a6112154 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 12:49:17 +0100 Subject: [PATCH 10/30] Support for whitespaces between JSON tokens --- .../src/main/java/io/jvm/json/JsonReader.java | 1007 ++++++++++------- .../deserializers/XmlJsonDeserializer.java | 39 +- .../json/serializers/XmlJsonSerializer.java | 960 ++++++++-------- 3 files changed, 1156 insertions(+), 850 deletions(-) diff --git a/json/src/main/java/io/jvm/json/JsonReader.java b/json/src/main/java/io/jvm/json/JsonReader.java index 62e7476..876b083 100644 --- a/json/src/main/java/io/jvm/json/JsonReader.java +++ b/json/src/main/java/io/jvm/json/JsonReader.java @@ -9,517 +9,762 @@ public class JsonReader { private final Reader reader; public JsonReader(final Reader reader) { - this.reader = reader; + this.reader = reader; } private boolean _endOfStream; private char _last; private boolean _lastValid; + private boolean consumeWhitespace = true; /** * The next character read from the stream + * * @return The character read - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public char next() throws IOException { - if (_endOfStream) throw new IOException("Could not read past the end of stream"); - - final int next = reader.read(); - //System.out.println("READ: " + (char) next + " (" + next + ")"); - if (next == -1) { - _lastValid = false; - _endOfStream = true; - throw new IOException("Unexpected end of input stream"); - } - - _lastValid = true; - return _last = (char) next; + if (_endOfStream) + throw new IOException("Could not read past the end of stream"); + + final int next = reader.read(); + // System.out.println("READ: " + (char) next + " (" + next + ")"); + if (next == -1) { + _lastValid = false; + _endOfStream = true; + throw new IOException("Unexpected end of input stream"); + } + + _lastValid = true; + return _last = (char) next; } /** - * Consumes the next character from the streem and returns it's {@code int} value; + * Consumes the next character from the streem and returns it's {@code int} + * value; + * * @return The {@code int} value of the next character from the stream - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public int peek() throws IOException { - if (_endOfStream) throw new IOException("Could not peek past the end of stream"); - - final int peek = reader.read(); - //System.out.println("PEEK: " + (char) peek + " (" + peek + ")"); - - if (peek == -1) { - _lastValid = false; - _endOfStream = true; - } - else { - _lastValid = true; - _last = (char) peek; - } - return peek; + if (_endOfStream) + throw new IOException("Could not peek past the end of stream"); + + final int peek = reader.read(); + // System.out.println("PEEK: " + (char) peek + " (" + peek + ")"); + + if (peek == -1) { + _lastValid = false; + _endOfStream = true; + } else { + _lastValid = true; + _last = (char) peek; + } + return peek; } /** - * The value of the last character consumed from the stream. + * The value of the last character consumed from the stream. + * * @return The last character consumed from the stream. - * @throws IOException If the last character consumed is invalid, or the end of the stream is reached + * @throws IOException + * If the last character consumed is invalid, or the end of the + * stream is reached */ public char last() throws IOException { - if (!_lastValid) { - if (_endOfStream) - throw new IOException("Could not reuse last() character because the stream has ended!"); - throw new IOException("Could not reuse last() character because it is not valid; use read() or next() instead!"); - } - return _last; + if (!_lastValid) { + if (_endOfStream) + throw new IOException( + "Could not reuse last() character because the stream has ended!"); + throw new IOException( + "Could not reuse last() character because it is not valid; use read() or next() instead!"); + } + return _last; } /** * Reads a character from the stream. - * @return The value of the last character read, if valid, otherwise the value of the next valid character. - * @throws IOException The end of the stream was reached, or an I/O error has occured + * + * @return The value of the last character read, if valid, otherwise the + * value of the next valid character. + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public char read() throws IOException { - return _lastValid ? _last : next(); + return _lastValid ? _last : next(); + } + + /** + * Same as read() only calls {@link peek()} for reading the value of the + * next character. + * + * @return The value of the last character read, if valid, otherwise the + * value of the next valid character. + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured + */ + public char readWithPeek() throws IOException { + return _lastValid ? _last : (char) peek(); + } + + /** + * Consumes all immediate whitespaces and executes {@link JsonReader#read()} + * on the first non-whitespace character encountered. + * + * @return The first non-whitespace character encountered + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured + */ + public char readToken() throws IOException { + consumeWhitespaces(); + return read(); } /** * Invalidates the last character read from the stream. */ - public void invalidate() { - _lastValid = false; + public void invalidate() { + _lastValid = false; } /** * Consumes whitespace characters in the stream (if any) and discards them - * @throws IOException The end of the stream was reached, or an I/O error has occured + * + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ - public void consumeWhitespaces() throws IOException{ - while(Character.isWhitespace(read())); + public void consumeWhitespaces() throws IOException { + if (consumeWhitespace) { + while (!_endOfStream && Character.isWhitespace(readWithPeek())) + peek(); + } } - + + public void assertEndOfStream() throws IOException { + if (!_endOfStream) + throw new IOException("End of stream expected."); + } + /** - * Asserts that the method {@link JsonReader#next()} returns expected - * @param expected The expected value of the character - * @throws IOException The next character read has a value different than expected - * @throws IOException The end of the stream was reached, or an I/O error has occured + * Asserts that the method {@link JsonReader#next()} returns + * expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The next character read has a value different than + * expected + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public void assertNext(final char expected) throws IOException { - if (next() != expected) throw new IOException("Could not parse token, expected '" + expected + "', got '" + last() + "'"); - invalidate(); + if (next() != expected) + throw new IOException("Could not parse token, expected '" + + expected + "', got '" + last() + "'"); + invalidate(); } /** - * Assert that the method {@link JsonReader#last()} returns expected - * @param expected The expected value of the character - * @throws IOException The last character read from the stream has a value different than expected - * @throws IOException The last character read is invalid, or the end of the stream has been reached + * Consumes all whitespaces and asserts that the method + * {@link JsonReader#next()} afterwards returns expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The next character read has a value different than + * expected + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured + */ + public void assertNextToken(final char expected) throws IOException { + consumeWhitespaces(); + if (next() != expected) + throw new IOException("Could not parse token, expected '" + + expected + "', got '" + last() + "'"); + invalidate(); + } + + /** + * Assert that the method {@link JsonReader#last()} returns + * expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The last character read from the stream has a value different + * than expected + * @throws IOException + * The last character read is invalid, or the end of the stream + * has been reached */ public void assertLast(final char expected) throws IOException { - if (last() != expected) throw new IOException("Could not parse token, expected '" + expected + "', got '" + last() + "'"); - invalidate(); + if (last() != expected) + throw new IOException("Could not parse token, expected '" + + expected + "', got '" + last() + "'"); + invalidate(); } /** - * Assert that the method {@link JsonReader#read()} returns expected - * @param expected The expected value of the character - * @throws IOException The character has a value different than expected - * @throws IOException The last character read is invalid, or the end of the stream has been reached + * Consumes all whitespaces and asserts that the method + * {@link JsonReader#last()} afterwards returns expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The last character read from the stream has a value different + * than expected + * @throws IOException + * The last character read is invalid, or the end of the stream + * has been reached + */ + public void assertLastToken(final char expected) throws IOException { + consumeWhitespaces(); + if (last() != expected) + throw new IOException("Could not parse token, expected '" + + expected + "', got '" + last() + "'"); + invalidate(); + } + + /** + * Assert that the method {@link JsonReader#read()} returns + * expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The character has a value different than + * expected + * @throws IOException + * The last character read is invalid, or the end of the stream + * has been reached */ public void assertRead(final char expected) throws IOException { - if (_lastValid) assertLast(expected); else assertNext(expected); + if (_lastValid) + assertLast(expected); + else + assertNext(expected); + } + + /** + * Consumes all immediate whitespaces, and asserts that the method + * {@link JsonReader#read()} afterwards returns expected + * + * @param expected + * The expected value of the character + * @throws IOException + * The character has a value different than + * expected + * @throws IOException + * The last character read is invalid, or the end of the stream + * has been reached + */ + public void assertReadToken(final char expected) throws IOException { + consumeWhitespaces(); + assertRead(expected); } /** - * Returns {@code int} value of the next hex digit read, or fails if the next character is not a hex digit. + * Returns {@code int} value of the next hex digit read, or fails if the + * next character is not a hex digit. + * * @return The {@code int} value of the next hex digit read - * @throws IOException The next character is not a hex digit - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The next character is not a hex digit + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public int nextHexDigit() throws IOException { - final char next = next(); - if (next >= '0' && next <= '9') return next - 0x30; - if (next >= 'A' && next <= 'F') return next - 0x37; - if (next >= 'a' && next <= 'f') return next - 0x57; - throw new IOException("Could not parse unicode escape, expected a hexadecimal digit, got '" + next + "'"); - } - + final char next = next(); + if (next >= '0' && next <= '9') + return next - 0x30; + if (next >= 'A' && next <= 'F') + return next - 0x37; + if (next >= 'a' && next <= 'f') + return next - 0x57; + throw new IOException( + "Could not parse unicode escape, expected a hexadecimal digit, got '" + + next + "'"); + } + /** * Reads a {@code null} value from the stream + * * @return {@code (T) null} - * @throws IOException The token read from the stream was not 'null' - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The token read from the stream was not 'null' + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public T readNull() throws IOException { - if (read() == 'n' && next() == 'u' && next() == 'l' && next() == 'l') { - invalidate(); - return (T) null; - } + consumeWhitespaces(); + if (read() == 'n' && next() == 'u' && next() == 'l' && next() == 'l') { + invalidate(); + return (T) null; + } - throw new IOException("Could not parse token, expected 'null'"); + throw new IOException("Could not parse token, expected 'null'"); } /** * Reads a {@code true} value from the stream + * * @return The {@code boolean} literal {@code true} - * @throws IOException The token read from the stream was not 'true' - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The token read from the stream was not 'true' + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public boolean readTrue() throws IOException { - if (read() == 't' && next() == 'r' && next() == 'u' && next() == 'e') { - invalidate(); - return true; - } + consumeWhitespaces(); + if (read() == 't' && next() == 'r' && next() == 'u' && next() == 'e') { + invalidate(); + return true; + } - throw new IOException("Could not parse token, expected 'true'"); + throw new IOException("Could not parse token, expected 'true'"); } /** * Reads a {@code false} value from the stream + * * @return The {@code boolean} literal {@code false} - * @throws IOException The token read from the stream was not 'false' - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The token read from the stream was not 'false' + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ public boolean readFalse() throws IOException { - if (read() == 'f' && next() == 'a' && next() == 'l' && next() == 's' && next() == 'e') { - invalidate(); - return false; - } + consumeWhitespaces(); + + if (read() == 'f' && next() == 'a' && next() == 'l' && next() == 's' + && next() == 'e') { + invalidate(); + return false; + } - throw new IOException("Could not parse token, expected 'false'"); + throw new IOException("Could not parse token, expected 'false'"); } /** - * Reads a raw number from the stream, and returns it as a {@link java.lang.StringBuilder} - * @param sb The {@link StringBuilder} to read the number into + * Reads a raw number from the stream, and returns it as a + * {@link java.lang.StringBuilder} + * + * @param sb + * The {@link StringBuilder} to read the number into * @return the populated {@link StringBuilder} - * @throws IOException The number was not in a correct format - * @throws IOException The end of the stream was reached, or an I/O error has occured + * @throws IOException + * The number was not in a correct format + * @throws IOException + * The end of the stream was reached, or an I/O error has + * occured */ - public StringBuilder readRawNumber(final StringBuilder sb) throws IOException { - char ch = read(); - if (ch == '-') { - sb.append(ch); - ch = next(); - } - - final int length = sb.length(); - if (ch == '0') { - sb.append(ch); - final int chp = peek(); - if (chp == -1) return sb; - ch = (char) chp; - } else if (ch >= '1' && ch <= '9') { - sb.append(ch); - for (;;) { - final int chp = peek(); - if (chp == -1) return sb; - - ch = (char) chp; - if (ch < '0' || ch > '9') break; - sb.append(ch); - } - } - - if (ch == '.') { - sb.append(ch); - ch = next(); - - if (ch < '0' || ch > '9') throw new IOException("Expected decimal after floating point, got: " + ch); - - sb.append(ch); - for (;;) { - final int chp = peek(); - if (chp == -1) return sb; - - ch = (char) chp; - if (ch < '0' || ch > '9') break; - sb.append(ch); - } - } - - if (ch == 'e' || ch == 'E') { - sb.append(ch); - ch = next(); - - if (ch == '-' || ch == '+') { - sb.append(ch); - ch = next(); - } - - if (ch < '0' || ch > '9') throw new IOException("Expected decimal after exponent sign, got: " + ch); - - sb.append(ch); - for (;;) { - final int chp = peek(); - if (chp == -1) return sb; - - ch = (char) chp; - if (ch < '0' || ch > '9') break; - sb.append(ch); - } - } - - if (sb.length() == length) - throw new IOException("Could not parse number - no leading digits found!"); - - return sb; - } - + public StringBuilder readRawNumber(final StringBuilder sb) + throws IOException { + consumeWhitespaces(); + + char ch = read(); + if (ch == '-') { + sb.append(ch); + ch = next(); + } + + final int length = sb.length(); + if (ch == '0') { + sb.append(ch); + final int chp = peek(); + if (chp == -1) + return sb; + ch = (char) chp; + } else if (ch >= '1' && ch <= '9') { + sb.append(ch); + for (;;) { + final int chp = peek(); + if (chp == -1) + return sb; + + ch = (char) chp; + if (ch < '0' || ch > '9') + break; + sb.append(ch); + } + } + + if (ch == '.') { + sb.append(ch); + ch = next(); + + if (ch < '0' || ch > '9') + throw new IOException( + "Expected decimal after floating point, got: " + ch); + + sb.append(ch); + for (;;) { + final int chp = peek(); + if (chp == -1) + return sb; + + ch = (char) chp; + if (ch < '0' || ch > '9') + break; + sb.append(ch); + } + } + + if (ch == 'e' || ch == 'E') { + sb.append(ch); + ch = next(); + + if (ch == '-' || ch == '+') { + sb.append(ch); + ch = next(); + } + + if (ch < '0' || ch > '9') + throw new IOException( + "Expected decimal after exponent sign, got: " + ch); + + sb.append(ch); + for (;;) { + final int chp = peek(); + if (chp == -1) + return sb; + + ch = (char) chp; + if (ch < '0' || ch > '9') + break; + sb.append(ch); + } + } + + if (sb.length() == length) + throw new IOException( + "Could not parse number - no leading digits found!"); + + return sb; + } + @SuppressWarnings("unchecked") - public T readOpt(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (T) readNull() : deserializer.fromJson(this); + public T readOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (T) readNull() : deserializer.fromJson(this); } - public T[] readArray(final JsonDeserializer deserializer) throws IOException { - return readList(deserializer).toArray(deserializer.getZeroArray()); + public T[] readArray(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return readList(deserializer).toArray(deserializer.getZeroArray()); } - public T[] readArrayOpt(final JsonDeserializer deserializer) throws IOException { - return readListOpt(deserializer).toArray(deserializer.getZeroArray()); + public T[] readArrayOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return readListOpt(deserializer).toArray(deserializer.getZeroArray()); } @SuppressWarnings("unchecked") - public T[] readOptArray(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (T[]) readNull() : readArray(deserializer); + public T[] readOptArray(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (T[]) readNull() : readArray(deserializer); } @SuppressWarnings("unchecked") - public T[] readOptArrayOpt(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (T[]) readNull() : readArrayOpt(deserializer); - } - - public ArrayList readList(final JsonDeserializer deserializer) throws IOException { - assertRead('['); - consumeWhitespaces(); - - final ArrayList values = new ArrayList(); - final StringBuilder sb = new StringBuilder(); - boolean needComma = false; - while (read() != ']') { - consumeWhitespaces(); - if (needComma) { - assertLast(','); - sb.setLength(0); - next(); - } - - final T value = deserializer.fromJson(this); - values.add(value); - needComma = true; - } - invalidate(); - - return values; + public T[] readOptArrayOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (T[]) readNull() : readArrayOpt(deserializer); } - @SuppressWarnings("unchecked") - public ArrayList readListOpt(final JsonDeserializer deserializer) throws IOException { - assertRead('['); - - final ArrayList values = new ArrayList(); - final StringBuilder sb = new StringBuilder(); - boolean needComma = false; - while (read() != ']') { - if (needComma) { - assertLast(','); - sb.setLength(0); - next(); - } - - final T value = read() == 'n' - ? (T) readNull() - : deserializer.fromJson(this); - values.add(value); - needComma = true; - } - invalidate(); - - return values; + public ArrayList readList(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + assertRead('['); + consumeWhitespaces(); + + final ArrayList values = new ArrayList(); + final StringBuilder sb = new StringBuilder(); + boolean needComma = false; + while (read() != ']') { + consumeWhitespaces(); + if (needComma) { + assertLast(','); + sb.setLength(0); + next(); + } + + final T value = deserializer.fromJson(this); + values.add(value); + needComma = true; + } + invalidate(); + + return values; } @SuppressWarnings("unchecked") - public ArrayList readOptList(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (ArrayList) readNull() : readList(deserializer); + public ArrayList readListOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + assertRead('['); + + final ArrayList values = new ArrayList(); + final StringBuilder sb = new StringBuilder(); + boolean needComma = false; + while (read() != ']') { + if (needComma) { + assertLast(','); + sb.setLength(0); + next(); + } + + final T value = read() == 'n' ? (T) readNull() : deserializer + .fromJson(this); + values.add(value); + needComma = true; + } + invalidate(); + + return values; } @SuppressWarnings("unchecked") - public ArrayList readOptListOpt(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (ArrayList) readNull() : readListOpt(deserializer); + public ArrayList readOptList(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (ArrayList) readNull() + : readList(deserializer); } - public HashSet readSet(final JsonDeserializer deserializer) throws IOException { - assertRead('['); - - final HashSet values = new HashSet(); - final StringBuilder sb = new StringBuilder(); - boolean needComma = false; - while (read() != ']') { - if (needComma) { - assertLast(','); - sb.setLength(0); - next(); - } - - final T value = deserializer.fromJson(this); - values.add(value); - needComma = true; - } - invalidate(); + @SuppressWarnings("unchecked") + public ArrayList readOptListOpt( + final JsonDeserializer deserializer) throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (ArrayList) readNull() + : readListOpt(deserializer); + } - return values; + public HashSet readSet(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + assertRead('['); + + final HashSet values = new HashSet(); + final StringBuilder sb = new StringBuilder(); + boolean needComma = false; + while (read() != ']') { + if (needComma) { + assertLast(','); + sb.setLength(0); + next(); + } + + final T value = deserializer.fromJson(this); + values.add(value); + needComma = true; + } + invalidate(); + + return values; } @SuppressWarnings("unchecked") - public HashSet readSetOpt(final JsonDeserializer deserializer) throws IOException { - assertRead('['); - - final HashSet values = new HashSet(); - final StringBuilder sb = new StringBuilder(); - boolean needComma = false; - while (read() != ']') { - if (needComma) { - assertLast(','); - sb.setLength(0); - next(); - } - - final T value = read() == 'n' - ? (T) readNull() - : deserializer.fromJson(this); - values.add(value); - needComma = true; - } - invalidate(); - - return values; + public HashSet readSetOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + assertRead('['); + + final HashSet values = new HashSet(); + final StringBuilder sb = new StringBuilder(); + boolean needComma = false; + while (read() != ']') { + if (needComma) { + assertLast(','); + sb.setLength(0); + next(); + } + + final T value = read() == 'n' ? (T) readNull() : deserializer + .fromJson(this); + values.add(value); + needComma = true; + } + invalidate(); + + return values; } @SuppressWarnings("unchecked") - public HashSet readOptSet(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (HashSet) readNull() : readSet(deserializer); + public HashSet readOptSet(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (HashSet) readNull() : readSet(deserializer); } @SuppressWarnings("unchecked") - public HashSet readOptSetOpt(final JsonDeserializer deserializer) throws IOException { - return read() == 'n' ? (HashSet) readNull() : readSetOpt(deserializer); + public HashSet readOptSetOpt(final JsonDeserializer deserializer) + throws IOException { + consumeWhitespaces(); + return read() == 'n' ? (HashSet) readNull() + : readSetOpt(deserializer); } public String readString() throws IOException { - if (read() != '"') - throw new IOException("Could not parse String, expected '\"', got '" + last() + "'"); - - final StringBuilder sb = new StringBuilder(); - while (next() != '"') { - if (last() == '\\') { - final char ch = next(); - switch (ch) { - case 'b': sb.append('\b'); continue; - case 't': sb.append('\t'); continue; - case 'n': sb.append('\n'); continue; - case 'f': sb.append('\f'); continue; - case 'r': sb.append('\r'); continue; - case '"': - case '/': - case '\\': sb.append(ch); continue; - case 'u': sb.append( - (nextHexDigit() << 12) | - (nextHexDigit() << 8) | - (nextHexDigit() << 4) | - nextHexDigit()); continue; - } - - throw new IOException("Could not parse String, got invalid escape combination '\\" + ch + "'"); - } - - sb.append(last()); - } - - invalidate(); - return sb.toString(); - } + + consumeWhitespaces(); + + if (read() != '"') + throw new IOException( + "Could not parse String, expected '\"', got '" + last() + + "'"); + + final StringBuilder sb = new StringBuilder(); + while (next() != '"') { + if (last() == '\\') { + final char ch = next(); + switch (ch) { + case 'b': + sb.append('\b'); + continue; + case 't': + sb.append('\t'); + continue; + case 'n': + sb.append('\n'); + continue; + case 'f': + sb.append('\f'); + continue; + case 'r': + sb.append('\r'); + continue; + case '"': + case '/': + case '\\': + sb.append(ch); + continue; + case 'u': + sb.append((nextHexDigit() << 12) | (nextHexDigit() << 8) + | (nextHexDigit() << 4) | nextHexDigit()); + continue; + } + + throw new IOException( + "Could not parse String, got invalid escape combination '\\" + + ch + "'"); + } + + sb.append(last()); + } + + invalidate(); + return sb.toString(); + } } -// private Map readObject(final StringBuilder sb) throws IOException { -// final Map object = new LinkedHashMap(); -// boolean needComma = false; -// for(;;) { -// char objCh = next(); -// if (objCh == '}') { -// sb.append(objCh); -// invalidate(); -// return; -// } +// private Map readObject(final StringBuilder sb) throws +// IOException { +// final Map object = new LinkedHashMap(); +// boolean needComma = false; +// for(;;) { +// char objCh = next(); +// if (objCh == '}') { +// sb.append(objCh); +// invalidate(); +// return; +// } // -// if (needComma) { -// if (objCh != ',') { -// throw new IOException("Could not parse object: expected comma, got: " + objCh); -// } -// sb.append(objCh); -// objCh = next(); -// } +// if (needComma) { +// if (objCh != ',') { +// throw new IOException("Could not parse object: expected comma, got: " + +// objCh); +// } +// sb.append(objCh); +// objCh = next(); +// } // -// if (objCh != '"') -// throw new IOException("Could not parse object: expected property name string, got: " + objCh); -// sb.append(objCh); -// readRawString(sb); +// if (objCh != '"') +// throw new +// IOException("Could not parse object: expected property name string, got: " + +// objCh); +// sb.append(objCh); +// readRawString(sb); // -// final char colon = next(); -// sb.append(colon); -// if (colon != ':') -// throw new IOException("Could not parse object: expected colon after property name, got: " + colon); -// invalidate(); +// final char colon = next(); +// sb.append(colon); +// if (colon != ':') +// throw new +// IOException("Could not parse object: expected colon after property name, got: " +// + colon); +// invalidate(); // -// readRaw(sb); -// needComma = true; -// } -// } +// readRaw(sb); +// needComma = true; +// } +// } // -// private void readRawArray(final StringBuilder sb) throws IOException { -// boolean needComma = false; -// for(;;) { -// char arrCh = read(); -// if (arrCh == ']') { -// sb.append(arrCh); -// return; -// } +// private void readRawArray(final StringBuilder sb) throws IOException { +// boolean needComma = false; +// for(;;) { +// char arrCh = read(); +// if (arrCh == ']') { +// sb.append(arrCh); +// return; +// } // -// if (needComma) { -// if (arrCh != ',') { -// throw new IOException("Could not parse array: expected comma, got: " + arrCh); -// } -// sb.append(arrCh); -// arrCh = next(); -// } +// if (needComma) { +// if (arrCh != ',') { +// throw new IOException("Could not parse array: expected comma, got: " + +// arrCh); +// } +// sb.append(arrCh); +// arrCh = next(); +// } // -// sb.append(arrCh); -// readRaw(sb); -// needComma = true; -// } -// } +// sb.append(arrCh); +// readRaw(sb); +// needComma = true; +// } +// } // -// private void readRaw(final StringBuilder sb) throws IOException { -// final char ch = read(); -// sb.append(ch); -// invalidate(); +// private void readRaw(final StringBuilder sb) throws IOException { +// final char ch = read(); +// sb.append(ch); +// invalidate(); // -// switch (ch) { -// case '"': readRawString(sb); return; -// case '{': readRawObject(sb); return; -// case '[': readRawArray(sb); return; -// case 'n': readRawNull(sb); return; -// case 't': readRawTrue(sb); return; -// case 'f': readRawFalse(sb); return; -// default: -// if (ch == '-' || ch >= '0' && ch <= '9') { -// readRawNumber(sb, ch); -// return; -// } -// } +// switch (ch) { +// case '"': readRawString(sb); return; +// case '{': readRawObject(sb); return; +// case '[': readRawArray(sb); return; +// case 'n': readRawNull(sb); return; +// case 't': readRawTrue(sb); return; +// case 'f': readRawFalse(sb); return; +// default: +// if (ch == '-' || ch >= '0' && ch <= '9') { +// readRawNumber(sb, ch); +// return; +// } +// } // -// throw new IOException("Could not parse token, received: " + ch); -// } +// throw new IOException("Could not parse token, received: " + ch); +// } // -// public String readRaw() throws IOException { -// final StringBuilder sb = new StringBuilder(); -// readRaw(sb); -// return sb.toString(); -// } +// public String readRaw() throws IOException { +// final StringBuilder sb = new StringBuilder(); +// readRaw(sb); +// return sb.toString(); +// } diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java index e9a55d5..06470bb 100644 --- a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -51,7 +51,7 @@ public Document fromJson(final JsonReader reader) throws IOException { .newDocument(); /* The document must have a single Json node */ - reader.assertRead('{'); + reader.assertReadToken('{'); /* The first element is the root node */ String rootElementName = reader.readString(); @@ -59,12 +59,13 @@ public Document fromJson(final JsonReader reader) throws IOException { Element root = document.createElement(rootElementName); document.appendChild(root); - reader.assertRead(':'); + reader.assertReadToken(':'); buildNodeValueSubtree(document, root, reader); - reader.assertRead('}'); - /* TODO: if this is not a single json object node, throw */ + reader.assertReadToken('}'); + reader.consumeWhitespaces(); + reader.assertEndOfStream(); } catch(ParserConfigurationException ex){ document = null; // TODO: Handle the exception, this is just until we implement the deserializer @@ -73,16 +74,16 @@ public Document fromJson(final JsonReader reader) throws IOException { return document; } - private boolean valueIsObject(JsonReader reader) throws IOException{ - return reader.read() == '{'; + private boolean valueIsObject(JsonReader reader) throws IOException{ + return reader.readToken() == '{'; } - private boolean valueIsArray(JsonReader reader) throws IOException{ - return reader.read() == '['; + private boolean valueIsArray(JsonReader reader) throws IOException{ + return reader.readToken() == '['; } private void buildTextValue(Document document, Element node, JsonReader reader) throws IOException{ - switch(reader.read()){ + switch(reader.readToken()){ case '"': /* String */ node.appendChild(document.createTextNode(reader.readString())); @@ -121,7 +122,7 @@ else if(valueIsArray(reader)){ grandParent.removeChild(parent); buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); } - else{ // TODO: for special document names + else{ /* Otherwise the value is string/true/false/null/number or invalid*/ // Note: JSON converted from XML should never have non-string true/false/null buildTextValue(document, parent,reader); @@ -135,17 +136,17 @@ else if(valueIsArray(reader)){ * @param reader the {@link JsonReader} we are currently using to read the Json stream */ private void buildObjectValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ - reader.assertRead('{'); + reader.assertReadToken('{'); boolean needsComma=false; - while (reader.read() != '}') { + while (reader.readToken() != '}') { if(needsComma){ - reader.assertLast(','); + reader.assertLastToken(','); reader.next(); } String childNodeName = reader.readString(); - reader.assertRead(':'); + reader.assertReadToken(':'); /* If it's an attribute node */ if(childNodeName.startsWith("@")){ @@ -176,7 +177,7 @@ else if(childNodeName.equals(textNodeTag)){ needsComma=true; } - reader.assertRead('}'); + reader.assertReadToken('}'); } /** @@ -191,12 +192,12 @@ else if(childNodeName.equals(textNodeTag)){ * @throws IOException */ private void buildArrayValueSubtree(Document document, Element parent, String arrayNodesName, JsonReader reader) throws IOException{ - reader.assertRead('['); + reader.assertReadToken('['); boolean needsComma = false; - while(reader.read()!=']'){ + while(reader.readToken()!=']'){ if(needsComma){ - reader.assertLast(','); + reader.assertLastToken(','); reader.next(); } @@ -207,6 +208,6 @@ private void buildArrayValueSubtree(Document document, Element parent, String ar needsComma=true; } - reader.assertRead(']'); + reader.assertReadToken(']'); } } diff --git a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java index c8290f3..bfdf36e 100644 --- a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java +++ b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java @@ -25,480 +25,540 @@ */ public class XmlJsonSerializer implements JsonSerializer { - /* Interface methods */ + /* Interface methods */ - @Override - public boolean isDefault(Element value) { - return false; - } + @Override + public boolean isDefault(Element value) { + return false; + } - @Override - public void toJson(JsonWriter jsonWriter, Element value) throws IOException { - if (value != null) - writeJson(jsonWriter, value); - } + @Override + public void toJson(JsonWriter jsonWriter, Element value) throws IOException { + if (value != null) + writeJson(jsonWriter, value); + } - /* Implementation */ - private final String textNodeTag = "#text"; - private final String commentNodeTag = "#comment"; - private final String cDataNodeTag = "#cdata-section"; - private final String whitespaceNodeTag = "#whitespace"; - private final String significantWhitespaceNodeTag = "#significant-whitespace"; - private final String declarationNodeTag = "?xml"; - private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; - private final String xmlnsPrefix = "xmlns"; - - private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; - private final String jsonArrayAttribute = "Array"; - - // This is only a partial reimplementation, so the following fields are - // fixed and made private: - private final String deserializeRootElementName = null; - private final boolean writeArrayAttribute = false; - private final boolean omitRootObject = false; - - private boolean needsComma = false; - - /** - * Write a Json representation of a given org.w3c.dom.Element. - * - * @param writer - * The writer to write to. - * @param element - * The element to be converted. - * @throws IOException - */ - private void writeJson(final JsonWriter writer, final Element element) - throws IOException { - - trimWhitespaceTextNodes(element.getOwnerDocument()); - - final XmlNamespaceManager manager = new XmlNamespaceManager(); - pushParentNamespaces(element, manager); - - if (!omitRootObject) - writeOpenObjectWithComma(writer); - - //writeXmlDeclaration(writer,element.getOwnerDocument(),manager); - - serializeNode(writer, element, manager, !omitRootObject); - - if (!omitRootObject) - writeCloseObjectWithComma(writer); + /* Implementation */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; + + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; + + // This is only a partial reimplementation, so the following fields are + // fixed and made private: + private final String deserializeRootElementName = null; + private final boolean writeArrayAttribute = false; + private final boolean omitRootObject = false; + + private boolean needsComma = false; + + /** + * Write a Json representation of a given org.w3c.dom.Element. + * + * @param writer + * The writer to write to. + * @param element + * The element to be converted. + * @throws IOException + */ + private void writeJson(final JsonWriter writer, final Element element) + throws IOException { + + trimWhitespaceTextNodes(element.getOwnerDocument()); + + final XmlNamespaceManager manager = new XmlNamespaceManager(); + pushParentNamespaces(element, manager); + + if (!omitRootObject) + writeOpenObjectWithComma(writer); + + // writeXmlDeclaration(writer,element.getOwnerDocument(),manager); + + serializeNode(writer, element, manager, !omitRootObject); + + if (!omitRootObject) + writeCloseObjectWithComma(writer); + } + + private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { + if (node != null && node.getChildNodes() != null) + for (int i = 0; i < node.getChildNodes().getLength(); i++) { + final org.w3c.dom.Node child = node.getChildNodes().item(i); + if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE + && child.getNodeValue().trim().length() == 0) + node.removeChild(child); + trimWhitespaceTextNodes(node.getChildNodes().item(i)); + } + } + + private void pushParentNamespaces(final Element element, + final XmlNamespaceManager manager) { + final List parentElements = new ArrayList(); + + /* Collect all ancestors from the document tree for the current element */ + Node parent = element; + while (parent.getParentNode() != null) { + parent = parent.getParentNode(); + if (parent.getNodeType() == Node.ELEMENT_NODE) + parentElements.add((Element) parent); } - private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { - if (node != null && node.getChildNodes() != null) - for (int i = 0; i < node.getChildNodes().getLength(); i++) { - final org.w3c.dom.Node child = node.getChildNodes().item(i); - if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE - && child.getNodeValue().trim().length() == 0) - node.removeChild(child); - trimWhitespaceTextNodes(node.getChildNodes().item(i)); - } - } - - private void pushParentNamespaces(final Element element, - final XmlNamespaceManager manager) { - final List parentElements = new ArrayList(); - - /* Collect all ancestors from the document tree for the current element */ - Node parent = element; - while (parent.getParentNode() != null) { - parent = parent.getParentNode(); - if (parent.getNodeType() == Node.ELEMENT_NODE) - parentElements.add((Element) parent); - } + /* If the current element has ancestors */ + if (parentElements.isEmpty() == false) { + + /* + * Add a namespace scope for each ancestor of the current node, top + * to bottom + */ + Collections.reverse(parentElements); + for (final Element parentElement : parentElements) { - /* If the current element has ancestors */ - if (parentElements.isEmpty() == false) { - - /* - * Add a namespace scope for each ancestor of the current node, top - * to bottom - */ - Collections.reverse(parentElements); - for (final Element parentElement : parentElements) { - - manager.pushScope(); - - /* - * Find if there are any namespace attributes, and add them to - * the current namespace scope - */ - final NamedNodeMap attributes = parentElement.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - final Attr attribute = (Attr) attributes.item(i); - if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL) - && (equalsWithNull(resolveLocalName(attribute),xmlnsPrefix) == false)) { - manager.addNamespace(resolveLocalName(attribute), attribute.getValue()); - } - } - } + manager.pushScope(); + + /* + * Find if there are any namespace attributes, and add them to + * the current namespace scope + */ + final NamedNodeMap attributes = parentElement.getAttributes(); + for (int i = 0; i < attributes.getLength(); i++) { + final Attr attribute = (Attr) attributes.item(i); + if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL) + && (equalsWithNull(resolveLocalName(attribute), + xmlnsPrefix) == false)) { + manager.addNamespace(resolveLocalName(attribute), + attribute.getValue()); + } } + } } - - private String resolveLocalName(Node node){ - - if(node.getLocalName() == null && node.getPrefix()==null) - return node.getNodeName(); - else - return node.getLocalName(); - } - - /** - * Returns the full name of the given node, along with the prefix resolved - * from the namespace manager + } + + private String resolveLocalName(Node node) { + + if (node.getLocalName() == null && node.getPrefix() == null) + return node.getNodeName(); + else + return node.getLocalName(); + } + + /** + * Returns the full name of the given node, along with the prefix resolved + * from the namespace manager + */ + private String resolveFullName(final Node node, + final XmlNamespaceManager manager) { + + String prefix; + String fullName; + + /* + * If it's an xmlns node with the default xmlnsURL namespace, prefix is + * null, otherwise we pull it out from the namespace manager */ - private String resolveFullName(final Node node, final XmlNamespaceManager manager){ - - String prefix; - String fullName; - - /* If it's an xmlns node with the default xmlnsURL namespace, prefix is null, otherwise we pull it out from the namespace manager */ - if(node.getNamespaceURI() == null - || (equalsWithNull(resolveLocalName(node),xmlnsPrefix) && equalsWithNull(node.getNamespaceURI(),xmlnsURL))) - prefix = null; - else - prefix = manager.lookupPrefix(node.getNamespaceURI()); - - /* If the prefix is null or empty we return just the local name, without any prepended prefix*/ - if(prefix == null || equalsWithNull(prefix,"")) - fullName=resolveLocalName(node); - /* Otherwise we return the full prefix:localName string */ - else - fullName=prefix + ":" + resolveLocalName(node); - - return fullName; - } - - /** - * Returns one of the string constants names for the type of the given node type. - * throws IOException if type is unknown. - * @throws IOException + if (node.getNamespaceURI() == null + || (equalsWithNull(resolveLocalName(node), xmlnsPrefix) && equalsWithNull( + node.getNamespaceURI(), xmlnsURL))) + prefix = null; + else + prefix = manager.lookupPrefix(node.getNamespaceURI()); + + /* + * If the prefix is null or empty we return just the local name, without + * any prepended prefix */ - private String getPropertyName(final Node node, final XmlNamespaceManager manager) throws IOException { - switch (node.getNodeType()) { - case Node.ATTRIBUTE_NODE: - if (equalsWithNull(node.getNamespaceURI(),jsonNamespaceUri)) - return "$" + resolveLocalName(node); - else - return "@" + resolveFullName(node, manager); - case Node.CDATA_SECTION_NODE: - return cDataNodeTag; - case Node.COMMENT_NODE: - return commentNodeTag; - case Node.ELEMENT_NODE: - return resolveFullName(node, manager); - case Node.PROCESSING_INSTRUCTION_NODE: - return "?" + resolveFullName(node, manager); - // XXX: The .NET System.Xml.XmlNodeType and org.w3c.dom.Node enumerations are not mapped 1:1 - // case Node.XmlDeclaration: - // return DeclarationName; - // case Node.SignificantWhitespace: - // return SignificantWhitespaceName; - case Node.TEXT_NODE: - return textNodeTag; - // case Node.Whitespace: - // return WhitespaceName; - default: - throw new IOException( - "Unexpected Node when getting node name: " + node.getNodeType()); - } + if (prefix == null || equalsWithNull(prefix, "")) + fullName = resolveLocalName(node); + /* Otherwise we return the full prefix:localName string */ + else + fullName = prefix + ":" + resolveLocalName(node); + + return fullName; + } + + /** + * Returns one of the string constants names for the type of the given node + * type. throws IOException if type is unknown. + * + * @throws IOException + */ + private String getPropertyName(final Node node, + final XmlNamespaceManager manager) throws IOException { + switch (node.getNodeType()) { + case Node.ATTRIBUTE_NODE: + if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) + return "$" + resolveLocalName(node); + else + return "@" + resolveFullName(node, manager); + case Node.CDATA_SECTION_NODE: + return cDataNodeTag; + case Node.COMMENT_NODE: + return commentNodeTag; + case Node.ELEMENT_NODE: + return resolveFullName(node, manager); + case Node.PROCESSING_INSTRUCTION_NODE: + return "?" + resolveFullName(node, manager); + // XXX: The .NET System.Xml.XmlNodeType and org.w3c.dom.Node + // enumerations are not mapped 1:1 + // case Node.XmlDeclaration: + // return DeclarationName; + // case Node.SignificantWhitespace: + // return SignificantWhitespaceName; + case Node.TEXT_NODE: + return textNodeTag; + // case Node.Whitespace: + // return WhitespaceName; + default: + throw new IOException("Unexpected Node when getting node name: " + + node.getNodeType()); } - - /** - * Returns true if this node has the property json:Array from jsonNamespaceUri set to 'true', - * false otherwise - */ - private boolean isArray(final Node node){ - final NamedNodeMap attributes = node.getAttributes(); - - if(attributes == null || attributes.getLength() == 0) - return false; - else { - /* Return true the attribute json:Array from the jsonNamespaceUri is 'true': */ - for(int i=0; i - * If the node has no children, an empty map is returned. - * @throws IOException - */ - private Map> getNodesGroupedByName(final Node root, final XmlNamespaceManager manager) throws IOException{ - - final Map> nodesGroupedByName = new HashMap>(); - - final NodeList children = root.getChildNodes(); - - for (int i = 0; i < children.getLength(); i++){ - /* Get the i-th child*/ - final Node child = children.item(i); - - /* Get the name of the current child */ - String nodeName=getPropertyName(child, manager); - - /* If the node list is not instantiated for this nodeName, make an instance */ - if(nodesGroupedByName.get(nodeName) == null) - nodesGroupedByName.put(nodeName, new ArrayList()); - - /* Add the node to the list for this nodeName*/ - nodesGroupedByName.get(nodeName).add(child); - } - - return nodesGroupedByName; + + return false; + } + + /** + * For a given root node returns a map grouping all it's children by node + * name; Map If the node has no children, + * an empty map is returned. + * + * @throws IOException + */ + private Map> getNodesGroupedByName(final Node root, + final XmlNamespaceManager manager) throws IOException { + + final Map> nodesGroupedByName = new HashMap>(); + + final NodeList children = root.getChildNodes(); + + for (int i = 0; i < children.getLength(); i++) { + /* Get the i-th child */ + final Node child = children.item(i); + + /* Get the name of the current child */ + String nodeName = getPropertyName(child, manager); + + /* + * If the node list is not instantiated for this nodeName, make an + * instance + */ + if (nodesGroupedByName.get(nodeName) == null) + nodesGroupedByName.put(nodeName, new ArrayList()); + + /* Add the node to the list for this nodeName */ + nodesGroupedByName.get(nodeName).add(child); } - - private void serializeArray(final JsonWriter writer, final String nameOfTheElements, final List nodes, final XmlNamespaceManager manager, boolean writePropertyName) throws IOException{ - - if (writePropertyName){ - writePropertyNameAndColon(writer, nameOfTheElements); - } - - writeOpenArrayWithComma(writer); - - for (int i = 0; i < nodes.size(); i++) - { - serializeNode(writer, nodes.get(i), manager, false); - } - - writeCloseArrayWithComma(writer); - } - - /** - * True if all children's local name is equal to node's local name. - */ - private boolean allChildrenHaveSameLocalName(final Node node){ - - final NodeList children = node.getChildNodes(); - - for(int i=0; i nodes, + final XmlNamespaceManager manager, boolean writePropertyName) + throws IOException { + + if (writePropertyName) { + writePropertyNameAndColon(writer, nameOfTheElements); } - - @Deprecated - ///XXX: incomplete, does not add a comma after closing tag - private void writeXmlDeclaration(final JsonWriter writer, final Document document, final XmlNamespaceManager manager) throws IOException{ - /* Deserializirat deklaraciju, iako ovo zvuči krivo staviti ovdje */ - writePropertyNameAndColon(writer,declarationNodeTag); - writeOpenObjectWithComma(writer); - if(document.getXmlVersion()!=null){ - writePropertyNameAndColon(writer,"@version"); - writePropertyValue(writer,document.getXmlVersion()); - } - writer.writeComma(); - if(document.getXmlVersion()!=null){ - writePropertyNameAndColon(writer,"@encoding"); - writePropertyValue(writer,document.getXmlEncoding()); - } - writer.writeComma(); - if(document.getXmlVersion()!=null){ - writePropertyNameAndColon(writer,"@standalone"); - writePropertyValue(writer,document.getXmlStandalone()?"yes":"no"); - } - writeCloseObjectWithComma(writer); + + writeOpenArrayWithComma(writer); + + for (int i = 0; i < nodes.size(); i++) { + serializeNode(writer, nodes.get(i), manager, false); } - - private void serializeNode(final JsonWriter writer, final Node node, final XmlNamespaceManager manager, final boolean writePropertyName) throws IOException{ - switch(node.getNodeType()){ - case Node.DOCUMENT_NODE: - case Node.DOCUMENT_FRAGMENT_NODE: - serializeGroupedNodes(writer, node, manager, writePropertyName); - break; - case Node.ELEMENT_NODE: - if(node.hasChildNodes() && isArray(node) && allChildrenHaveSameLocalName(node)) - serializeGroupedNodes(writer, node, manager, false); - else{ - - /* Add a new namespace scope and look for namespace attributes to add */ - manager.pushScope(); - - final NamedNodeMap attributes = node.getAttributes(); - for(int i=0; i < attributes.getLength(); i++){ - - final Attr attribute = (Attr) attributes.item(i); - - if(equalsWithNull(attribute.getNamespaceURI(),xmlnsURL)){ - - if(equalsWithNull(resolveLocalName(attribute),xmlnsPrefix)) - manager.addNamespace("", attribute.getValue()); - else - manager.addNamespace(resolveLocalName(attribute), attribute.getValue()); - - } - } - - if(writePropertyName){ - writePropertyNameAndColon(writer, getPropertyName(node, manager)); - } - - if(hasSingleTextChild(node)) - writePropertyValue(writer,node.getChildNodes().item(0).getNodeValue()); - else if(nodeIsEmpty(node)){ - writer.writeNull(); - } - else{ - writeOpenObjectWithComma(writer); - - /* First serialize the attributes */ - - for(int i=0; i> nodesGroupedByName = getNodesGroupedByName(node, manager); - - /* Loop through grouped nodes. write single name instances as normal, write multiple names together in an array */ - for(Map.Entry> nameNodesMapping : nodesGroupedByName.entrySet()){ - - final String name=nameNodesMapping.getKey(); - final List nodesHavingName=nameNodesMapping.getValue(); - - /* By default we don't write nodes as arrays */ - boolean writeAsArray=false; - - /* All groups of nodes are written as arrays, while single nodes are written as an array only if they have the Array attribute set */ - if(nodesHavingName.size() == 1) - writeAsArray = isArray(nodesHavingName.get(0)); - else - writeAsArray = true; - - if(!writeAsArray) - serializeNode(writer,nodesHavingName.get(0),manager, writePropertyName); + writeCloseObjectWithComma(writer); + } + + private void serializeNode(final JsonWriter writer, final Node node, + final XmlNamespaceManager manager, final boolean writePropertyName) + throws IOException { + switch (node.getNodeType()) { + case Node.DOCUMENT_NODE: + case Node.DOCUMENT_FRAGMENT_NODE: + serializeGroupedNodes(writer, node, manager, writePropertyName); + break; + case Node.ELEMENT_NODE: + if (node.hasChildNodes() && isArray(node) + && allChildrenHaveSameLocalName(node)) + serializeGroupedNodes(writer, node, manager, false); + else { + + /* + * Add a new namespace scope and look for namespace attributes + * to add + */ + manager.pushScope(); + + final NamedNodeMap attributes = node.getAttributes(); + for (int i = 0; i < attributes.getLength(); i++) { + + final Attr attribute = (Attr) attributes.item(i); + + if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL)) { + + if (equalsWithNull(resolveLocalName(attribute), + xmlnsPrefix)) + manager.addNamespace("", attribute.getValue()); else - serializeArray(writer, name, nodesHavingName,manager, writePropertyName); - + manager.addNamespace(resolveLocalName(attribute), + attribute.getValue()); + + } } - } - - private boolean equalsWithNull(Object lhs, Object rhs){ - if(lhs == null && rhs == null) - return true; - else if(lhs ==null || rhs == null) - return false; - else - return lhs.equals(rhs); - } - - private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException{ - if(needsComma){ - writer.writeComma(); - needsComma=false; + + if (writePropertyName) { + writePropertyNameAndColon(writer, + getPropertyName(node, manager)); } + + if (hasSingleTextChild(node)) + writePropertyValue(writer, node.getChildNodes().item(0) + .getNodeValue()); + else if (nodeIsEmpty(node)) { + writer.writeNull(); + } else { + writeOpenObjectWithComma(writer); + + /* First serialize the attributes */ + + for (int i = 0; i < node.getAttributes().getLength(); i++) + serializeNode(writer, node.getAttributes().item(i), + manager, true); + + /* Then serialize the nodes by groups */ + serializeGroupedNodes(writer, node, manager, true); + + writeCloseObjectWithComma(writer); + } + + manager.popScope(); + } + break; + case Node.COMMENT_NODE: // Different than in Json.NET, since there + // comments are serialized as JavaScript + // comments '/*...*/' + case Node.ATTRIBUTE_NODE: + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + if (equalsWithNull(node.getNamespaceURI(), xmlnsURL) + && equalsWithNull(node.getNodeValue(), jsonNamespaceUri)) + return; + + if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) { + if (equalsWithNull(resolveLocalName(node), jsonArrayAttribute)) + return; + } + + if (writePropertyName) { + writePropertyNameAndColon(writer, + getPropertyName(node, manager)); + } + writePropertyValue(writer, node.getNodeValue()); + + break; + // Not covered by org.w2c.dom specs: + // case XmlNodeType.Whitespace: <-- handled by TEXT_NODE + // case XmlNodeType.SignificantWhitespace: <-- handled by TEXT_NODE + // XmlDeclaration is skipped, since we are converting only xml nodes, + // never entire documents + default: + throw new IOException( + "Unexpected XmlNodeType when serializing nodes: " + + node.getNodeType()); } - - private void writePropertyNameAndColon(JsonWriter writer, String propertyName) throws IOException{ - writeStringWithComma(writer, propertyName); - writer.writeColon(); - } - - private void writePropertyValue(JsonWriter writer, String propertyValue) throws IOException{ - writer.writeString(propertyValue); - needsComma=true; - } - - private void writeStringWithComma(JsonWriter writer, String text) throws IOException{ - writeCommaIfNeedsComma(writer); - writer.writeString(text); - } - - private void writeOpenObjectWithComma(JsonWriter writer) throws IOException{ - writeCommaIfNeedsComma(writer); - writer.writeOpenObject(); - } - - private void writeOpenArrayWithComma(JsonWriter writer) throws IOException{ - writeCommaIfNeedsComma(writer); - writer.writeOpenArray(); + + } + + private boolean hasSingleTextChild(final Node node) { + return hasNoValueAttributes(node) + && node.getChildNodes().getLength() == 1 + && node.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE; + } + + private boolean hasNoValueAttributes(final Node node) { + + final NamedNodeMap attributes = node.getAttributes(); + + for (int i = 0; i < attributes.getLength(); i++) { + final Attr attr = (Attr) attributes.item(i); + + if (attr.getNamespaceURI() != jsonNamespaceUri) + return false; } - - private void writeCloseObjectWithComma(JsonWriter writer) throws IOException{ - needsComma=true; - writer.writeCloseObject(); + + return true; + } + + private boolean nodeIsEmpty(final Node node) { + return (!node.hasChildNodes()) && (!node.hasAttributes()); + } + + private void serializeGroupedNodes(final JsonWriter writer, + final Node node, final XmlNamespaceManager manager, + final boolean writePropertyName) throws IOException { + + final Map> nodesGroupedByName = getNodesGroupedByName( + node, manager); + + /* + * Loop through grouped nodes. write single name instances as normal, + * write multiple names together in an array + */ + for (Map.Entry> nameNodesMapping : nodesGroupedByName + .entrySet()) { + + final String name = nameNodesMapping.getKey(); + final List nodesHavingName = nameNodesMapping.getValue(); + + /* By default we don't write nodes as arrays */ + boolean writeAsArray = false; + + /* + * All groups of nodes are written as arrays, while single nodes are + * written as an array only if they have the Array attribute set + */ + if (nodesHavingName.size() == 1) + writeAsArray = isArray(nodesHavingName.get(0)); + else + writeAsArray = true; + + if (!writeAsArray) + serializeNode(writer, nodesHavingName.get(0), manager, + writePropertyName); + else + serializeArray(writer, name, nodesHavingName, manager, + writePropertyName); + } - - private void writeCloseArrayWithComma(JsonWriter writer) throws IOException{ - needsComma=true; - writer.writeCloseArray(); + } + + private boolean equalsWithNull(Object lhs, Object rhs) { + if (lhs == null && rhs == null) + return true; + else if (lhs == null || rhs == null) + return false; + else + return lhs.equals(rhs); + } + + private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException { + if (needsComma) { + writer.writeComma(); + needsComma = false; } + } + + private void writePropertyNameAndColon(JsonWriter writer, + String propertyName) throws IOException { + writeStringWithComma(writer, propertyName); + writer.writeColon(); + } + + private void writePropertyValue(JsonWriter writer, String propertyValue) + throws IOException { + writer.writeString(propertyValue); + needsComma = true; + } + + private void writeStringWithComma(JsonWriter writer, String text) + throws IOException { + writeCommaIfNeedsComma(writer); + writer.writeString(text); + } + + private void writeOpenObjectWithComma(JsonWriter writer) throws IOException { + writeCommaIfNeedsComma(writer); + writer.writeOpenObject(); + } + + private void writeOpenArrayWithComma(JsonWriter writer) throws IOException { + writeCommaIfNeedsComma(writer); + writer.writeOpenArray(); + } + + private void writeCloseObjectWithComma(JsonWriter writer) + throws IOException { + needsComma = true; + writer.writeCloseObject(); + } + + private void writeCloseArrayWithComma(JsonWriter writer) throws IOException { + needsComma = true; + writer.writeCloseArray(); + } } From 260a0ca5f865a2f2e778198a3cbb32f2b45d2edd Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 12:51:00 +0100 Subject: [PATCH 11/30] Updates to tests --- json/src/test/java/io/jvm/json/Helpers.java | 4 ++ .../io/jvm/json/Json2XmlRoundTripTest.java | 52 +++++++++---------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/json/src/test/java/io/jvm/json/Helpers.java b/json/src/test/java/io/jvm/json/Helpers.java index de48e97..73fd954 100644 --- a/json/src/test/java/io/jvm/json/Helpers.java +++ b/json/src/test/java/io/jvm/json/Helpers.java @@ -70,6 +70,10 @@ public static void printDocumentTree(Node el){ printDocumentTree(el.getChildNodes().item(i)); } + public static void printXmlDocument(Document doc){ + System.out.println(xmlDocumentToString(doc)); + } + public static String xmlDocumentToString(Document doc) { try diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index 7ee940a..c2b7950 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -1,6 +1,7 @@ package io.jvm.json; import static org.junit.Assert.*; + import io.jvm.json.deserializers.XmlJsonDeserializer; import io.jvm.json.serializers.XmlJsonSerializer; import io.jvm.xml.XmlBruteForceComparator; @@ -27,29 +28,30 @@ public class Json2XmlRoundTripTest { @Test - public void assertRoundTripEquivalenceWithReferenceConversion() - throws URISyntaxException, JSONException, SAXException, - IOException, ParserConfigurationException, - TransformerConfigurationException, TransformerException, - TransformerFactoryConfigurationError { + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, + TransformerException, TransformerFactoryConfigurationError { final File jsonSources_dir = getFileForResource("/roundtripTests/json/source/"); - for (final File jsonSourceFile : jsonSources_dir.listFiles()) { + for (final File jsonSourceFile : jsonSources_dir.listFiles()) { if (jsonSourceFile.isFile()) { System.out.println("Testiramo za datoteku: " + jsonSourceFile.getName()); - + /* Filename initialisation */ final String sourceFilename_json = jsonSourceFile.getName(); final String convertedFilename_xml = sourceFilename_json + ".xml"; - final String roundtripFilename_json = sourceFilename_json - + ".xml.json"; + final String roundtripFilename_json = sourceFilename_json + ".xml.json"; - final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" + convertedFilename_xml); - assertTrue("The reference JSON file does not exist for: "+ sourceFilename_json, (referenceFile_xml != null && referenceFile_xml.exists())); + final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" + + convertedFilename_xml); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_json, + (referenceFile_xml != null && referenceFile_xml.exists())); - final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" + roundtripFilename_json); - assertTrue("The reference XML->JSON roundtrip file does not exist for: "+ sourceFilename_json,(referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); + final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" + + roundtripFilename_json); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_json, + (referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); /* Parse input files */ final String source_json = stringFromFile(jsonSourceFile); @@ -57,8 +59,8 @@ public void assertRoundTripEquivalenceWithReferenceConversion() final String referenceRoundTrip_json = stringFromFile(referenceRoundtripFile_json); /* Convert to XML and compare with reference conversion */ - final Document convertedXml = xmlDocumentFromJson(source_json); - assertXmlEquivalence("The converted XML does not match the reference XML",convertedXml, referenceXml); + final Document convertedXml = xmlDocumentFromJson(source_json); + assertXmlEquivalence("The converted XML does not match the reference XML", convertedXml, referenceXml); /* Convert back to Json, and compare with reference documents */ final String roundtripJsonString = jsonStringFromXml(convertedXml); @@ -76,28 +78,24 @@ private static Document xmlDocumentFromJson(String json) throws IOException { return new XmlJsonDeserializer().fromJson(jr); } - private static String jsonStringFromXml(final Document source_xml) - throws IOException { + private static String jsonStringFromXml(final Document source_xml) throws IOException { final StringWriter sw = new StringWriter(); - new XmlJsonSerializer().toJson(new JsonWriter(sw), - source_xml.getDocumentElement()); + new XmlJsonSerializer().toJson(new JsonWriter(sw), source_xml.getDocumentElement()); return sw.toString(); } - private static void assertJsonEquivalence(String lhs, String rhs) - throws JSONException { + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { JSONAssert.assertEquals(lhs, rhs, false); } - private static void assertXmlEquivalence(String message, Document lhs, - Document rhs) { + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { XmlBruteForceComparator comparator = new XmlBruteForceComparator(); - assertTrue( - message, - comparator.compare(lhs.getDocumentElement(), - rhs.getDocumentElement()) == 0); +// printXmlDocument(lhs); +// printXmlDocument(rhs); + + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); } } From 2d3424c965fb638676b351a189e7a3e6a38e6c37 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 16:31:52 +0100 Subject: [PATCH 12/30] Not so brute force no more --- .../io/jvm/xml/XmlBruteForceComparator.java | 183 +++++++++++------- 1 file changed, 110 insertions(+), 73 deletions(-) diff --git a/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java index 4bc7177..69026ee 100644 --- a/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java +++ b/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java @@ -1,5 +1,7 @@ package io.jvm.xml; +import static java.lang.System.out; + import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -10,85 +12,123 @@ import org.w3c.dom.NodeList; /** - * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. - * The subtrees are considered equivalent if they contain the same nodes, - * having the same attributes and values. The order of elements is ignored. + * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. The + * subtrees are considered equivalent if they contain the same nodes, having the + * same attributes and values. The order of elements is irrelevant. + * + * For each of the two trees the compiler builds a list of paths root-to-leaf, + * and compares the two lists. + * + * Two nodes are considered equal if their names and values are equal, and they + * contain the same attributes. * - * The comparator builds a list of all paths from root to leaf and compares those paths. + * Two attributes are equal if their names and values are equal. */ public class XmlBruteForceComparator implements Comparator { - private List> xmlStrips_lhs = new ArrayList>(); - private List> xmlStrips_rhs = new ArrayList>(); + private List> xmlPaths_lhs = new ArrayList>(); + private List> xmlPaths_rhs = new ArrayList>(); @Override public int compare(Element lhs, Element rhs) { - buildStrip(xmlStrips_lhs, null, (Node) lhs); - buildStrip(xmlStrips_rhs, null, (Node) rhs); - - return compareAllPaths(xmlStrips_lhs, xmlStrips_rhs); + buildPaths(xmlPaths_lhs, null, (Node) lhs); + buildPaths(xmlPaths_rhs, null, (Node) rhs); + + return compareAllPaths(xmlPaths_lhs, xmlPaths_rhs); } /** * Recursively builds a list of all path from root to leaf - * @param allPaths The list containing all paths for the current tree - * @param currentPath The current path being built; {@code null} in the first step - * @param node The current node on the path; root in the first step, a leaf in the last step + * + * @param allPaths + * The list containing all paths for the current tree + * @param pathUpToNode + * The current path being built; {@code null} in the first step + * @param node + * The current node on the path; root in the first step, a leaf + * in the last step */ - private void buildStrip(List> allPaths, List currentPath, Node node) { - if (currentPath == null) - currentPath = new ArrayList(); - - currentPath.add(node); + private void buildPaths(List> allPaths, List pathUpToNode, Node node) { + if (pathUpToNode == null) + pathUpToNode = new ArrayList(); + pathUpToNode.add(node); + if (node.hasChildNodes()) { - for(Node child : getListOfChildren(node)){ - buildStrip(allPaths,currentPath,child); + for (Node child : getListOfChildren(node)) { + buildPaths(allPaths, new ArrayList(pathUpToNode), child); } - } else { - allPaths.add(currentPath); + } else { + allPaths.add(new ArrayList(pathUpToNode)); + pathUpToNode.clear(); } } /** * Compares all root-to-leaf paths of the two XML trees. - * @param lhs The lhs XML tree paths - * @param rhs The rhs XML tree paths + * + * For each path in lhs list find an equivalent path in the rhs list, and + * remove it if it exists. + * + * If for every path in lhs a unique equivalent path in rhs is found, the + * trees are considered equal. + * + * @param lhs + * The lhs XML tree paths + * @param rhs + * The rhs XML tree paths * @return {@code 0} if they are equal {@code -1} otherwise */ private int compareAllPaths(List> lhs, List> rhs) { if (lhs.size() != rhs.size()) - return -1; - - for (List leftStrip : lhs) { + return -1; + + for (List leftPath : lhs) { boolean found = false; - for (List rightStrip : rhs) { - if (nodeListsEqual(leftStrip, rightStrip)) + for (List rightPath : rhs) { + if (nodeListsEqual(leftPath, rightPath)) { found = true; + rhs.remove(rightPath); + + break; + } } - if (!found) + if (!found){ + out.println(leftPath); return -1; + } } return 0; } - private boolean nodeListsEqual(List lhs, List rhs) { - + /** + * Compares two lists of nodes. + * + * The lists are considered equal if their nodes are equal. Since they + * represent paths in a tree, their ordering is relevant. + * + * @param lhs + * The lhs List + * @param rhs + * The rhs List + * @return true if the {@code lists} are equal, {@code false} otherwise + * @throws InterruptedException + */ + private boolean nodeListsEqual(List lhs, List rhs) { + if (lhs.size() != rhs.size()) - return false; + return false; - for (Node e1 : lhs) { - boolean found = false; - for (Node e2 : rhs) { - if (nodesEqual(e1, e2)) { - found = true; - break; - } - } - if (!found) + for (int i = 0; i < lhs.size(); i++) { + + Node node1 = lhs.get(i); + Node node2 = rhs.get(i); + + if (!nodesEqual(node1, node2)) { return false; + } } return true; @@ -104,13 +144,10 @@ else if (node1.hasAttributes() != node2.hasAttributes()) else if ((node1.getNodeValue() != null && node2.getNodeValue() != null) && !node1.getNodeValue().equals(node2.getNodeValue())) return false; - else if (node1.hasAttributes() - && node2.hasAttributes() - && (node1.getAttributes().getLength() != node2.getAttributes() - .getLength())) + else if (node1.hasAttributes() && node2.hasAttributes() + && (node1.getAttributes().getLength() != node2.getAttributes().getLength())) return false; - else if (node1.getChildNodes().getLength() != node2.getChildNodes() - .getLength()) + else if (node1.getChildNodes().getLength() != node2.getChildNodes().getLength()) return false; else if (!node1.getNodeName().equals(node2.getNodeName())) return false; @@ -128,51 +165,51 @@ else if (node1.hasAttributes() == false && node2.hasAttributes() == false) else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) return false; else { - - for(Attr attr1 : getListOfAttributes(node1)){ - boolean found=false; - for(Attr attr2 : getListOfAttributes(node2)){ - if(equalsWithNull(attr1.getName(), attr2.getName()) - && equalsWithNull(attr1.getValue(), attr2.getValue())){ + + for (Attr attr1 : getListOfAttributes(node1)) { + boolean found = false; + for (Attr attr2 : getListOfAttributes(node2)) { + if (equalsWithNull(attr1.getName(), attr2.getName()) + && equalsWithNull(attr1.getValue(), attr2.getValue())) { found = true; break; } } - if(!found) + if (!found) return false; - } + } } return true; } - - private List getListOfAttributes(Node node){ + + private List getListOfAttributes(Node node) { List aListOfAttributes = new ArrayList(); - - for(int i=0; i getListOfChildren(Node node){ + + private List getListOfChildren(Node node) { List nodes = new ArrayList(); - + NodeList nodeList = node.getChildNodes(); - - for(int i=0; i Date: Fri, 14 Mar 2014 16:32:13 +0100 Subject: [PATCH 13/30] Updates to the error msgs --- .../io/jvm/json/Json2XmlRoundTripTest.java | 4 --- .../io/jvm/json/Xml2JsonRoundTripTest.java | 30 ++----------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index c2b7950..8964bb2 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -91,10 +91,6 @@ private static void assertJsonEquivalence(String lhs, String rhs) throws JSONExc private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { XmlBruteForceComparator comparator = new XmlBruteForceComparator(); - -// printXmlDocument(lhs); -// printXmlDocument(rhs); - assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); } diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index ecdc61f..fd9e151 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -1,8 +1,7 @@ package io.jvm.json; -import static io.jvm.json.Helpers.getFileForResource; -import static io.jvm.json.Helpers.parseXmlFile; -import static io.jvm.json.Helpers.stringFromFile; +import static io.jvm.json.Helpers.*; + import static org.junit.Assert.assertTrue; import io.jvm.json.deserializers.XmlJsonDeserializer; import io.jvm.json.serializers.XmlJsonSerializer; @@ -93,32 +92,9 @@ private static void assertJsonEquivalence(String lhs, String rhs) throws JSONExc } private static void assertXmlEquivalence(String message, Document lhs, Document rhs){ - XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement())==0); } -// private static void assertXmlEquivalence(String message, Document lhs, Document rhs) -// { -// XMLUnit.setIgnoreAttributeOrder(true); -// XMLUnit.setIgnoreWhitespace(true); -//// XMLUnit.setNormalize(true); -// -// System.out.println("Roundtrip:"); -// System.out.println(xmlDocumentToString(lhs)); -// System.out.println("Source:"); -// System.out.println(xmlDocumentToString(rhs)); -// -// final Diff diff = new Diff(lhs, rhs); -// final DetailedDiff dd = new DetailedDiff(diff); -// -// StringBuffer msg = new StringBuffer(); -// diff.appendMessage(msg); -// -//// System.out.println(msg); -// -// //assertTrue(message, dd.similar()); -// assertTrue(message, diff.similar()); -// } - } \ No newline at end of file From 4c2ea8f65cc6a53890f4ae79dc232eb8612e3915 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 17:16:06 +0100 Subject: [PATCH 14/30] Moved to a more appropriate location --- .../io/jvm/xml/XmlBruteForceComparator.java | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java diff --git a/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java new file mode 100644 index 0000000..69026ee --- /dev/null +++ b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java @@ -0,0 +1,215 @@ +package io.jvm.xml; + +import static java.lang.System.out; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +import org.w3c.dom.Attr; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. The + * subtrees are considered equivalent if they contain the same nodes, having the + * same attributes and values. The order of elements is irrelevant. + * + * For each of the two trees the compiler builds a list of paths root-to-leaf, + * and compares the two lists. + * + * Two nodes are considered equal if their names and values are equal, and they + * contain the same attributes. + * + * Two attributes are equal if their names and values are equal. + */ +public class XmlBruteForceComparator implements Comparator { + + private List> xmlPaths_lhs = new ArrayList>(); + private List> xmlPaths_rhs = new ArrayList>(); + + @Override + public int compare(Element lhs, Element rhs) { + + buildPaths(xmlPaths_lhs, null, (Node) lhs); + buildPaths(xmlPaths_rhs, null, (Node) rhs); + + return compareAllPaths(xmlPaths_lhs, xmlPaths_rhs); + } + + /** + * Recursively builds a list of all path from root to leaf + * + * @param allPaths + * The list containing all paths for the current tree + * @param pathUpToNode + * The current path being built; {@code null} in the first step + * @param node + * The current node on the path; root in the first step, a leaf + * in the last step + */ + private void buildPaths(List> allPaths, List pathUpToNode, Node node) { + if (pathUpToNode == null) + pathUpToNode = new ArrayList(); + + pathUpToNode.add(node); + + if (node.hasChildNodes()) { + for (Node child : getListOfChildren(node)) { + buildPaths(allPaths, new ArrayList(pathUpToNode), child); + } + } else { + allPaths.add(new ArrayList(pathUpToNode)); + pathUpToNode.clear(); + } + } + + /** + * Compares all root-to-leaf paths of the two XML trees. + * + * For each path in lhs list find an equivalent path in the rhs list, and + * remove it if it exists. + * + * If for every path in lhs a unique equivalent path in rhs is found, the + * trees are considered equal. + * + * @param lhs + * The lhs XML tree paths + * @param rhs + * The rhs XML tree paths + * @return {@code 0} if they are equal {@code -1} otherwise + */ + private int compareAllPaths(List> lhs, List> rhs) { + if (lhs.size() != rhs.size()) + return -1; + + for (List leftPath : lhs) { + boolean found = false; + for (List rightPath : rhs) { + if (nodeListsEqual(leftPath, rightPath)) { + found = true; + rhs.remove(rightPath); + + break; + } + } + if (!found){ + out.println(leftPath); + return -1; + } + } + + return 0; + } + + /** + * Compares two lists of nodes. + * + * The lists are considered equal if their nodes are equal. Since they + * represent paths in a tree, their ordering is relevant. + * + * @param lhs + * The lhs List + * @param rhs + * The rhs List + * @return true if the {@code lists} are equal, {@code false} otherwise + * @throws InterruptedException + */ + private boolean nodeListsEqual(List lhs, List rhs) { + + if (lhs.size() != rhs.size()) + return false; + + for (int i = 0; i < lhs.size(); i++) { + + Node node1 = lhs.get(i); + Node node2 = rhs.get(i); + + if (!nodesEqual(node1, node2)) { + return false; + } + } + + return true; + } + + private boolean nodesEqual(Node node1, Node node2) { + if (node1 == null && node2 == null) + return true; + else if (node1.getNodeName() == null && node2.getNodeName() == null) + return true; + else if (node1.hasAttributes() != node2.hasAttributes()) + return false; + else if ((node1.getNodeValue() != null && node2.getNodeValue() != null) + && !node1.getNodeValue().equals(node2.getNodeValue())) + return false; + else if (node1.hasAttributes() && node2.hasAttributes() + && (node1.getAttributes().getLength() != node2.getAttributes().getLength())) + return false; + else if (node1.getChildNodes().getLength() != node2.getChildNodes().getLength()) + return false; + else if (!node1.getNodeName().equals(node2.getNodeName())) + return false; + else if (!nodesHaveEqualAttributes(node1, node2)) + return false; + + return true; + } + + private boolean nodesHaveEqualAttributes(Node node1, Node node2) { + if (node1.hasAttributes() != node2.hasAttributes()) + return false; + else if (node1.hasAttributes() == false && node2.hasAttributes() == false) + return true; + else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) + return false; + else { + + for (Attr attr1 : getListOfAttributes(node1)) { + boolean found = false; + for (Attr attr2 : getListOfAttributes(node2)) { + if (equalsWithNull(attr1.getName(), attr2.getName()) + && equalsWithNull(attr1.getValue(), attr2.getValue())) { + found = true; + break; + } + } + if (!found) + return false; + } + } + + return true; + } + + private List getListOfAttributes(Node node) { + List aListOfAttributes = new ArrayList(); + + for (int i = 0; i < node.getAttributes().getLength(); i++) + aListOfAttributes.add((Attr) node.getAttributes().item(i)); + + return aListOfAttributes; + } + + private List getListOfChildren(Node node) { + List nodes = new ArrayList(); + + NodeList nodeList = node.getChildNodes(); + + for (int i = 0; i < nodeList.getLength(); i++) + nodes.add(nodeList.item(i)); + + return nodes; + } + + private boolean equalsWithNull(Object o1, Object o2) { + if (o1 == null && o2 == null) + return true; + else if (o1 == null || o2 == null) + return false; + else + return o1.equals(o2); + } + +} From decf9fe054a538a46531c835d81c8b37e399fd3f Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 17:16:46 +0100 Subject: [PATCH 15/30] special type nodes' names added --- .../deserializers/XmlJsonDeserializer.java | 327 ++++++++++-------- 1 file changed, 174 insertions(+), 153 deletions(-) diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java index 06470bb..f2b2b03 100644 --- a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -11,131 +11,136 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; -public class XmlJsonDeserializer implements JsonDeserializer{ - - private static final Document[] ZERO_ARRAY = new Document[0]; - - /* Implementation */ - private final String textNodeTag = "#text"; - private final String commentNodeTag = "#comment"; - private final String cDataNodeTag = "#cdata-section"; - private final String whitespaceNodeTag = "#whitespace"; - private final String significantWhitespaceNodeTag = "#significant-whitespace"; - private final String declarationNodeTag = "?xml"; - private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; - private final String xmlnsPrefix = "xmlns"; - - private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; - private final String jsonArrayAttribute = "Array"; - - @Override - public Document[] getZeroArray() { - return ZERO_ARRAY; - } - - /** - * Constructs an {@link org.w3c.dom.Document} - * object using the given {@link io.jvm.json.JsonReader} - * @return The constructed {@link org.w3c.dom.Document} object - * @throws IOException - */ - @Override - public Document fromJson(final JsonReader reader) throws IOException { - - Document document; - - try{ - document = DocumentBuilderFactory - .newInstance() - .newDocumentBuilder() - .newDocument(); - - /* The document must have a single Json node */ - reader.assertReadToken('{'); - - /* The first element is the root node */ - String rootElementName = reader.readString(); - - Element root = document.createElement(rootElementName); - document.appendChild(root); - - reader.assertReadToken(':'); - - buildNodeValueSubtree(document, root, reader); - - reader.assertReadToken('}'); - reader.consumeWhitespaces(); - reader.assertEndOfStream(); - } - catch(ParserConfigurationException ex){ - document = null; // TODO: Handle the exception, this is just until we implement the deserializer - } - - return document; - } - - private boolean valueIsObject(JsonReader reader) throws IOException{ - return reader.readToken() == '{'; +public class XmlJsonDeserializer implements JsonDeserializer { + + private static final Document[] ZERO_ARRAY = new Document[0]; + + /* Implementation */ + /* Special tags */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; + + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; + + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; + + @Override + public Document[] getZeroArray() { + return ZERO_ARRAY; + } + + /** + * Constructs an {@link org.w3c.dom.Document} object using the given + * {@link io.jvm.json.JsonReader} + * + * @return The constructed {@link org.w3c.dom.Document} object + * @throws IOException + */ + @Override + public Document fromJson(final JsonReader reader) throws IOException { + + Document document; + + try { + document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + + /* The document must have a single Json node */ + reader.assertReadToken('{'); + + /* The first element is the root node */ + String rootElementName = reader.readString(); + + Element root = document.createElement(rootElementName); + document.appendChild(root); + + reader.assertReadToken(':'); + + buildNodeValueSubtree(document, root, reader); + + reader.assertReadToken('}'); + reader.consumeWhitespaces(); + reader.assertEndOfStream(); + } catch (ParserConfigurationException ex) { + document = null; // TODO: Handle the exception, this is just until + // we implement the deserializer } - - private boolean valueIsArray(JsonReader reader) throws IOException{ - return reader.readToken() == '['; + + return document; + } + + private boolean valueIsObject(JsonReader reader) throws IOException { + return reader.readToken() == '{'; + } + + private boolean valueIsArray(JsonReader reader) throws IOException { + return reader.readToken() == '['; + } + + private void buildTextValue(Document document, Element node, JsonReader reader) throws IOException { + switch (reader.readToken()) { + case '"': + /* String */ + node.appendChild(document.createTextNode(reader.readString())); + break; + case 't': + /* true */ + node.setNodeValue(new Boolean(reader.readTrue()).toString()); + break; + case 'f': + /* false */ + node.setNodeValue(new Boolean(reader.readFalse()).toString()); + break; + case 'n': + /* null */ + reader.readNull(); + node.setNodeValue(null); + break; + default: + /* Number or invalid */ + node.setNodeValue(reader.readRawNumber(new StringBuilder()).toString()); + break; } - - private void buildTextValue(Document document, Element node, JsonReader reader) throws IOException{ - switch(reader.readToken()){ - case '"': - /* String */ - node.appendChild(document.createTextNode(reader.readString())); - break; - case 't': - /* true */ - node.setNodeValue(new Boolean(reader.readTrue()).toString()); - break; - case 'f': - /* false */ - node.setNodeValue(new Boolean(reader.readFalse()).toString()); - break; - case 'n': - /* null */ - reader.readNull(); - node.setNodeValue(null); - break; - default: - /* Number or invalid */ - node.setNodeValue(reader.readRawNumber(new StringBuilder()).toString()); - break; - } - } - - /** - * Recursively builds an XML Element node's subtree from the content of the given JsonReader. - * The node needs to exist, and the JsonReader needs to be positioned at the Json element's value. - */ - private void buildNodeValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ - if(valueIsObject(reader)){ - buildObjectValueSubtree(document,parent,reader); - } - else if(valueIsArray(reader)){ - String arrayNodesName=parent.getNodeName(); - Element grandParent = (Element)parent.getParentNode(); - grandParent.removeChild(parent); - buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); - } - else{ - /* Otherwise the value is string/true/false/null/number or invalid*/ - // Note: JSON converted from XML should never have non-string true/false/null - buildTextValue(document, parent,reader); - } + } + + /** + * Recursively builds an XML Element node's subtree from the content of the + * given JsonReader. The node needs to exist, and the JsonReader needs to be + * positioned at the Json element's value. + */ + private void buildNodeValueSubtree(Document document, Element parent, JsonReader reader) throws IOException { + if (valueIsObject(reader)) { + buildObjectValueSubtree(document, parent, reader); + } else if (valueIsArray(reader)) { + String arrayNodesName = parent.getNodeName(); + Element grandParent = (Element) parent.getParentNode(); + grandParent.removeChild(parent); + buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); + } else { + /* Otherwise the value is string/true/false/null/number or invalid */ + // Note: JSON converted from XML should never have non-string + // true/false/null + buildTextValue(document, parent, reader); } - - /** - * Builds an XML subtree from a JSON object element - * @param document the {@link Document} this tree belongs too - * @param parent the parent {@link Element} node of the subtree - * @param reader the {@link JsonReader} we are currently using to read the Json stream - */ - private void buildObjectValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ + } + + /** + * Builds an XML subtree from a JSON object element + * + * @param document + * the {@link Document} this tree belongs too + * @param parent + * the parent {@link Element} node of the subtree + * @param reader + * the {@link JsonReader} we are currently using to read the Json + * stream + */ + private void buildObjectValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ reader.assertReadToken('{'); boolean needsComma=false; @@ -166,8 +171,22 @@ else if(childNodeName.equals(cDataNodeTag)){ else if(childNodeName.equals(textNodeTag)){ String textNodeData = reader.readString(); parent.appendChild(document.createTextNode(textNodeData)); - } + } + else if(childNodeName.equals(whitespaceNodeTag) || childNodeName.equals(significantWhitespaceNodeTag)){ + // Ignore + } + else{ + /* All other nodes whose name starts with a '#' are just serialised as text nodes, and otherwise ignored: */ + String unlikelyNodeData = reader.readString(); + parent.appendChild(document.createTextNode(unlikelyNodeData)); + } + } + /* If it's a processing instruction */ + else if(childNodeName.startsWith("?")){ + String processingNodeData = reader.readString(); + parent.appendChild(document.createProcessingInstruction(childNodeName.substring(1), processingNodeData)); + } /* If it's a normal node */ else{ Element childElement = document.createElement(childNodeName); @@ -179,35 +198,37 @@ else if(childNodeName.equals(textNodeTag)){ } reader.assertReadToken('}'); } - - /** - * Builds a sequence of XML elements from a Json array. The first element of the sequence must - * exist before calling this method - * - * E.g. {@code "array":["1","2","3"]} translates to {@code 123} - * - * @param document - * @param parent - * @param reader - * @throws IOException - */ - private void buildArrayValueSubtree(Document document, Element parent, String arrayNodesName, JsonReader reader) throws IOException{ - reader.assertReadToken('['); - - boolean needsComma = false; - while(reader.readToken()!=']'){ - if(needsComma){ - reader.assertLastToken(','); - reader.next(); - } - - Element childNode = document.createElement(arrayNodesName); - parent.appendChild(childNode); - buildNodeValueSubtree(document, childNode, reader); - - needsComma=true; - } - - reader.assertReadToken(']'); + + /** + * Builds a sequence of XML elements from a Json array. The first element of + * the sequence must exist before calling this method + * + * E.g. {@code "array":["1","2","3"]} translates to + * {@code 123} + * + * @param document + * @param parent + * @param reader + * @throws IOException + */ + private void buildArrayValueSubtree(Document document, Element parent, String arrayNodesName, JsonReader reader) + throws IOException { + reader.assertReadToken('['); + + boolean needsComma = false; + while (reader.readToken() != ']') { + if (needsComma) { + reader.assertLastToken(','); + reader.next(); + } + + Element childNode = document.createElement(arrayNodesName); + parent.appendChild(childNode); + buildNodeValueSubtree(document, childNode, reader); + + needsComma = true; } + + reader.assertReadToken(']'); + } } From b0b10b0e72ae795f5ba1d2824b1bbf66eeceecbd Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 14 Mar 2014 17:17:26 +0100 Subject: [PATCH 16/30] Modified test cases and updated tests --- .../io/jvm/json/Json2XmlRoundTripTest.java | 7 +- .../io/jvm/json/Xml2JsonRoundTripTest.java | 14 +- .../io/jvm/xml/XmlBruteForceComparator.java | 215 ------------------ .../json/reference/boox.xml.json.xml | 4 +- .../json/reference/boox.xml.json.xml.json | 2 +- .../roundtripTests/json/source/boox.xml.json | 2 +- .../xml/reference/boox.xml.json | 2 +- .../xml/reference/boox.xml.json.xml | 4 +- .../roundtripTests/xml/source/boox.xml | 1 + 9 files changed, 27 insertions(+), 224 deletions(-) delete mode 100644 json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index 8964bb2..396ea56 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -60,6 +60,10 @@ public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntax /* Convert to XML and compare with reference conversion */ final Document convertedXml = xmlDocumentFromJson(source_json); +// System.out.println("Converted XML:"); +// printXmlDocument(convertedXml); +// System.out.println("Reference XML:"); +// printXmlDocument(referenceXml); assertXmlEquivalence("The converted XML does not match the reference XML", convertedXml, referenceXml); /* Convert back to Json, and compare with reference documents */ @@ -90,7 +94,8 @@ private static void assertJsonEquivalence(String lhs, String rhs) throws JSONExc } private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { - XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); } diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index fd9e151..1f1f380 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -1,7 +1,6 @@ package io.jvm.json; import static io.jvm.json.Helpers.*; - import static org.junit.Assert.assertTrue; import io.jvm.json.deserializers.XmlJsonDeserializer; import io.jvm.json.serializers.XmlJsonSerializer; @@ -59,12 +58,23 @@ public void assertRoundTripEquivalenceWithReferenceConversion() final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); /* Convert to json and compare with reference conversion */ - final String convertedJson = jsonStringFromXml(source_xml); + final String convertedJson = jsonStringFromXml(source_xml); + +// System.out.println("Converted JSON:"); +// System.out.println(convertedJson); +// System.out.println("Reference JSON:"); +// System.out.println(referenceJson); + assertJsonEquivalence(convertedJson, referenceJson); /* Convert back to XML, and compare with reference documents */ final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); + System.out.println("Our roundtrip XML:"); + printXmlDocument(roundtripXmlDocument); + System.out.println("Reference roundtrip xml:"); + printXmlDocument(referenceRoundTrip_xml); + assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); assertXmlEquivalence("The reference roundtrip XML does not match the source XML",referenceRoundTrip_xml, source_xml); diff --git a/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java deleted file mode 100644 index 69026ee..0000000 --- a/json/src/test/java/io/jvm/xml/XmlBruteForceComparator.java +++ /dev/null @@ -1,215 +0,0 @@ -package io.jvm.xml; - -import static java.lang.System.out; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; - -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. The - * subtrees are considered equivalent if they contain the same nodes, having the - * same attributes and values. The order of elements is irrelevant. - * - * For each of the two trees the compiler builds a list of paths root-to-leaf, - * and compares the two lists. - * - * Two nodes are considered equal if their names and values are equal, and they - * contain the same attributes. - * - * Two attributes are equal if their names and values are equal. - */ -public class XmlBruteForceComparator implements Comparator { - - private List> xmlPaths_lhs = new ArrayList>(); - private List> xmlPaths_rhs = new ArrayList>(); - - @Override - public int compare(Element lhs, Element rhs) { - - buildPaths(xmlPaths_lhs, null, (Node) lhs); - buildPaths(xmlPaths_rhs, null, (Node) rhs); - - return compareAllPaths(xmlPaths_lhs, xmlPaths_rhs); - } - - /** - * Recursively builds a list of all path from root to leaf - * - * @param allPaths - * The list containing all paths for the current tree - * @param pathUpToNode - * The current path being built; {@code null} in the first step - * @param node - * The current node on the path; root in the first step, a leaf - * in the last step - */ - private void buildPaths(List> allPaths, List pathUpToNode, Node node) { - if (pathUpToNode == null) - pathUpToNode = new ArrayList(); - - pathUpToNode.add(node); - - if (node.hasChildNodes()) { - for (Node child : getListOfChildren(node)) { - buildPaths(allPaths, new ArrayList(pathUpToNode), child); - } - } else { - allPaths.add(new ArrayList(pathUpToNode)); - pathUpToNode.clear(); - } - } - - /** - * Compares all root-to-leaf paths of the two XML trees. - * - * For each path in lhs list find an equivalent path in the rhs list, and - * remove it if it exists. - * - * If for every path in lhs a unique equivalent path in rhs is found, the - * trees are considered equal. - * - * @param lhs - * The lhs XML tree paths - * @param rhs - * The rhs XML tree paths - * @return {@code 0} if they are equal {@code -1} otherwise - */ - private int compareAllPaths(List> lhs, List> rhs) { - if (lhs.size() != rhs.size()) - return -1; - - for (List leftPath : lhs) { - boolean found = false; - for (List rightPath : rhs) { - if (nodeListsEqual(leftPath, rightPath)) { - found = true; - rhs.remove(rightPath); - - break; - } - } - if (!found){ - out.println(leftPath); - return -1; - } - } - - return 0; - } - - /** - * Compares two lists of nodes. - * - * The lists are considered equal if their nodes are equal. Since they - * represent paths in a tree, their ordering is relevant. - * - * @param lhs - * The lhs List - * @param rhs - * The rhs List - * @return true if the {@code lists} are equal, {@code false} otherwise - * @throws InterruptedException - */ - private boolean nodeListsEqual(List lhs, List rhs) { - - if (lhs.size() != rhs.size()) - return false; - - for (int i = 0; i < lhs.size(); i++) { - - Node node1 = lhs.get(i); - Node node2 = rhs.get(i); - - if (!nodesEqual(node1, node2)) { - return false; - } - } - - return true; - } - - private boolean nodesEqual(Node node1, Node node2) { - if (node1 == null && node2 == null) - return true; - else if (node1.getNodeName() == null && node2.getNodeName() == null) - return true; - else if (node1.hasAttributes() != node2.hasAttributes()) - return false; - else if ((node1.getNodeValue() != null && node2.getNodeValue() != null) - && !node1.getNodeValue().equals(node2.getNodeValue())) - return false; - else if (node1.hasAttributes() && node2.hasAttributes() - && (node1.getAttributes().getLength() != node2.getAttributes().getLength())) - return false; - else if (node1.getChildNodes().getLength() != node2.getChildNodes().getLength()) - return false; - else if (!node1.getNodeName().equals(node2.getNodeName())) - return false; - else if (!nodesHaveEqualAttributes(node1, node2)) - return false; - - return true; - } - - private boolean nodesHaveEqualAttributes(Node node1, Node node2) { - if (node1.hasAttributes() != node2.hasAttributes()) - return false; - else if (node1.hasAttributes() == false && node2.hasAttributes() == false) - return true; - else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) - return false; - else { - - for (Attr attr1 : getListOfAttributes(node1)) { - boolean found = false; - for (Attr attr2 : getListOfAttributes(node2)) { - if (equalsWithNull(attr1.getName(), attr2.getName()) - && equalsWithNull(attr1.getValue(), attr2.getValue())) { - found = true; - break; - } - } - if (!found) - return false; - } - } - - return true; - } - - private List getListOfAttributes(Node node) { - List aListOfAttributes = new ArrayList(); - - for (int i = 0; i < node.getAttributes().getLength(); i++) - aListOfAttributes.add((Attr) node.getAttributes().item(i)); - - return aListOfAttributes; - } - - private List getListOfChildren(Node node) { - List nodes = new ArrayList(); - - NodeList nodeList = node.getChildNodes(); - - for (int i = 0; i < nodeList.getLength(); i++) - nodes.add(nodeList.item(i)); - - return nodes; - } - - private boolean equalsWithNull(Object o1, Object o2) { - if (o1 == null && o2 == null) - return true; - else if (o1 == null || o2 == null) - return false; - else - return o1.equals(o2); - } - -} diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml index ce1c998..677b81b 100644 --- a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml +++ b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml @@ -1,7 +1,7 @@ -Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications +A sample text node for testing conversionsGambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen - of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + of the world.Corets, EvaMaeve Ascendantanother sample text nodeFantasy5.952000-11-17After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json index 20fe148..420840e 100644 --- a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json +++ b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json @@ -1 +1 @@ -{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file +{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/boox.xml.json b/json/src/test/resources/roundtripTests/json/source/boox.xml.json index 20fe148..bd104b5 100644 --- a/json/src/test/resources/roundtripTests/json/source/boox.xml.json +++ b/json/src/test/resources/roundtripTests/json/source/boox.xml.json @@ -1 +1 @@ -{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file +{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json index 20fe148..731e878 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json @@ -1 +1 @@ -{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file +{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}],"#text":"\n\tpetar petru plete petlju\n "}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml index ce1c998..94d2b2e 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml @@ -19,4 +19,6 @@ SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development - environment. \ No newline at end of file + environment. + petar petru plete petlju + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/boox.xml b/json/src/test/resources/roundtripTests/xml/source/boox.xml index 0ed0a15..bb13a3d 100644 --- a/json/src/test/resources/roundtripTests/xml/source/boox.xml +++ b/json/src/test/resources/roundtripTests/xml/source/boox.xml @@ -18,6 +18,7 @@ an evil sorceress, and her own childhood to become queen of the world. + petar petru plete petlju Corets, Eva Maeve Ascendant From 7362d5b04e6dcfadead04d5ba9457390464e8884 Mon Sep 17 00:00:00 2001 From: hperadin Date: Mon, 17 Mar 2014 09:52:20 +0100 Subject: [PATCH 17/30] A bit of refactoring --- .../io/jvm/xml/XmlBruteForceComparator.java | 62 ++++++++++++------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java index 69026ee..eb6aabb 100644 --- a/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java +++ b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java @@ -14,7 +14,7 @@ /** * A comparator for {@link org.w3c.dom.Element}, compares two XML subtrees. The * subtrees are considered equivalent if they contain the same nodes, having the - * same attributes and values. The order of elements is irrelevant. + * same attributes and values. The order of elements is ignored. * * For each of the two trees the compiler builds a list of paths root-to-leaf, * and compares the two lists. @@ -55,7 +55,7 @@ private void buildPaths(List> allPaths, List pathUpToNode, Node pathUpToNode.add(node); - if (node.hasChildNodes()) { + if (node.hasChildNodes()) { for (Node child : getListOfChildren(node)) { buildPaths(allPaths, new ArrayList(pathUpToNode), child); } @@ -137,25 +137,34 @@ private boolean nodeListsEqual(List lhs, List rhs) { private boolean nodesEqual(Node node1, Node node2) { if (node1 == null && node2 == null) return true; - else if (node1.getNodeName() == null && node2.getNodeName() == null) - return true; - else if (node1.hasAttributes() != node2.hasAttributes()) - return false; - else if ((node1.getNodeValue() != null && node2.getNodeValue() != null) - && !node1.getNodeValue().equals(node2.getNodeValue())) - return false; - else if (node1.hasAttributes() && node2.hasAttributes() - && (node1.getAttributes().getLength() != node2.getAttributes().getLength())) - return false; - else if (node1.getChildNodes().getLength() != node2.getChildNodes().getLength()) - return false; - else if (!node1.getNodeName().equals(node2.getNodeName())) + else if(node1==null || node2 == null) return false; - else if (!nodesHaveEqualAttributes(node1, node2)) - return false; - - return true; + else + return nodesHaveEqualNames(node1, node2) + && nodesHaveEqualNumberOfChildren(node1, node2) + && nodesHaveEqualValues(node1, node2) + && nodesHaveEqualAttributes(node1, node2); + } + + private boolean nodesHaveEqualValues(Node node1, Node node2){ + String node1_name=node1.getNodeValue(); + String node2_name=node2.getNodeValue(); + + return equalsWithNull(node1_name, node2_name); + } + + private boolean nodesHaveEqualNames(Node node1, Node node2){ + String node1_name=node1.getNodeName(); + String node2_name=node2.getNodeName(); + + return equalsWithNull(node1_name, node2_name); + } + + private boolean nodesHaveEqualNumberOfChildren(Node node1, Node node2){ + return node1.getChildNodes().getLength() == node2.getChildNodes().getLength(); } + + private boolean nodesHaveEqualAttributes(Node node1, Node node2) { if (node1.hasAttributes() != node2.hasAttributes()) @@ -165,15 +174,13 @@ else if (node1.hasAttributes() == false && node2.hasAttributes() == false) else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) return false; else { - for (Attr attr1 : getListOfAttributes(node1)) { boolean found = false; for (Attr attr2 : getListOfAttributes(node2)) { - if (equalsWithNull(attr1.getName(), attr2.getName()) - && equalsWithNull(attr1.getValue(), attr2.getValue())) { + if(attributesAreEqual(attr1,attr2)){ found = true; break; - } + } } if (!found) return false; @@ -182,6 +189,15 @@ && equalsWithNull(attr1.getValue(), attr2.getValue())) { return true; } + + private boolean attributesAreEqual(Attr attribute1, Attr attribute2){ + if(attribute1==null && attribute2 == null) + return true; + else if(attribute1==null || attribute2 == null) + return false; + else return equalsWithNull(attribute1.getName(), attribute2.getName()) + && equalsWithNull(attribute1.getValue(), attribute2.getValue()); + } private List getListOfAttributes(Node node) { List aListOfAttributes = new ArrayList(); From e8efb4bdb899d420917d9a78c1d577e455347530 Mon Sep 17 00:00:00 2001 From: hperadin Date: Mon, 17 Mar 2014 09:59:28 +0100 Subject: [PATCH 18/30] Removed local scripts --- .../roundtripTests/json/generate_reference_conversions.sh | 2 +- .../roundtripTests/xml/generate_reference_conversions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh b/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh index 689c06b..580d589 100755 --- a/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh +++ b/json/src/test/resources/roundtripTests/json/generate_reference_conversions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Convert source XMLs to JSON +# Convert source XMLs to JSON, and vice versa - conversion scripts xml2json and json2xml need to be on the path cd source for f in *.json do diff --git a/json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh b/json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh index 9b5353c..935366e 100755 --- a/json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh +++ b/json/src/test/resources/roundtripTests/xml/generate_reference_conversions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Convert source XMLs to JSON +# Convert source XMLs to JSON, and vice versa - conversion scripts xml2json and json2xml need to be on the path cd source for f in *.xml do From 658c519ae16eb5b292e676d74f461c34dcc51472 Mon Sep 17 00:00:00 2001 From: hperadin Date: Mon, 17 Mar 2014 10:04:46 +0100 Subject: [PATCH 19/30] Updated readme --- .../test/resources/roundtripTests/README.md | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/json/src/test/resources/roundtripTests/README.md b/json/src/test/resources/roundtripTests/README.md index f526c2d..0f66c2d 100644 --- a/json/src/test/resources/roundtripTests/README.md +++ b/json/src/test/resources/roundtripTests/README.md @@ -1,32 +1,11 @@ +# Round trip tests xml->json and vice versa. -TODO: Update, directory layout changed for source file type -Round trip tests xml->json and vice versa. +## Directories: - -Directories: - - source - source XML and JSON files - - converted - converted files and roundtrip files (conversions by our jvm.io converter) - - reference - reference converted files and roundtrip files (conversions by Json.NET's converter) - -E.g. for _source.xml_: - - source - - source.xml - - converted - - source.xml.json - - source.xml.json.xml - - reference - - source.xml.json - - source.xml.json.xml - -Likewise, for _source.json_ - - source - - source.json - - converted - - source.json.xml - - source.json.xml.json - - reference - - source.json.xml - - source.json.xml.json - -The script generate\_reference\_conversions.sh generates neccessary fresh conversions to xml and json using Json.Net (includes round-tripping). + - json - json source and reference files + - source - source json files + - reference - reference files converted using Json.Net + - xml - xml source and reference files + - source - source XML files + - reference - reference files converted using Json.Net From 5e40de2290ad3bfe1fbe74ae1bcccaf108d4497e Mon Sep 17 00:00:00 2001 From: hperadin Date: Tue, 18 Mar 2014 10:26:12 +0100 Subject: [PATCH 20/30] Serializing of CDATA, Text and Comment arrays --- .../src/main/java/io/jvm/json/JsonWriter.java | 2 +- .../deserializers/XmlJsonDeserializer.java | 153 +++++++------ .../json/serializers/XmlJsonSerializer.java | 46 ++-- .../io/jvm/xml/XmlBruteForceComparator.java | 202 +++++++++++++----- json/src/test/java/io/jvm/json/Helpers.java | 146 +++++++------ .../io/jvm/json/Json2XmlRoundTripTest.java | 43 ++-- .../io/jvm/json/Xml2JsonRoundTripTest.java | 162 +++++++------- .../json/reference/hello.xml.json.xml | 2 +- .../json/reference/hello.xml.json.xml.json | 2 +- .../roundtripTests/json/source/hello.xml.json | 2 +- .../json/source/purchaseOrder.xml.json | 2 +- .../xml/reference/boox.xml.json | 2 +- .../xml/reference/boox.xml.json.xml | 8 +- .../roundtripTests/xml/source/boox.xml | 7 +- 14 files changed, 461 insertions(+), 318 deletions(-) diff --git a/json/src/main/java/io/jvm/json/JsonWriter.java b/json/src/main/java/io/jvm/json/JsonWriter.java index c7f6a39..7575a45 100644 --- a/json/src/main/java/io/jvm/json/JsonWriter.java +++ b/json/src/main/java/io/jvm/json/JsonWriter.java @@ -25,7 +25,7 @@ public JsonWriter(final Writer writer) { case 0x0c: special = 'f'; break; case 0x0d: special = 'r'; break; case 0x22: special = '"'; break; - case 0x2f: special = '/'; break; + //case 0x2f: special = '/'; break; case 0x5c: special = '\\'; break; default: diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java index f2b2b03..f031e4e 100644 --- a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -8,8 +8,12 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import org.w3c.dom.CDATASection; +import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.Text; public class XmlJsonDeserializer implements JsonDeserializer { @@ -82,11 +86,18 @@ private boolean valueIsArray(JsonReader reader) throws IOException { return reader.readToken() == '['; } - private void buildTextValue(Document document, Element node, JsonReader reader) throws IOException { + private boolean isTextContentNode(Node node) { + return (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.COMMENT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE); + } + + private void buildTextValue(Document document, Node node, JsonReader reader) throws IOException { switch (reader.readToken()) { case '"': /* String */ - node.appendChild(document.createTextNode(reader.readString())); + if (isTextContentNode(node)) { + node.setNodeValue(reader.readString()); + } else + node.appendChild(document.createTextNode(reader.readString())); break; case 't': /* true */ @@ -113,7 +124,7 @@ private void buildTextValue(Document document, Element node, JsonReader reader) * given JsonReader. The node needs to exist, and the JsonReader needs to be * positioned at the Json element's value. */ - private void buildNodeValueSubtree(Document document, Element parent, JsonReader reader) throws IOException { + private void buildNodeValueSubtree(Document document, Node parent, JsonReader reader) throws IOException { if (valueIsObject(reader)) { buildObjectValueSubtree(document, parent, reader); } else if (valueIsArray(reader)) { @@ -140,64 +151,83 @@ private void buildNodeValueSubtree(Document document, Element parent, JsonReader * the {@link JsonReader} we are currently using to read the Json * stream */ - private void buildObjectValueSubtree(Document document, Element parent, JsonReader reader) throws IOException{ - reader.assertReadToken('{'); - - boolean needsComma=false; - while (reader.readToken() != '}') { - if(needsComma){ - reader.assertLastToken(','); - reader.next(); - } - - String childNodeName = reader.readString(); - reader.assertReadToken(':'); - - /* If it's an attribute node */ - if(childNodeName.startsWith("@")){ - String nodeValue = reader.readString(); - parent.setAttribute(childNodeName.substring(1), nodeValue); - } - /* If it's a special node */ - else if(childNodeName.startsWith("#")){ - if(childNodeName.equals(commentNodeTag)){ - String commentText = reader.readString(); - parent.appendChild(document.createComment(commentText)); - } - else if(childNodeName.equals(cDataNodeTag)){ - String cDataText = reader.readString(); - parent.appendChild(document.createCDATASection(cDataText)); - } - else if(childNodeName.equals(textNodeTag)){ - String textNodeData = reader.readString(); - parent.appendChild(document.createTextNode(textNodeData)); - } - else if(childNodeName.equals(whitespaceNodeTag) || childNodeName.equals(significantWhitespaceNodeTag)){ - // Ignore - } - else{ - /* All other nodes whose name starts with a '#' are just serialised as text nodes, and otherwise ignored: */ - String unlikelyNodeData = reader.readString(); - parent.appendChild(document.createTextNode(unlikelyNodeData)); - } - - } - /* If it's a processing instruction */ - else if(childNodeName.startsWith("?")){ - String processingNodeData = reader.readString(); - parent.appendChild(document.createProcessingInstruction(childNodeName.substring(1), processingNodeData)); - } - /* If it's a normal node */ - else{ - Element childElement = document.createElement(childNodeName); - parent.appendChild(childElement); - buildNodeValueSubtree(document, childElement, reader); - } - - needsComma=true; + private void buildObjectValueSubtree(Document document, Node parentNode, JsonReader reader) throws IOException { + + reader.assertReadToken('{'); + + Element parent = (Element) parentNode; + + boolean needsComma = false; + while (reader.readToken() != '}') { + if (needsComma) { + reader.assertLastToken(','); + reader.next(); + } + + String childNodeName = reader.readString(); + reader.assertReadToken(':'); + + /* If it's an attribute node */ + if (childNodeName.startsWith("@")) { + String nodeValue = reader.readString(); + parent.setAttribute(childNodeName.substring(1), nodeValue); + } + /* If it's a special node */ + else if (childNodeName.startsWith("#")) { + if (childNodeName.equals(commentNodeTag)) { + Comment childElement = document.createComment(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(cDataNodeTag)) { + CDATASection childElement = document.createCDATASection(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(textNodeTag)) { + Text childElement = document.createTextNode(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(whitespaceNodeTag) + || childNodeName.equals(significantWhitespaceNodeTag)) { + // Ignore + } else { + /* + * All other nodes whose name starts with a '#' are invalid + * XML nodes, and thus ignored: + */ } - reader.assertReadToken('}'); + + } + /* If it's a processing instruction */ + else if (childNodeName.startsWith("?")) { + String processingNodeData = reader.readString(); + parent.appendChild(document.createProcessingInstruction(childNodeName.substring(1), processingNodeData)); + } + /* If it's a normal node */ + else { + Element childElement = document.createElement(childNodeName); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } + + needsComma = true; } + reader.assertReadToken('}'); + } + + private Node createChildNodeAccordingToName(Document document, String nodeName) { + Node childNode; + + if (nodeName.equals(textNodeTag)) + childNode = document.createTextNode(""); + else if (nodeName.equals(cDataNodeTag)) + childNode = document.createCDATASection(""); + else if (nodeName.equals(commentNodeTag)) + childNode = document.createComment(""); + else + childNode = document.createElement(nodeName); + + return childNode; + } /** * Builds a sequence of XML elements from a Json array. The first element of @@ -211,7 +241,7 @@ else if(childNodeName.startsWith("?")){ * @param reader * @throws IOException */ - private void buildArrayValueSubtree(Document document, Element parent, String arrayNodesName, JsonReader reader) + private void buildArrayValueSubtree(Document document, Node parent, String arrayNodesName, JsonReader reader) throws IOException { reader.assertReadToken('['); @@ -222,7 +252,8 @@ private void buildArrayValueSubtree(Document document, Element parent, String ar reader.next(); } - Element childNode = document.createElement(arrayNodesName); + Node childNode = createChildNodeAccordingToName(document, arrayNodesName); + parent.appendChild(childNode); buildNodeValueSubtree(document, childNode, reader); diff --git a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java index bfdf36e..5953d95 100644 --- a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java +++ b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java @@ -57,7 +57,10 @@ public void toJson(JsonWriter jsonWriter, Element value) throws IOException { private final boolean writeArrayAttribute = false; private final boolean omitRootObject = false; + /* State info */ private boolean needsComma = false; + private boolean writingObject = false; + private boolean writingArray = false; /** * Write a Json representation of a given org.w3c.dom.Element. @@ -77,14 +80,14 @@ private void writeJson(final JsonWriter writer, final Element element) pushParentNamespaces(element, manager); if (!omitRootObject) - writeOpenObjectWithComma(writer); + writeOpenObjectWithStateInfo(writer); // writeXmlDeclaration(writer,element.getOwnerDocument(),manager); serializeNode(writer, element, manager, !omitRootObject); if (!omitRootObject) - writeCloseObjectWithComma(writer); + writeCloseObjectWithStateInfo(writer); } private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { @@ -292,13 +295,13 @@ private void serializeArray(final JsonWriter writer, writePropertyNameAndColon(writer, nameOfTheElements); } - writeOpenArrayWithComma(writer); + writeOpenArrayWithStateInfo(writer); for (int i = 0; i < nodes.size(); i++) { serializeNode(writer, nodes.get(i), manager, false); } - writeCloseArrayWithComma(writer); + writeCloseArrayWithStateInfo(writer); } /** @@ -324,7 +327,7 @@ private void writeXmlDeclaration(final JsonWriter writer, throws IOException { /* Deserializirat deklaraciju, iako ovo zvuči krivo staviti ovdje */ writePropertyNameAndColon(writer, declarationNodeTag); - writeOpenObjectWithComma(writer); + writeOpenObjectWithStateInfo(writer); if (document.getXmlVersion() != null) { writePropertyNameAndColon(writer, "@version"); writePropertyValue(writer, document.getXmlVersion()); @@ -340,7 +343,7 @@ private void writeXmlDeclaration(final JsonWriter writer, writePropertyValue(writer, document.getXmlStandalone() ? "yes" : "no"); } - writeCloseObjectWithComma(writer); + writeCloseObjectWithStateInfo(writer); } private void serializeNode(final JsonWriter writer, final Node node, @@ -386,12 +389,11 @@ && allChildrenHaveSameLocalName(node)) } if (hasSingleTextChild(node)) - writePropertyValue(writer, node.getChildNodes().item(0) - .getNodeValue()); + writePropertyValue(writer, node.getChildNodes().item(0).getNodeValue()); else if (nodeIsEmpty(node)) { writer.writeNull(); } else { - writeOpenObjectWithComma(writer); + writeOpenObjectWithStateInfo(writer); /* First serialize the attributes */ @@ -402,7 +404,7 @@ else if (nodeIsEmpty(node)) { /* Then serialize the nodes by groups */ serializeGroupedNodes(writer, node, manager, true); - writeCloseObjectWithComma(writer); + writeCloseObjectWithStateInfo(writer); } manager.popScope(); @@ -525,40 +527,46 @@ private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException { private void writePropertyNameAndColon(JsonWriter writer, String propertyName) throws IOException { - writeStringWithComma(writer, propertyName); + writeStringWithStateInfo(writer, propertyName); writer.writeColon(); } private void writePropertyValue(JsonWriter writer, String propertyValue) - throws IOException { + throws IOException { + if(writingArray) + writeCommaIfNeedsComma(writer); writer.writeString(propertyValue); needsComma = true; } - private void writeStringWithComma(JsonWriter writer, String text) + private void writeStringWithStateInfo(JsonWriter writer, String text) throws IOException { writeCommaIfNeedsComma(writer); writer.writeString(text); } - private void writeOpenObjectWithComma(JsonWriter writer) throws IOException { + private void writeOpenObjectWithStateInfo(JsonWriter writer) throws IOException { + writingObject=true; writeCommaIfNeedsComma(writer); writer.writeOpenObject(); } - private void writeOpenArrayWithComma(JsonWriter writer) throws IOException { + private void writeOpenArrayWithStateInfo(JsonWriter writer) throws IOException { + writingArray=true; writeCommaIfNeedsComma(writer); writer.writeOpenArray(); } - private void writeCloseObjectWithComma(JsonWriter writer) + private void writeCloseObjectWithStateInfo(JsonWriter writer) throws IOException { - needsComma = true; + writingObject=false; + needsComma = true; writer.writeCloseObject(); } - private void writeCloseArrayWithComma(JsonWriter writer) throws IOException { - needsComma = true; + private void writeCloseArrayWithStateInfo(JsonWriter writer) throws IOException { + writingArray=false; + needsComma = true; writer.writeCloseArray(); } } diff --git a/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java index eb6aabb..3a39946 100644 --- a/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java +++ b/json/src/main/java/io/jvm/xml/XmlBruteForceComparator.java @@ -6,7 +6,15 @@ import java.util.Comparator; import java.util.List; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMResult; +import javax.xml.transform.dom.DOMSource; + import org.w3c.dom.Attr; +import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -29,15 +37,108 @@ public class XmlBruteForceComparator implements Comparator { private List> xmlPaths_lhs = new ArrayList>(); private List> xmlPaths_rhs = new ArrayList>(); + private boolean collapseAllTextContentIntoSingleNode = true; + private boolean collapseAllCDataContentIntoSingleNode = true; + private boolean collapseAllCommentsIntoSingleNode = true; + + + /** + * While comparing, collapse all {@link Node.COMMENT_NODE} children of + * each element into a single {@link Node.COMMENT_NODE}. + * This will permanently change the tree. + */ + public void setCollapseAllCommentsIntoSingleNode(boolean collapseAllCommentsIntoSingleNode) { + this.collapseAllCommentsIntoSingleNode = collapseAllCommentsIntoSingleNode; + } + + /** + * While comparing, collapse all {@link Node.CDATA_SECTION_NODE} children of + * each element into a single {@link Node.CDATA_SECTION_NODE}. + * This will permanently change the tree. + */ + public void setCollapseAllCDataContentIntoSingleNode(boolean collapseAllCDataContentIntoSingleNode) { + this.collapseAllCDataContentIntoSingleNode = collapseAllCDataContentIntoSingleNode; + } + + /** + * While comparing, collapse all {@link Node.TEXT_NODE} children of each + * element into a single {@link Node.TEXT_NODE} + * This will permanently change the tree. + */ + public void setCollapseAllTextContentIntoSingleNode(boolean collapseAllTextContentIntoSingleNode) { + this.collapseAllTextContentIntoSingleNode = collapseAllTextContentIntoSingleNode; + } + @Override - public int compare(Element lhs, Element rhs) { + public int compare(Element lhs, Element rhs){ + + collapseNodes(lhs, rhs); buildPaths(xmlPaths_lhs, null, (Node) lhs); buildPaths(xmlPaths_rhs, null, (Node) rhs); - + return compareAllPaths(xmlPaths_lhs, xmlPaths_rhs); } + private void collapseNodes(Node lhs, Node rhs) { + if (collapseAllTextContentIntoSingleNode) { + collapseAllContentIntoSingleNode(lhs, Node.TEXT_NODE); + collapseAllContentIntoSingleNode(rhs, Node.TEXT_NODE); + } + + if (collapseAllCDataContentIntoSingleNode) { + collapseAllContentIntoSingleNode(lhs, Node.CDATA_SECTION_NODE); + collapseAllContentIntoSingleNode(rhs, Node.CDATA_SECTION_NODE); + } + + if (collapseAllCommentsIntoSingleNode) { + collapseAllContentIntoSingleNode(lhs, Node.COMMENT_NODE); + collapseAllContentIntoSingleNode(rhs, Node.COMMENT_NODE); + } + } + + private void collapseAllContentIntoSingleNode(Node node, short nodeType) { + if (node.hasChildNodes()) { + boolean weFoundAnyTextNodes=false; + /* + * Collect all text nodes' text, and remove the nodes from {@link + * node} + */ + StringBuffer collectedTextNodes = new StringBuffer(); + for (Node child : getListOfChildren(node)) { + if (child.getNodeType() == nodeType) { + collectedTextNodes.append(child.getNodeValue()); + node.removeChild(child); + weFoundAnyTextNodes = true; + } + } + + if (weFoundAnyTextNodes) { + switch (nodeType) { + case Node.TEXT_NODE: + if (collectedTextNodes.length() > 0) + node.appendChild(node.getOwnerDocument().createTextNode(collectedTextNodes.toString())); + break; + case Node.CDATA_SECTION_NODE: + node.appendChild(node.getOwnerDocument().createCDATASection(collectedTextNodes.toString())); + break; + case Node.COMMENT_NODE: + node.appendChild(node.getOwnerDocument().createComment(collectedTextNodes.toString())); + break; + default: + break; + } + } + + /* Rinse and repeat */ + for (Node child : getListOfChildren(node)) { + if (child.getNodeType() != nodeType) { + collapseAllContentIntoSingleNode(child, nodeType); + } + } + } + } + /** * Recursively builds a list of all path from root to leaf * @@ -53,13 +154,13 @@ private void buildPaths(List> allPaths, List pathUpToNode, Node if (pathUpToNode == null) pathUpToNode = new ArrayList(); - pathUpToNode.add(node); - - if (node.hasChildNodes()) { + pathUpToNode.add(node); + + if (node.hasChildNodes()) { for (Node child : getListOfChildren(node)) { - buildPaths(allPaths, new ArrayList(pathUpToNode), child); + buildPaths(allPaths, new ArrayList(pathUpToNode), child); } - } else { + } else { allPaths.add(new ArrayList(pathUpToNode)); pathUpToNode.clear(); } @@ -81,20 +182,27 @@ private void buildPaths(List> allPaths, List pathUpToNode, Node * @return {@code 0} if they are equal {@code -1} otherwise */ private int compareAllPaths(List> lhs, List> rhs) { - if (lhs.size() != rhs.size()) - return -1; - + if (lhs.size() != rhs.size()) { + System.out.println("Različite veličine:"); + System.out.println(); + System.out.println(lhs); + System.out.println(); + System.out.println(rhs); + + return -1; + } + for (List leftPath : lhs) { boolean found = false; for (List rightPath : rhs) { if (nodeListsEqual(leftPath, rightPath)) { found = true; - rhs.remove(rightPath); - + rhs.remove(rightPath); + break; } } - if (!found){ + if (!found) { out.println(leftPath); return -1; } @@ -114,19 +222,18 @@ private int compareAllPaths(List> lhs, List> rhs) { * @param rhs * The rhs List * @return true if the {@code lists} are equal, {@code false} otherwise - * @throws InterruptedException + * @throws InterruptedException */ - private boolean nodeListsEqual(List lhs, List rhs) { - + private boolean nodeListsEqual(List lhs, List rhs) { + if (lhs.size() != rhs.size()) - return false; + return false; for (int i = 0; i < lhs.size(); i++) { Node node1 = lhs.get(i); Node node2 = rhs.get(i); - - if (!nodesEqual(node1, node2)) { + if (!nodesEqual(node1, node2)) { return false; } } @@ -135,36 +242,33 @@ private boolean nodeListsEqual(List lhs, List rhs) { } private boolean nodesEqual(Node node1, Node node2) { + if (node1 == null && node2 == null) return true; - else if(node1==null || node2 == null) + else if (node1 == null || node2 == null) return false; else - return nodesHaveEqualNames(node1, node2) - && nodesHaveEqualNumberOfChildren(node1, node2) - && nodesHaveEqualValues(node1, node2) - && nodesHaveEqualAttributes(node1, node2); - } - - private boolean nodesHaveEqualValues(Node node1, Node node2){ - String node1_name=node1.getNodeValue(); - String node2_name=node2.getNodeValue(); - - return equalsWithNull(node1_name, node2_name); + return nodesHaveEqualNames(node1, node2) && nodesHaveEqualNumberOfChildren(node1, node2) + && nodesHaveEqualValues(node1, node2) && nodesHaveEqualAttributes(node1, node2); } - - private boolean nodesHaveEqualNames(Node node1, Node node2){ - String node1_name=node1.getNodeName(); - String node2_name=node2.getNodeName(); - + + private boolean nodesHaveEqualValues(Node node1, Node node2) { + String node1_value = node1.getNodeValue(); + String node2_value = node2.getNodeValue(); + + return equalsWithNull(node1_value, node2_value); + } + + private boolean nodesHaveEqualNames(Node node1, Node node2) { + String node1_name = node1.getNodeName(); + String node2_name = node2.getNodeName(); + return equalsWithNull(node1_name, node2_name); } - - private boolean nodesHaveEqualNumberOfChildren(Node node1, Node node2){ + + private boolean nodesHaveEqualNumberOfChildren(Node node1, Node node2) { return node1.getChildNodes().getLength() == node2.getChildNodes().getLength(); } - - private boolean nodesHaveEqualAttributes(Node node1, Node node2) { if (node1.hasAttributes() != node2.hasAttributes()) @@ -177,10 +281,10 @@ else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) for (Attr attr1 : getListOfAttributes(node1)) { boolean found = false; for (Attr attr2 : getListOfAttributes(node2)) { - if(attributesAreEqual(attr1,attr2)){ + if (attributesAreEqual(attr1, attr2)) { found = true; break; - } + } } if (!found) return false; @@ -189,14 +293,15 @@ else if (node1.getAttributes().getLength() != node2.getAttributes().getLength()) return true; } - - private boolean attributesAreEqual(Attr attribute1, Attr attribute2){ - if(attribute1==null && attribute2 == null) + + private boolean attributesAreEqual(Attr attribute1, Attr attribute2) { + if (attribute1 == null && attribute2 == null) return true; - else if(attribute1==null || attribute2 == null) + else if (attribute1 == null || attribute2 == null) return false; - else return equalsWithNull(attribute1.getName(), attribute2.getName()) - && equalsWithNull(attribute1.getValue(), attribute2.getValue()); + else + return equalsWithNull(attribute1.getName(), attribute2.getName()) + && equalsWithNull(attribute1.getValue(), attribute2.getValue()); } private List getListOfAttributes(Node node) { @@ -227,5 +332,4 @@ else if (o1 == null || o2 == null) else return o1.equals(o2); } - } diff --git a/json/src/test/java/io/jvm/json/Helpers.java b/json/src/test/java/io/jvm/json/Helpers.java index 73fd954..7568077 100644 --- a/json/src/test/java/io/jvm/json/Helpers.java +++ b/json/src/test/java/io/jvm/json/Helpers.java @@ -1,9 +1,13 @@ package io.jvm.json; +import io.jvm.json.deserializers.XmlJsonDeserializer; +import io.jvm.json.serializers.XmlJsonSerializer; + import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; +import java.io.StringReader; import java.io.StringWriter; import java.net.URISyntaxException; import java.net.URL; @@ -16,82 +20,88 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import org.json.JSONException; +import org.skyscreamer.jsonassert.JSONAssert; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.SAXException; public class Helpers { - public static File getFileForResource(String resourcePath) throws URISyntaxException - { - final URL resourceURL = Xml2JsonRoundTripTest.class.getResource(resourcePath); - - if (resourceURL==null) - return null; - else - return new File(resourceURL.toURI()); - - } - - public static Document parseXmlFile(final File file) - throws SAXException, IOException, ParserConfigurationException { - - final Document doc = DocumentBuilderFactory - .newInstance() - .newDocumentBuilder() - .parse(file); - - doc.normalizeDocument(); - - return doc; - } - - public static String stringFromFile(File file) throws IOException - { - BufferedReader br = new BufferedReader(new FileReader(file)); - try { - StringBuilder sb = new StringBuilder(); - String line = br.readLine(); - - while (line != null) { - sb.append(line); - sb.append("\n"); - line = br.readLine(); - } - return sb.toString(); - } finally { - br.close(); - } + public static File getFileForResource(String resourcePath) throws URISyntaxException { + final URL resourceURL = Xml2JsonRoundTripTest.class.getResource(resourcePath); + + if (resourceURL == null) + return null; + else + return new File(resourceURL.toURI()); + + } + + public static Document parseXmlFile(final File file) throws SAXException, IOException, ParserConfigurationException { + + final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file); + + doc.normalizeDocument(); + + return doc; + } + + public static String stringFromFile(File file) throws IOException { + BufferedReader br = new BufferedReader(new FileReader(file)); + try { + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + + while (line != null) { + sb.append(line); + sb.append("\n"); + line = br.readLine(); + } + return sb.toString(); + } finally { + br.close(); } - - public static void printDocumentTree(Node el){ - System.out.println(el.toString()); - for(int i=0;i json -> xml) using - * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML - * equivalence with the reference conversions (obtained by using Json.NET) - */ - @Test - public void assertRoundTripEquivalenceWithReferenceConversion() - throws URISyntaxException, JSONException, SAXException, - IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, TransformerFactoryConfigurationError { - - final File xmlSources_dir = getFileForResource("/roundtripTests/xml/source/"); - - for (final File xmlSourceFile : xmlSources_dir.listFiles()) { - if (xmlSourceFile.isFile()) { - System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); - /* Filename initialisation */ - final String sourceFilename_xml = xmlSourceFile.getName(); - final String convertedFilename_json = sourceFilename_xml + ".json"; - final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; - - final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/"+ convertedFilename_json); - assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, (referenceFile_json != null && referenceFile_json.exists())); - - final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/"+ roundtripFilename_xml); - assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); - - /* Parse input files */ - final Document source_xml = parseXmlFile(xmlSourceFile); - final String referenceJson = stringFromFile(referenceFile_json); - final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); - - /* Convert to json and compare with reference conversion */ - final String convertedJson = jsonStringFromXml(source_xml); - -// System.out.println("Converted JSON:"); -// System.out.println(convertedJson); -// System.out.println("Reference JSON:"); -// System.out.println(referenceJson); - - assertJsonEquivalence(convertedJson, referenceJson); - - /* Convert back to XML, and compare with reference documents */ - final Document roundtripXmlDocument = xmlDocumentfromJson(convertedJson); - - System.out.println("Our roundtrip XML:"); - printXmlDocument(roundtripXmlDocument); - System.out.println("Reference roundtrip xml:"); - printXmlDocument(referenceRoundTrip_xml); - - assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML",roundtripXmlDocument, referenceRoundTrip_xml); - assertXmlEquivalence("The roundtrip XML does not match the source XML",roundtripXmlDocument,source_xml); - assertXmlEquivalence("The reference roundtrip XML does not match the source XML",referenceRoundTrip_xml, source_xml); - } - } - } - - private static Document xmlDocumentfromJson(String json) throws IOException - { - JsonReader jr = new JsonReader(new StringReader(json)); - - return new XmlJsonDeserializer().fromJson(jr); - } - private static String jsonStringFromXml(final Document source_xml) throws IOException{ - final StringWriter sw = new StringWriter(); - new XmlJsonSerializer().toJson(new JsonWriter(sw), source_xml.getDocumentElement()); - return sw.toString(); - } - - private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException - { - - JSONAssert.assertEquals(lhs, rhs, false); + /** + * For each of the XML files in 'resources/roundtripTests/source/xml' + * generates the entire roundtrip conversion (xml -> json -> xml) using + * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML + * equivalence with the reference conversions (obtained by using Json.NET) + */ + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, + TransformerException, TransformerFactoryConfigurationError { + + final File xmlSources_dir = getFileForResource("/roundtripTests/xml/source/"); + + for (final File xmlSourceFile : xmlSources_dir.listFiles()) { + if (xmlSourceFile.isFile()) { + System.out.println(); + System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); + /* Filename initialisation */ + final String sourceFilename_xml = xmlSourceFile.getName(); + final String convertedFilename_json = sourceFilename_xml + ".json"; + final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; + + final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/" + + convertedFilename_json); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, + (referenceFile_json != null && referenceFile_json.exists())); + + final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/" + + roundtripFilename_xml); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, + (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); + + /* Parse input files */ + final Document source_xml = parseXmlFile(xmlSourceFile); + final String referenceJson = stringFromFile(referenceFile_json); + final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); + + /* Convert to json and compare with reference conversion */ + final String convertedJson = jsonStringFromXml(source_xml); + + // System.out.println("Converted JSON:"); + // System.out.println(convertedJson); + // System.out.println("Reference JSON:"); + // System.out.println(referenceJson); + + assertJsonEquivalence(convertedJson, referenceJson); + + /* Convert back to XML, and compare with reference documents */ + final Document roundtripXmlDocument = xmlDocumentFromJson(convertedJson); + + System.out.println("Our roundtrip XML:"); + printXmlDocument(roundtripXmlDocument); + System.out.println("Reference roundtrip xml:"); + printXmlDocument(referenceRoundTrip_xml); + + assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML", + roundtripXmlDocument, referenceRoundTrip_xml); + assertXmlEquivalence("The roundtrip XML does not match the source XML", roundtripXmlDocument, + source_xml); + assertXmlEquivalence("The reference roundtrip XML does not match the source XML", + referenceRoundTrip_xml, source_xml); + } } + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { + System.out.println(); + System.out.println("Checking JSon equivalence: "); + System.out.println(lhs); + System.out.println(rhs); - private static void assertXmlEquivalence(String message, Document lhs, Document rhs){ - XmlBruteForceComparator comparator = new XmlBruteForceComparator(); - - assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement())==0); - } + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); + } + } \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml index 641ae8c..92412af 100644 --- a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml +++ b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml @@ -1 +1 @@ -WSDL File for HelloService \ No newline at end of file +text node in the middleWSDL File for HelloService \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json index ed34e7f..b252e58 100644 --- a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json +++ b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json @@ -1 +1 @@ -{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/"}}}}} \ No newline at end of file +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle","#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/","#cdata-section":"cdata somewha at the end"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/hello.xml.json b/json/src/test/resources/roundtripTests/json/source/hello.xml.json index ed34e7f..9fc7831 100644 --- a/json/src/test/resources/roundtripTests/json/source/hello.xml.json +++ b/json/src/test/resources/roundtripTests/json/source/hello.xml.json @@ -1 +1 @@ -{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/"}}}}} \ No newline at end of file +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle", "#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/", "#cdata-section":"cdata somewha at the end"}}}}} diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json index a3d8679..46cf7f3 100644 --- a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json +++ b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json @@ -1 +1 @@ -{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json index 731e878..4274864 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json @@ -1 +1 @@ -{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}],"#text":"\n\tpetar petru plete petlju\n "}} \ No newline at end of file +{"catalog":{"#cdata-section":"kokodak","book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":["kukuriku","kokodak","mijau"],"author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}],"#text":["\ntestoiejsoitjeo\n ","\noiajweofiajwefoij\n "]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml index 94d2b2e..e784464 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml @@ -1,7 +1,7 @@ -Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen - of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life @@ -20,5 +20,7 @@ looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment. - petar petru plete petlju +testoiejsoitjeo + +oiajweofiajwefoij \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/boox.xml b/json/src/test/resources/roundtripTests/xml/source/boox.xml index bb13a3d..70a1870 100644 --- a/json/src/test/resources/roundtripTests/xml/source/boox.xml +++ b/json/src/test/resources/roundtripTests/xml/source/boox.xml @@ -1,4 +1,5 @@ + Gambardella, Matthew XML Developer's Guide @@ -8,6 +9,7 @@ An in-depth look at creating applications with XML. +testoiejsoitjeo Ralls, Kim Midnight Rain @@ -18,8 +20,11 @@ an evil sorceress, and her own childhood to become queen of the world. - petar petru plete petlju +oiajweofiajwefoij + + + Corets, Eva Maeve Ascendant Fantasy From c35978c21eb06b8016f2828878296763c6f6c757 Mon Sep 17 00:00:00 2001 From: hperadin Date: Tue, 18 Mar 2014 10:27:00 +0100 Subject: [PATCH 21/30] Updated version of tests --- json/Json2XmlRoundTripTest.java | 90 ++++++++++++++++++++++++++ json/Xml2JsonRoundTripTest.java | 108 ++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 json/Json2XmlRoundTripTest.java create mode 100644 json/Xml2JsonRoundTripTest.java diff --git a/json/Json2XmlRoundTripTest.java b/json/Json2XmlRoundTripTest.java new file mode 100644 index 0000000..b6930f3 --- /dev/null +++ b/json/Json2XmlRoundTripTest.java @@ -0,0 +1,90 @@ +package com.dslplatform.client; + +import static com.dslplatform.client.Helpers.getFileForResource; +import static com.dslplatform.client.Helpers.parseXmlFile; +import static com.dslplatform.client.Helpers.stringFromFile; +import static com.dslplatform.client.Helpers.jsonStringFromXml; +import static com.dslplatform.client.Helpers.xmlDocumentFromJson; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactoryConfigurationError; + +import org.json.JSONException; +import org.junit.Test; +import org.skyscreamer.jsonassert.JSONAssert; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +public class Json2XmlRoundTripTest { + + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, + TransformerException, TransformerFactoryConfigurationError { + + final File jsonSources_dir = getFileForResource("/roundtripTests/json/source/"); + + for (final File jsonSourceFile : jsonSources_dir.listFiles()) { + if (jsonSourceFile.isFile()) { + System.out.println("Testiramo za datoteku: " + jsonSourceFile.getName()); + + /* Filename initialisation */ + final String sourceFilename_json = jsonSourceFile.getName(); + final String convertedFilename_xml = sourceFilename_json + ".xml"; + final String roundtripFilename_json = sourceFilename_json + ".xml.json"; + + final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" + + convertedFilename_xml); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_json, + (referenceFile_xml != null && referenceFile_xml.exists())); + + final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" + + roundtripFilename_json); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_json, + (referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); + + /* Parse input files */ + final String source_json = stringFromFile(jsonSourceFile); + final Document referenceXml = parseXmlFile(referenceFile_xml); + final String referenceRoundTrip_json = stringFromFile(referenceRoundtripFile_json); + + /* Convert to XML and compare with reference conversion */ + final Document convertedXml = xmlDocumentFromJson(source_json); + // System.out.println("Converted XML:"); + // printXmlDocument(convertedXml); + // System.out.println("Reference XML:"); + // printXmlDocument(referenceXml); + assertXmlEquivalence("The converted XML does not match the reference XML", convertedXml, referenceXml); + + /* Convert back to Json, and compare with reference documents */ + final String roundtripJsonString = jsonStringFromXml(convertedXml); + + assertJsonEquivalence(roundtripJsonString, referenceRoundTrip_json); + assertJsonEquivalence(roundtripJsonString, source_json); + assertJsonEquivalence(referenceRoundTrip_json, source_json); + } + } + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { + System.out.println(); + System.out.println(lhs); + System.out.println(rhs); + System.out.println(); + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); + } + +} diff --git a/json/Xml2JsonRoundTripTest.java b/json/Xml2JsonRoundTripTest.java new file mode 100644 index 0000000..0b4ac5f --- /dev/null +++ b/json/Xml2JsonRoundTripTest.java @@ -0,0 +1,108 @@ +package com.dslplatform.client; + +import static com.dslplatform.client.Helpers.getFileForResource; +import static com.dslplatform.client.Helpers.jsonStringFromXml; +import static com.dslplatform.client.Helpers.parseXmlFile; +import static com.dslplatform.client.Helpers.printXmlDocument; +import static com.dslplatform.client.Helpers.stringFromFile; +import static com.dslplatform.client.Helpers.xmlDocumentFromJson; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactoryConfigurationError; + +import org.json.JSONException; +import org.junit.Test; +import org.skyscreamer.jsonassert.JSONAssert; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +public class Xml2JsonRoundTripTest { + + /** + * For each of the XML files in 'resources/roundtripTests/source/xml' + * generates the entire roundtrip conversion (xml -> json -> xml) using + * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML + * equivalence with the reference conversions (obtained by using Json.NET) + */ + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, + TransformerException, TransformerFactoryConfigurationError { + + final File xmlSources_dir = getFileForResource("/roundtripTests/xml/source/"); + + for (final File xmlSourceFile : xmlSources_dir.listFiles()) { + if (xmlSourceFile.isFile()) { + System.out.println(); + System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); + /* Filename initialisation */ + final String sourceFilename_xml = xmlSourceFile.getName(); + final String convertedFilename_json = sourceFilename_xml + ".json"; + final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; + + final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/" + + convertedFilename_json); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, + (referenceFile_json != null && referenceFile_json.exists())); + + final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/" + + roundtripFilename_xml); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, + (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); + + /* Parse input files */ + final Document source_xml = parseXmlFile(xmlSourceFile); + final String referenceJson = stringFromFile(referenceFile_json); + final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); + + /* Convert to json and compare with reference conversion */ + final String convertedJson = jsonStringFromXml(source_xml); + + // System.out.println("Converted JSON:"); + // System.out.println(convertedJson); + // System.out.println("Reference JSON:"); + // System.out.println(referenceJson); + + assertJsonEquivalence(convertedJson, referenceJson); + + /* Convert back to XML, and compare with reference documents */ + final Document roundtripXmlDocument = xmlDocumentFromJson(convertedJson); + + System.out.println("Our roundtrip XML:"); + printXmlDocument(roundtripXmlDocument); + System.out.println("Reference roundtrip xml:"); + printXmlDocument(referenceRoundTrip_xml); + + assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML", + roundtripXmlDocument, referenceRoundTrip_xml); + assertXmlEquivalence("The roundtrip XML does not match the source XML", roundtripXmlDocument, + source_xml); + assertXmlEquivalence("The reference roundtrip XML does not match the source XML", + referenceRoundTrip_xml, source_xml); + } + } + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { + System.out.println(); + System.out.println("Checking JSon equivalence: "); + System.out.println(lhs); + System.out.println(rhs); + + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); + } + +} \ No newline at end of file From abecbb410e4a4dc331f6760caf304c03d169d4ef Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 09:55:33 +0100 Subject: [PATCH 22/30] New Json and Xml test files --- .../json/reference/mixed.json.xml | 1 + .../json/reference/mixed.json.xml.json | 1 + .../roundtripTests/json/source/mixed.json | 31 +++ .../json/source/notImplemented/mixed.json | 31 +++ .../xml/reference/boox_withprolog.xml.json | 1 + .../reference/boox_withprolog.xml.json.xml | 22 +++ .../xml/reference/mixed.json.xml.json | 1 + .../xml/reference/mixed.json.xml.json.xml | 1 + .../roundtripTests/xml/source/mixed.json.xml | 1 + .../CurrencyConvertor.xml | 0 .../Weather.xml | 0 .../{withprolog => notImplemented}/boox.xml | 0 .../source/notImplemented/boox_withprolog.xml | 121 ++++++++++++ .../{withprolog => notImplemented}/modes.xml | 0 .../purchaseOrder.xml | 0 .../xml/source/withComments/modes.xml | 181 ------------------ .../xml/source/withComments/purchaseOrder.xml | 76 -------- 17 files changed, 211 insertions(+), 257 deletions(-) create mode 100644 json/src/test/resources/roundtripTests/json/reference/mixed.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/mixed.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/mixed.json create mode 100644 json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/source/mixed.json.xml rename json/src/test/resources/roundtripTests/xml/source/{withprolog => notImplemented}/CurrencyConvertor.xml (100%) rename json/src/test/resources/roundtripTests/xml/source/{withprolog => notImplemented}/Weather.xml (100%) rename json/src/test/resources/roundtripTests/xml/source/{withprolog => notImplemented}/boox.xml (100%) create mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml rename json/src/test/resources/roundtripTests/xml/source/{withprolog => notImplemented}/modes.xml (100%) rename json/src/test/resources/roundtripTests/xml/source/{withprolog => notImplemented}/purchaseOrder.xml (100%) delete mode 100644 json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml diff --git a/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml b/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml new file mode 100644 index 0000000..454207b --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2a0some text3a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml.json new file mode 100644 index 0000000..e19d426 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/mixed.json.xml.json @@ -0,0 +1 @@ +{"root":{"array":["a","b","c","d"],"#text":["some text","some text1some text2","some text3"],"#cdata-section":["some CDATA","some CDATA"],"a":["a0","a1","a2"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"},"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/mixed.json b/json/src/test/resources/roundtripTests/json/source/mixed.json new file mode 100644 index 0000000..36cc118 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/mixed.json @@ -0,0 +1,31 @@ +{ +"root":{ + "array":["a","b","c","d"] + , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text1" + , "#text":"some text2" + , "a":"a0" + , "#cdata-section":"some CDATA" + , "#text":"some text3" + , "a":"a1" + , "a":"a2" + , "object":{ + "array":["a","b","c","d"] + ,"array":["a","b","c","d"] + ,"array":["a","b","c","#text"] + , "object":{ + "array":["a","b","c","d"] + ,"array":["a","b","c","d"] + ,"array":["a","b","c","#text"] + , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text" + , "#text":"some text" + } , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text" + , "#text":"some text" + } +} +} diff --git a/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json b/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json new file mode 100644 index 0000000..36cc118 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json @@ -0,0 +1,31 @@ +{ +"root":{ + "array":["a","b","c","d"] + , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text1" + , "#text":"some text2" + , "a":"a0" + , "#cdata-section":"some CDATA" + , "#text":"some text3" + , "a":"a1" + , "a":"a2" + , "object":{ + "array":["a","b","c","d"] + ,"array":["a","b","c","d"] + ,"array":["a","b","c","#text"] + , "object":{ + "array":["a","b","c","d"] + ,"array":["a","b","c","d"] + ,"array":["a","b","c","#text"] + , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text" + , "#text":"some text" + } , "#text":"some text" + , "#cdata-section":"some CDATA" + , "#text":"some text" + , "#text":"some text" + } +} +} diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json new file mode 100644 index 0000000..15403eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json @@ -0,0 +1 @@ +{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml new file mode 100644 index 0000000..fb9d8eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json new file mode 100644 index 0000000..e19d426 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json @@ -0,0 +1 @@ +{"root":{"array":["a","b","c","d"],"#text":["some text","some text1some text2","some text3"],"#cdata-section":["some CDATA","some CDATA"],"a":["a0","a1","a2"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"},"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml new file mode 100644 index 0000000..0bdbc2d --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2some text3a0a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml b/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml new file mode 100644 index 0000000..454207b --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2a0some text3a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/withprolog/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/withprolog/CurrencyConvertor.xml rename to json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/withprolog/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/withprolog/Weather.xml rename to json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/withprolog/boox.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/withprolog/boox.xml rename to json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml new file mode 100644 index 0000000..ffae1a1 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml @@ -0,0 +1,121 @@ + + + + Gambardella, Matthew + XML Developer's Guide + Computer + 44.95 + 2000-10-01 + An in-depth look at creating applications + with XML. + + + Ralls, Kim + Midnight Rain + Fantasy + 5.95 + 2000-12-16 + A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world. + + + Corets, Eva + Maeve Ascendant + Fantasy + 5.95 + 2000-11-17 + After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society. + + + Corets, Eva + Oberon's Legacy + Fantasy + 5.95 + 2001-03-10 + In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant. + + + Corets, Eva + The Sundered Grail + Fantasy + 5.95 + 2001-09-10 + The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy. + + + Randall, Cynthia + Lover Birds + Romance + 4.95 + 2000-09-02 + When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled. + + + Thurman, Paula + Splish Splash + Romance + 4.95 + 2000-11-02 + A deep sea diver finds true love twenty + thousand leagues beneath the sea. + + + Knorr, Stefan + Creepy Crawlies + Horror + 4.95 + 2000-12-06 + An anthology of horror stories about roaches, + centipedes, scorpions and other insects. + + + Kress, Peter + Paradox Lost + Science Fiction + 6.95 + 2000-11-02 + After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum. + + + O'Brien, Tim + Microsoft .NET: The Programming Bible + Computer + 36.95 + 2000-12-09 + Microsoft's .NET initiative is explored in + detail in this deep programmer's reference. + + + O'Brien, Tim + MSXML3: A Comprehensive Guide + Computer + 36.95 + 2000-12-01 + The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more. + + + Galos, Mike + Visual Studio 7: A Comprehensive Guide + Computer + 49.95 + 2001-04-16 + Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. + + + diff --git a/json/src/test/resources/roundtripTests/xml/source/withprolog/modes.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/withprolog/modes.xml rename to json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/withprolog/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/withprolog/purchaseOrder.xml rename to json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml b/json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml deleted file mode 100644 index 9133dba..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/withComments/modes.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml deleted file mode 100644 index 685d31c..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/withComments/purchaseOrder.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - Purchase order schema for Example.com. - Copyright 2000 Example.com. All rights reserved. - - - - - - - - - - - - - - - - - - - - - Purchase order schema for Example.Microsoft.com. - Copyright 2001 Example.Microsoft.com. All rights reserved. - - - Application info. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b35b1e8573e7a55d822882fa781caada5db5c7d4 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 09:56:37 +0100 Subject: [PATCH 23/30] Tests separated by files --- .../io/jvm/json/Json2XmlRoundTripTest.java | 139 ++++++++------ .../io/jvm/json/Xml2JsonRoundTripTest.java | 180 ++++++++++-------- 2 files changed, 175 insertions(+), 144 deletions(-) diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index c29c67d..0d55f0b 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -11,6 +11,9 @@ import java.io.File; import java.io.IOException; import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerConfigurationException; @@ -19,73 +22,85 @@ import org.json.JSONException; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; import org.skyscreamer.jsonassert.JSONAssert; import org.w3c.dom.Document; import org.xml.sax.SAXException; +@RunWith(Parameterized.class) public class Json2XmlRoundTripTest { - @Test - public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, - SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, - TransformerException, TransformerFactoryConfigurationError { - - final File jsonSources_dir = getFileForResource("/roundtripTests/json/source/"); - - for (final File jsonSourceFile : jsonSources_dir.listFiles()) { - if (jsonSourceFile.isFile()) { - System.out.println("Testiramo za datoteku: " + jsonSourceFile.getName()); - - /* Filename initialisation */ - final String sourceFilename_json = jsonSourceFile.getName(); - final String convertedFilename_xml = sourceFilename_json + ".xml"; - final String roundtripFilename_json = sourceFilename_json + ".xml.json"; - - final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" - + convertedFilename_xml); - assertTrue("The reference JSON file does not exist for: " + sourceFilename_json, - (referenceFile_xml != null && referenceFile_xml.exists())); - - final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" - + roundtripFilename_json); - assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_json, - (referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); - - /* Parse input files */ - final String source_json = stringFromFile(jsonSourceFile); - final Document referenceXml = parseXmlFile(referenceFile_xml); - final String referenceRoundTrip_json = stringFromFile(referenceRoundtripFile_json); - - /* Convert to XML and compare with reference conversion */ - final Document convertedXml = xmlDocumentFromJson(source_json); - // System.out.println("Converted XML:"); - // printXmlDocument(convertedXml); - // System.out.println("Reference XML:"); - // printXmlDocument(referenceXml); - assertXmlEquivalence("The converted XML does not match the reference XML", convertedXml, referenceXml); - - /* Convert back to Json, and compare with reference documents */ - final String roundtripJsonString = jsonStringFromXml(convertedXml); - - assertJsonEquivalence(roundtripJsonString, referenceRoundTrip_json); - assertJsonEquivalence(roundtripJsonString, source_json); - assertJsonEquivalence(referenceRoundTrip_json, source_json); - } - } - } - - private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { - System.out.println(); - System.out.println(lhs); - System.out.println(rhs); - System.out.println(); - JSONAssert.assertEquals(lhs, rhs, false); - } - - private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { - XmlBruteForceComparator comparator = new XmlBruteForceComparator(); - - assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); - } + File sourceFile; + + public Json2XmlRoundTripTest(String filename, File sourceFile) { + this.sourceFile = sourceFile; + } + + @Parameterized.Parameters(name="Testing on file: {0}") + public static Collection sourceFiles() throws URISyntaxException { + File[] sourceFilesArray = getFileForResource("/roundtripTests/json/source/").listFiles(); + + List sourceFilesList = new ArrayList(); + for (File f : sourceFilesArray) + if (f.isFile()) + sourceFilesList.add(new Object[] { f.getName(), f }); + + return sourceFilesList; + } + + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, + TransformerFactoryConfigurationError { + + File jsonSourceFile = this.sourceFile; + System.out.println("Testiramo za datoteku: " + jsonSourceFile.getName()); + + /* Filename initialisation */ + final String sourceFilename_json = jsonSourceFile.getName(); + final String convertedFilename_xml = sourceFilename_json + ".xml"; + final String roundtripFilename_json = sourceFilename_json + ".xml.json"; + + final File referenceFile_xml = getFileForResource("/roundtripTests/json/reference/" + convertedFilename_xml); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_json, + (referenceFile_xml != null && referenceFile_xml.exists())); + + final File referenceRoundtripFile_json = getFileForResource("/roundtripTests/json/reference/" + + roundtripFilename_json); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_json, + (referenceRoundtripFile_json != null && referenceRoundtripFile_json.exists())); + + /* Parse input files */ + final String source_json = stringFromFile(jsonSourceFile); + final Document referenceXml = parseXmlFile(referenceFile_xml); + final String referenceRoundTrip_json = stringFromFile(referenceRoundtripFile_json); + + /* Convert to XML and compare with reference conversion */ + final Document convertedXml = xmlDocumentFromJson(source_json); + assertXmlEquivalence("The converted XML does not match the reference XML", convertedXml, referenceXml); + + /* Convert back to Json, and compare with reference documents */ + final String roundtripJsonString = jsonStringFromXml(convertedXml); + + assertJsonEquivalence(roundtripJsonString, referenceRoundTrip_json); + assertJsonEquivalence(roundtripJsonString, source_json); + assertJsonEquivalence(referenceRoundTrip_json, source_json); + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { + System.out.println(); + System.out.println(lhs); + System.out.println(rhs); + System.out.println(); + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); + } } diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index e992e66..71df105 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -1,12 +1,20 @@ package io.jvm.json; +import static io.jvm.json.Helpers.getFileForResource; +import static io.jvm.json.Helpers.jsonStringFromXml; +import static io.jvm.json.Helpers.parseXmlFile; +import static io.jvm.json.Helpers.printXmlDocument; +import static io.jvm.json.Helpers.stringFromFile; +import static io.jvm.json.Helpers.xmlDocumentFromJson; import static org.junit.Assert.assertTrue; -import static io.jvm.json.Helpers.*; import io.jvm.xml.XmlBruteForceComparator; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerConfigurationException; @@ -15,90 +23,98 @@ import org.json.JSONException; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; import org.skyscreamer.jsonassert.JSONAssert; import org.w3c.dom.Document; import org.xml.sax.SAXException; +@RunWith(Parameterized.class) public class Xml2JsonRoundTripTest { - /** - * For each of the XML files in 'resources/roundtripTests/source/xml' - * generates the entire roundtrip conversion (xml -> json -> xml) using - * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML - * equivalence with the reference conversions (obtained by using Json.NET) - */ - @Test - public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, - SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, - TransformerException, TransformerFactoryConfigurationError { - - final File xmlSources_dir = getFileForResource("/roundtripTests/xml/source/"); - - for (final File xmlSourceFile : xmlSources_dir.listFiles()) { - if (xmlSourceFile.isFile()) { - System.out.println(); - System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); - /* Filename initialisation */ - final String sourceFilename_xml = xmlSourceFile.getName(); - final String convertedFilename_json = sourceFilename_xml + ".json"; - final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; - - final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/" - + convertedFilename_json); - assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, - (referenceFile_json != null && referenceFile_json.exists())); - - final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/" - + roundtripFilename_xml); - assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, - (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); - - /* Parse input files */ - final Document source_xml = parseXmlFile(xmlSourceFile); - final String referenceJson = stringFromFile(referenceFile_json); - final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); - - /* Convert to json and compare with reference conversion */ - final String convertedJson = jsonStringFromXml(source_xml); - - // System.out.println("Converted JSON:"); - // System.out.println(convertedJson); - // System.out.println("Reference JSON:"); - // System.out.println(referenceJson); - - assertJsonEquivalence(convertedJson, referenceJson); - - /* Convert back to XML, and compare with reference documents */ - final Document roundtripXmlDocument = xmlDocumentFromJson(convertedJson); - - System.out.println("Our roundtrip XML:"); - printXmlDocument(roundtripXmlDocument); - System.out.println("Reference roundtrip xml:"); - printXmlDocument(referenceRoundTrip_xml); - - assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML", - roundtripXmlDocument, referenceRoundTrip_xml); - assertXmlEquivalence("The roundtrip XML does not match the source XML", roundtripXmlDocument, - source_xml); - assertXmlEquivalence("The reference roundtrip XML does not match the source XML", - referenceRoundTrip_xml, source_xml); - } - } - } - - private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { - System.out.println(); - System.out.println("Checking JSon equivalence: "); - System.out.println(lhs); - System.out.println(rhs); - - JSONAssert.assertEquals(lhs, rhs, false); - } - - private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { - XmlBruteForceComparator comparator = new XmlBruteForceComparator(); - - assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); - } - -} \ No newline at end of file + File sourceFile; + + public Xml2JsonRoundTripTest(String filename, File sourceFile) { + this.sourceFile = sourceFile; + } + + @Parameterized.Parameters(name="Testing on file: {0}") + public static Collection sourceFiles() throws URISyntaxException { + File[] sourceFilesArray = getFileForResource("/roundtripTests/xml/source/").listFiles(); + + List sourceFilesList = new ArrayList(); + for (File f : sourceFilesArray) + if (f.isFile()) + sourceFilesList.add(new Object[] { f.getName(), f }); + + return sourceFilesList; + } + + /** + * For each of the XML files in 'resources/roundtripTests/source/xml' + * generates the entire roundtrip conversion (xml -> json -> xml) using + * io.jvm.json.serializers.XmlJsonSerializer, and asserts the generated XML + * equivalence with the reference conversions (obtained by using Json.NET) + */ + @Test + public void assertRoundTripEquivalenceWithReferenceConversion() throws URISyntaxException, JSONException, + SAXException, IOException, ParserConfigurationException, TransformerConfigurationException, TransformerException, + TransformerFactoryConfigurationError { + + File xmlSourceFile = this.sourceFile; + + System.out.println(); + System.out.println("Testiramo za datoteku: " + xmlSourceFile.getName()); + /* Filename initialisation */ + final String sourceFilename_xml = xmlSourceFile.getName(); + final String convertedFilename_json = sourceFilename_xml + ".json"; + final String roundtripFilename_xml = sourceFilename_xml + ".json.xml"; + + final File referenceFile_json = getFileForResource("/roundtripTests/xml/reference/" + convertedFilename_json); + assertTrue("The reference JSON file does not exist for: " + sourceFilename_xml, + (referenceFile_json != null && referenceFile_json.exists())); + + final File referenceRoundtripFile_xml = getFileForResource("/roundtripTests/xml/reference/" + roundtripFilename_xml); + assertTrue("The reference XML->JSON roundtrip file does not exist for: " + sourceFilename_xml, + (referenceRoundtripFile_xml != null && referenceRoundtripFile_xml.exists())); + + /* Parse input files */ + final Document source_xml = parseXmlFile(xmlSourceFile); + final String referenceJson = stringFromFile(referenceFile_json); + final Document referenceRoundTrip_xml = parseXmlFile(referenceRoundtripFile_xml); + + /* Convert to json and compare with reference conversion */ + final String convertedJson = jsonStringFromXml(source_xml); + assertJsonEquivalence(convertedJson, referenceJson); + + /* Convert back to XML, and compare with reference documents */ + final Document roundtripXmlDocument = xmlDocumentFromJson(convertedJson); + + System.out.println("Our roundtrip XML:"); + printXmlDocument(roundtripXmlDocument); + System.out.println("Reference roundtrip xml:"); + printXmlDocument(referenceRoundTrip_xml); + + assertXmlEquivalence("The reference roundtrip XML does not match the converted roundtrip XML", + roundtripXmlDocument, referenceRoundTrip_xml); + assertXmlEquivalence("The roundtrip XML does not match the source XML", roundtripXmlDocument, source_xml); + assertXmlEquivalence("The reference roundtrip XML does not match the source XML", referenceRoundTrip_xml, + source_xml); + } + + private static void assertJsonEquivalence(String lhs, String rhs) throws JSONException { + System.out.println(); + System.out.println("Checking JSon equivalence: "); + System.out.println(lhs); + System.out.println(rhs); + + JSONAssert.assertEquals(lhs, rhs, false); + } + + private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { + XmlBruteForceComparator comparator = new XmlBruteForceComparator(); + + assertTrue(message, comparator.compare(lhs.getDocumentElement(), rhs.getDocumentElement()) == 0); + } + +} From d78f05ef5ccce8eb58eaf49cabbcca167e9e3d7a Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 09:57:32 +0100 Subject: [PATCH 24/30] Removed XmlNamespaceManager --- .../json/serializers/XmlJsonSerializer.java | 889 ++++++++---------- 1 file changed, 390 insertions(+), 499 deletions(-) diff --git a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java index 5953d95..dd4a00b 100644 --- a/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java +++ b/json/src/main/java/io/jvm/json/serializers/XmlJsonSerializer.java @@ -2,11 +2,9 @@ import io.jvm.json.JsonSerializer; import io.jvm.json.JsonWriter; -import io.jvm.xml.XmlNamespaceManager; import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -25,548 +23,441 @@ */ public class XmlJsonSerializer implements JsonSerializer { - /* Interface methods */ - - @Override - public boolean isDefault(Element value) { - return false; + /* Interface methods */ + + @Override + public boolean isDefault(Element value) { + return false; + } + + @Override + public void toJson(JsonWriter jsonWriter, Element value) throws IOException { + if (value != null) + writeJson(jsonWriter, value); + } + + /* Implementation */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; + + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; + + // This is only a partial reimplementation, so the following fields are + // fixed and made private: + private final String deserializeRootElementName = null; + private final boolean writeArrayAttribute = false; + private final boolean omitRootObject = false; + + /* State info */ + private boolean needsComma = false; + private boolean writingObject = false; + private boolean writingArray = false; + + /** + * Write a Json representation of a given org.w3c.dom.Element. + * + * @param writer + * The writer to write to. + * @param element + * The element to be converted. + * @throws IOException + */ + private void writeJson(final JsonWriter writer, final Element element) throws IOException { + + trimWhitespaceTextNodes(element.getOwnerDocument()); + + if (!omitRootObject) + writeOpenObjectWithStateInfo(writer); + + // writeXmlDeclaration(writer,element.getOwnerDocument()); + + serializeNode(writer, element, !omitRootObject); + + if (!omitRootObject) + writeCloseObjectWithStateInfo(writer); + } + + /** + * Gets rid of whitespace text nodes, needed for + * compatibility with the Json.Net converter + */ + private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { + if (node != null && node.getChildNodes() != null) + for (int i = 0; i < node.getChildNodes().getLength(); i++) { + final org.w3c.dom.Node child = node.getChildNodes().item(i); + if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE && child.getNodeValue().trim().length() == 0) + node.removeChild(child); + trimWhitespaceTextNodes(node.getChildNodes().item(i)); + } + } + + /** + * Resolves the local name for {@code node} + */ + private String resolveLocalName(Node node) { + + if (node.getLocalName() == null && node.getPrefix() == null) + return node.getNodeName(); + else + return node.getLocalName(); + } + + /** + * Returns the full name of the given node, along with the namespace prefix + */ + private String resolveFullName(final Node node) { + + String prefix = node.getPrefix(); + String name = resolveLocalName(node); + + String fullName = (prefix==null?"":prefix) + name; + + return fullName; + } + + /** + * Returns one of the string constants names for the type of the given node + * type. throws IOException if type is unknown. + * + * @throws IOException + */ + private String getPropertyName(final Node node) throws IOException { + switch (node.getNodeType()) { + case Node.ATTRIBUTE_NODE: + if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) + return "$" + resolveLocalName(node); + else + return "@" + resolveFullName(node); + case Node.CDATA_SECTION_NODE: + return cDataNodeTag; + case Node.COMMENT_NODE: + return commentNodeTag; + case Node.ELEMENT_NODE: + return resolveFullName(node); + case Node.PROCESSING_INSTRUCTION_NODE: + return "?" + resolveFullName(node); + // XXX: The .NET System.Xml.XmlNodeType and org.w3c.dom.Node + // enumerations are not mapped 1:1 + // case Node.XmlDeclaration: + // return DeclarationName; + // case Node.SignificantWhitespace: + // return SignificantWhitespaceName; + case Node.TEXT_NODE: + return textNodeTag; + // case Node.Whitespace: + // return WhitespaceName; + default: + throw new IOException("Unexpected Node when getting node name: " + node.getNodeType()); } - - @Override - public void toJson(JsonWriter jsonWriter, Element value) throws IOException { - if (value != null) - writeJson(jsonWriter, value); + } + + /** + * Returns true if this node has the property json:Array from jsonNamespaceUri + * set to 'true', false otherwise + * + * TODO: not tested, since we skip the namespace declaration test this if needed + */ + private boolean isArray(final Node node) { + final NamedNodeMap attributes = node.getAttributes(); + + if (attributes == null || attributes.getLength() == 0) + return false; + else { + /* + * Return true the attribute json:Array from the jsonNamespaceUri is + * 'true': + */ + for (int i = 0; i < attributes.getLength(); i++) { + final Attr attribute = (Attr) attributes.item(i); + if (equalsWithNull(attribute.getNamespaceURI(), jsonNamespaceUri) + && equalsWithNull(resolveLocalName(attribute), jsonArrayAttribute) + && Boolean.parseBoolean(attribute.getValue())) + return true; + } } - /* Implementation */ - private final String textNodeTag = "#text"; - private final String commentNodeTag = "#comment"; - private final String cDataNodeTag = "#cdata-section"; - private final String whitespaceNodeTag = "#whitespace"; - private final String significantWhitespaceNodeTag = "#significant-whitespace"; - private final String declarationNodeTag = "?xml"; - private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; - private final String xmlnsPrefix = "xmlns"; - - private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; - private final String jsonArrayAttribute = "Array"; - - // This is only a partial reimplementation, so the following fields are - // fixed and made private: - private final String deserializeRootElementName = null; - private final boolean writeArrayAttribute = false; - private final boolean omitRootObject = false; - - /* State info */ - private boolean needsComma = false; - private boolean writingObject = false; - private boolean writingArray = false; - - /** - * Write a Json representation of a given org.w3c.dom.Element. - * - * @param writer - * The writer to write to. - * @param element - * The element to be converted. - * @throws IOException - */ - private void writeJson(final JsonWriter writer, final Element element) - throws IOException { + return false; + } - trimWhitespaceTextNodes(element.getOwnerDocument()); + /** + * For a given root node returns a map grouping all it's children by node + * name; Map If the node has no children, an + * empty map is returned. + * + * @throws IOException + */ + private Map> getNodesGroupedByName(final Node root) + throws IOException { - final XmlNamespaceManager manager = new XmlNamespaceManager(); - pushParentNamespaces(element, manager); + final Map> nodesGroupedByName = new HashMap>(); - if (!omitRootObject) - writeOpenObjectWithStateInfo(writer); + final NodeList children = root.getChildNodes(); - // writeXmlDeclaration(writer,element.getOwnerDocument(),manager); + for (int i = 0; i < children.getLength(); i++) { + /* Get the i-th child */ + final Node child = children.item(i); - serializeNode(writer, element, manager, !omitRootObject); - - if (!omitRootObject) - writeCloseObjectWithStateInfo(writer); - } + /* Get the name of the current child */ + String nodeName = getPropertyName(child); - private static void trimWhitespaceTextNodes(final org.w3c.dom.Node node) { - if (node != null && node.getChildNodes() != null) - for (int i = 0; i < node.getChildNodes().getLength(); i++) { - final org.w3c.dom.Node child = node.getChildNodes().item(i); - if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE - && child.getNodeValue().trim().length() == 0) - node.removeChild(child); - trimWhitespaceTextNodes(node.getChildNodes().item(i)); - } - } + /* + * If the node list is not instantiated for this nodeName, make an + * instance + */ + if (nodesGroupedByName.get(nodeName) == null) + nodesGroupedByName.put(nodeName, new ArrayList()); - private void pushParentNamespaces(final Element element, - final XmlNamespaceManager manager) { - final List parentElements = new ArrayList(); - - /* Collect all ancestors from the document tree for the current element */ - Node parent = element; - while (parent.getParentNode() != null) { - parent = parent.getParentNode(); - if (parent.getNodeType() == Node.ELEMENT_NODE) - parentElements.add((Element) parent); - } - - /* If the current element has ancestors */ - if (parentElements.isEmpty() == false) { - - /* - * Add a namespace scope for each ancestor of the current node, top - * to bottom - */ - Collections.reverse(parentElements); - for (final Element parentElement : parentElements) { - - manager.pushScope(); - - /* - * Find if there are any namespace attributes, and add them to - * the current namespace scope - */ - final NamedNodeMap attributes = parentElement.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - final Attr attribute = (Attr) attributes.item(i); - if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL) - && (equalsWithNull(resolveLocalName(attribute), - xmlnsPrefix) == false)) { - manager.addNamespace(resolveLocalName(attribute), - attribute.getValue()); - } - } - } - } + /* Add the node to the list for this nodeName */ + nodesGroupedByName.get(nodeName).add(child); } - private String resolveLocalName(Node node) { + return nodesGroupedByName; + } - if (node.getLocalName() == null && node.getPrefix() == null) - return node.getNodeName(); - else - return node.getLocalName(); - } + /** + * Writes a Json array + */ + private void serializeArray(final JsonWriter writer, final String nameOfTheElements, final List nodes, boolean writePropertyName) throws IOException { - /** - * Returns the full name of the given node, along with the prefix resolved - * from the namespace manager - */ - private String resolveFullName(final Node node, - final XmlNamespaceManager manager) { - - String prefix; - String fullName; - - /* - * If it's an xmlns node with the default xmlnsURL namespace, prefix is - * null, otherwise we pull it out from the namespace manager - */ - if (node.getNamespaceURI() == null - || (equalsWithNull(resolveLocalName(node), xmlnsPrefix) && equalsWithNull( - node.getNamespaceURI(), xmlnsURL))) - prefix = null; - else - prefix = manager.lookupPrefix(node.getNamespaceURI()); - - /* - * If the prefix is null or empty we return just the local name, without - * any prepended prefix - */ - if (prefix == null || equalsWithNull(prefix, "")) - fullName = resolveLocalName(node); - /* Otherwise we return the full prefix:localName string */ - else - fullName = prefix + ":" + resolveLocalName(node); - - return fullName; + if (writePropertyName) { + writePropertyNameAndColon(writer, nameOfTheElements); } - /** - * Returns one of the string constants names for the type of the given node - * type. throws IOException if type is unknown. - * - * @throws IOException - */ - private String getPropertyName(final Node node, - final XmlNamespaceManager manager) throws IOException { - switch (node.getNodeType()) { - case Node.ATTRIBUTE_NODE: - if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) - return "$" + resolveLocalName(node); - else - return "@" + resolveFullName(node, manager); - case Node.CDATA_SECTION_NODE: - return cDataNodeTag; - case Node.COMMENT_NODE: - return commentNodeTag; - case Node.ELEMENT_NODE: - return resolveFullName(node, manager); - case Node.PROCESSING_INSTRUCTION_NODE: - return "?" + resolveFullName(node, manager); - // XXX: The .NET System.Xml.XmlNodeType and org.w3c.dom.Node - // enumerations are not mapped 1:1 - // case Node.XmlDeclaration: - // return DeclarationName; - // case Node.SignificantWhitespace: - // return SignificantWhitespaceName; - case Node.TEXT_NODE: - return textNodeTag; - // case Node.Whitespace: - // return WhitespaceName; - default: - throw new IOException("Unexpected Node when getting node name: " - + node.getNodeType()); - } - } + writeOpenArrayWithStateInfo(writer); - /** - * Returns true if this node has the property json:Array from - * jsonNamespaceUri set to 'true', false otherwise - */ - private boolean isArray(final Node node) { - final NamedNodeMap attributes = node.getAttributes(); - - if (attributes == null || attributes.getLength() == 0) - return false; - else { - /* - * Return true the attribute json:Array from the jsonNamespaceUri is - * 'true': - */ - for (int i = 0; i < attributes.getLength(); i++) { - final Attr attribute = (Attr) attributes.item(i); - if (equalsWithNull(attribute.getNamespaceURI(), - jsonNamespaceUri) - && equalsWithNull(resolveLocalName(attribute), - jsonArrayAttribute) - && Boolean.parseBoolean(attribute.getValue())) - return true; - } - } - - return false; + for (int i = 0; i < nodes.size(); i++) { + serializeNode(writer, nodes.get(i), false); } - /** - * For a given root node returns a map grouping all it's children by node - * name; Map If the node has no children, - * an empty map is returned. - * - * @throws IOException - */ - private Map> getNodesGroupedByName(final Node root, - final XmlNamespaceManager manager) throws IOException { - - final Map> nodesGroupedByName = new HashMap>(); - - final NodeList children = root.getChildNodes(); - - for (int i = 0; i < children.getLength(); i++) { - /* Get the i-th child */ - final Node child = children.item(i); + writeCloseArrayWithStateInfo(writer); + } - /* Get the name of the current child */ - String nodeName = getPropertyName(child, manager); + /** + * True if all children's local name is equal to node's local name. + * + * Used only for force-writing Json arrays - not tested TODO: + */ + private boolean allChildrenHaveSameLocalName(final Node node) { - /* - * If the node list is not instantiated for this nodeName, make an - * instance - */ - if (nodesGroupedByName.get(nodeName) == null) - nodesGroupedByName.put(nodeName, new ArrayList()); + final NodeList children = node.getChildNodes(); - /* Add the node to the list for this nodeName */ - nodesGroupedByName.get(nodeName).add(child); - } - - return nodesGroupedByName; + for (int i = 0; i < children.getLength(); i++) { + final Node child = children.item(i); + if (equalsWithNull(resolveLocalName(child), resolveLocalName(node)) == false) + return false; } - private void serializeArray(final JsonWriter writer, - final String nameOfTheElements, final List nodes, - final XmlNamespaceManager manager, boolean writePropertyName) - throws IOException { - - if (writePropertyName) { - writePropertyNameAndColon(writer, nameOfTheElements); - } - - writeOpenArrayWithStateInfo(writer); - - for (int i = 0; i < nodes.size(); i++) { - serializeNode(writer, nodes.get(i), manager, false); - } - - writeCloseArrayWithStateInfo(writer); + return true; + } + + @Deprecated + private void writeXmlDeclaration(final JsonWriter writer, final Document document) + throws IOException { + /* Deserializirat deklaraciju, iako ovo zvuči krivo staviti ovdje */ + writePropertyNameAndColon(writer, declarationNodeTag); + writeOpenObjectWithStateInfo(writer); + if (document.getXmlVersion() != null) { + writePropertyNameAndColon(writer, "@version"); + writePropertyValue(writer, document.getXmlVersion()); } - - /** - * True if all children's local name is equal to node's local name. - */ - private boolean allChildrenHaveSameLocalName(final Node node) { - - final NodeList children = node.getChildNodes(); - - for (int i = 0; i < children.getLength(); i++) { - final Node child = children.item(i); - if (equalsWithNull(resolveLocalName(child), resolveLocalName(node)) == false) - return false; - } - - return true; + writer.writeComma(); + if (document.getXmlVersion() != null) { + writePropertyNameAndColon(writer, "@encoding"); + writePropertyValue(writer, document.getXmlEncoding()); } - - @Deprecated - // /XXX: incomplete, does not add a comma after closing tag - private void writeXmlDeclaration(final JsonWriter writer, - final Document document, final XmlNamespaceManager manager) - throws IOException { - /* Deserializirat deklaraciju, iako ovo zvuči krivo staviti ovdje */ - writePropertyNameAndColon(writer, declarationNodeTag); - writeOpenObjectWithStateInfo(writer); - if (document.getXmlVersion() != null) { - writePropertyNameAndColon(writer, "@version"); - writePropertyValue(writer, document.getXmlVersion()); - } - writer.writeComma(); - if (document.getXmlVersion() != null) { - writePropertyNameAndColon(writer, "@encoding"); - writePropertyValue(writer, document.getXmlEncoding()); - } - writer.writeComma(); - if (document.getXmlVersion() != null) { - writePropertyNameAndColon(writer, "@standalone"); - writePropertyValue(writer, document.getXmlStandalone() ? "yes" - : "no"); - } - writeCloseObjectWithStateInfo(writer); + writer.writeComma(); + if (document.getXmlVersion() != null) { + writePropertyNameAndColon(writer, "@standalone"); + writePropertyValue(writer, document.getXmlStandalone() ? "yes" : "no"); } - - private void serializeNode(final JsonWriter writer, final Node node, - final XmlNamespaceManager manager, final boolean writePropertyName) - throws IOException { - switch (node.getNodeType()) { - case Node.DOCUMENT_NODE: - case Node.DOCUMENT_FRAGMENT_NODE: - serializeGroupedNodes(writer, node, manager, writePropertyName); - break; - case Node.ELEMENT_NODE: - if (node.hasChildNodes() && isArray(node) - && allChildrenHaveSameLocalName(node)) - serializeGroupedNodes(writer, node, manager, false); - else { - - /* - * Add a new namespace scope and look for namespace attributes - * to add - */ - manager.pushScope(); - - final NamedNodeMap attributes = node.getAttributes(); - for (int i = 0; i < attributes.getLength(); i++) { - - final Attr attribute = (Attr) attributes.item(i); - - if (equalsWithNull(attribute.getNamespaceURI(), xmlnsURL)) { - - if (equalsWithNull(resolveLocalName(attribute), - xmlnsPrefix)) - manager.addNamespace("", attribute.getValue()); - else - manager.addNamespace(resolveLocalName(attribute), - attribute.getValue()); - - } - } - - if (writePropertyName) { - writePropertyNameAndColon(writer, - getPropertyName(node, manager)); - } - - if (hasSingleTextChild(node)) - writePropertyValue(writer, node.getChildNodes().item(0).getNodeValue()); - else if (nodeIsEmpty(node)) { - writer.writeNull(); - } else { - writeOpenObjectWithStateInfo(writer); - - /* First serialize the attributes */ - - for (int i = 0; i < node.getAttributes().getLength(); i++) - serializeNode(writer, node.getAttributes().item(i), - manager, true); - - /* Then serialize the nodes by groups */ - serializeGroupedNodes(writer, node, manager, true); - - writeCloseObjectWithStateInfo(writer); - } - - manager.popScope(); - } - break; - case Node.COMMENT_NODE: // Different than in Json.NET, since there - // comments are serialized as JavaScript - // comments '/*...*/' - case Node.ATTRIBUTE_NODE: - case Node.TEXT_NODE: - case Node.CDATA_SECTION_NODE: - case Node.PROCESSING_INSTRUCTION_NODE: - if (equalsWithNull(node.getNamespaceURI(), xmlnsURL) - && equalsWithNull(node.getNodeValue(), jsonNamespaceUri)) - return; - - if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) { - if (equalsWithNull(resolveLocalName(node), jsonArrayAttribute)) - return; - } - - if (writePropertyName) { - writePropertyNameAndColon(writer, - getPropertyName(node, manager)); - } - writePropertyValue(writer, node.getNodeValue()); - - break; - // Not covered by org.w2c.dom specs: - // case XmlNodeType.Whitespace: <-- handled by TEXT_NODE - // case XmlNodeType.SignificantWhitespace: <-- handled by TEXT_NODE - // XmlDeclaration is skipped, since we are converting only xml nodes, - // never entire documents - default: - throw new IOException( - "Unexpected XmlNodeType when serializing nodes: " - + node.getNodeType()); - } - + writeCloseObjectWithStateInfo(writer); + } + + private void serializeNode(final JsonWriter writer, final Node node, + final boolean writePropertyName) throws IOException { + switch (node.getNodeType()) { + case Node.DOCUMENT_NODE: + case Node.DOCUMENT_FRAGMENT_NODE: + serializeGroupedNodes(writer, node, writePropertyName); + break; + case Node.ELEMENT_NODE: + if (node.hasChildNodes() && isArray(node) && allChildrenHaveSameLocalName(node)) + serializeGroupedNodes(writer, node, false); + else { + + if (writePropertyName) { + writePropertyNameAndColon(writer, getPropertyName(node)); + } + + if (hasSingleTextChild(node)) + writePropertyValue(writer, node.getChildNodes().item(0).getNodeValue()); + else if (nodeIsEmpty(node)) { + writer.writeNull(); + } else { + writeOpenObjectWithStateInfo(writer); + + /* First serialize the attributes */ + + for (int i = 0; i < node.getAttributes().getLength(); i++) + serializeNode(writer, node.getAttributes().item(i), true); + + /* Then serialize the nodes by groups */ + serializeGroupedNodes(writer, node, true); + + writeCloseObjectWithStateInfo(writer); + } + } + break; + case Node.COMMENT_NODE: // Different than in Json.NET, since there + // comments are serialized as JavaScript + // comments '/*...*/' + case Node.ATTRIBUTE_NODE: + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + if (equalsWithNull(node.getNamespaceURI(), xmlnsURL) && equalsWithNull(node.getNodeValue(), jsonNamespaceUri)) + return; + + if (equalsWithNull(node.getNamespaceURI(), jsonNamespaceUri)) { + if (equalsWithNull(resolveLocalName(node), jsonArrayAttribute)) + return; + } + + if (writePropertyName) { + writePropertyNameAndColon(writer, getPropertyName(node)); + } + writePropertyValue(writer, node.getNodeValue()); + + break; + // Not covered by org.w2c.dom specs: + // case XmlNodeType.Whitespace: <-- handled by TEXT_NODE + // case XmlNodeType.SignificantWhitespace: <-- handled by TEXT_NODE + // XmlDeclaration is skipped, since we are converting only xml nodes, + // never entire documents + default: + throw new IOException("Unexpected XmlNodeType when serializing nodes: " + node.getNodeType()); } - private boolean hasSingleTextChild(final Node node) { - return hasNoValueAttributes(node) - && node.getChildNodes().getLength() == 1 - && node.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE; - } + } - private boolean hasNoValueAttributes(final Node node) { + private boolean hasSingleTextChild(final Node node) { + return hasNoValueAttributes(node) && node.getChildNodes().getLength() == 1 + && node.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE; + } - final NamedNodeMap attributes = node.getAttributes(); + private boolean hasNoValueAttributes(final Node node) { - for (int i = 0; i < attributes.getLength(); i++) { - final Attr attr = (Attr) attributes.item(i); + final NamedNodeMap attributes = node.getAttributes(); - if (attr.getNamespaceURI() != jsonNamespaceUri) - return false; - } + for (int i = 0; i < attributes.getLength(); i++) { + final Attr attr = (Attr) attributes.item(i); - return true; + if (attr.getNamespaceURI() != jsonNamespaceUri) + return false; } - private boolean nodeIsEmpty(final Node node) { - return (!node.hasChildNodes()) && (!node.hasAttributes()); - } + return true; + } - private void serializeGroupedNodes(final JsonWriter writer, - final Node node, final XmlNamespaceManager manager, - final boolean writePropertyName) throws IOException { - - final Map> nodesGroupedByName = getNodesGroupedByName( - node, manager); - - /* - * Loop through grouped nodes. write single name instances as normal, - * write multiple names together in an array - */ - for (Map.Entry> nameNodesMapping : nodesGroupedByName - .entrySet()) { - - final String name = nameNodesMapping.getKey(); - final List nodesHavingName = nameNodesMapping.getValue(); - - /* By default we don't write nodes as arrays */ - boolean writeAsArray = false; - - /* - * All groups of nodes are written as arrays, while single nodes are - * written as an array only if they have the Array attribute set - */ - if (nodesHavingName.size() == 1) - writeAsArray = isArray(nodesHavingName.get(0)); - else - writeAsArray = true; - - if (!writeAsArray) - serializeNode(writer, nodesHavingName.get(0), manager, - writePropertyName); - else - serializeArray(writer, name, nodesHavingName, manager, - writePropertyName); - - } - } + private boolean nodeIsEmpty(final Node node) { + return (!node.hasChildNodes()) && (!node.hasAttributes()); + } - private boolean equalsWithNull(Object lhs, Object rhs) { - if (lhs == null && rhs == null) - return true; - else if (lhs == null || rhs == null) - return false; - else - return lhs.equals(rhs); - } + private void serializeGroupedNodes(final JsonWriter writer, final Node node, + final boolean writePropertyName) throws IOException { - private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException { - if (needsComma) { - writer.writeComma(); - needsComma = false; - } - } + final Map> nodesGroupedByName = getNodesGroupedByName(node); - private void writePropertyNameAndColon(JsonWriter writer, - String propertyName) throws IOException { - writeStringWithStateInfo(writer, propertyName); - writer.writeColon(); - } + /* + * Loop through grouped nodes. write single name instances as normal, write + * multiple names together in an array + */ + for (Map.Entry> nameNodesMapping : nodesGroupedByName.entrySet()) { - private void writePropertyValue(JsonWriter writer, String propertyValue) - throws IOException { - if(writingArray) - writeCommaIfNeedsComma(writer); - writer.writeString(propertyValue); - needsComma = true; - } + final String name = nameNodesMapping.getKey(); + final List nodesHavingName = nameNodesMapping.getValue(); - private void writeStringWithStateInfo(JsonWriter writer, String text) - throws IOException { - writeCommaIfNeedsComma(writer); - writer.writeString(text); - } + /* By default we don't write nodes as arrays */ + boolean writeAsArray = false; - private void writeOpenObjectWithStateInfo(JsonWriter writer) throws IOException { - writingObject=true; - writeCommaIfNeedsComma(writer); - writer.writeOpenObject(); - } + /* + * All groups of nodes are written as arrays, while single nodes are + * written as an array only if they have the Array attribute set + */ + if (nodesHavingName.size() == 1) + writeAsArray = isArray(nodesHavingName.get(0)); + else + writeAsArray = true; - private void writeOpenArrayWithStateInfo(JsonWriter writer) throws IOException { - writingArray=true; - writeCommaIfNeedsComma(writer); - writer.writeOpenArray(); - } + if (!writeAsArray) + serializeNode(writer, nodesHavingName.get(0), writePropertyName); + else + serializeArray(writer, name, nodesHavingName, writePropertyName); - private void writeCloseObjectWithStateInfo(JsonWriter writer) - throws IOException { - writingObject=false; - needsComma = true; - writer.writeCloseObject(); } - - private void writeCloseArrayWithStateInfo(JsonWriter writer) throws IOException { - writingArray=false; - needsComma = true; - writer.writeCloseArray(); + } + + private boolean equalsWithNull(Object lhs, Object rhs) { + if (lhs == null && rhs == null) + return true; + else if (lhs == null || rhs == null) + return false; + else + return lhs.equals(rhs); + } + + private void writeCommaIfNeedsComma(JsonWriter writer) throws IOException { + if (needsComma) { + writer.writeComma(); + needsComma = false; } + } + + private void writePropertyNameAndColon(JsonWriter writer, String propertyName) throws IOException { + writeStringWithStateInfo(writer, propertyName); + writer.writeColon(); + } + + private void writePropertyValue(JsonWriter writer, String propertyValue) throws IOException { + if (writingArray) + writeCommaIfNeedsComma(writer); + writer.writeString(propertyValue); + needsComma = true; + } + + private void writeStringWithStateInfo(JsonWriter writer, String text) throws IOException { + writeCommaIfNeedsComma(writer); + writer.writeString(text); + } + + private void writeOpenObjectWithStateInfo(JsonWriter writer) throws IOException { + writingObject = true; + writeCommaIfNeedsComma(writer); + writer.writeOpenObject(); + } + + private void writeOpenArrayWithStateInfo(JsonWriter writer) throws IOException { + writingArray = true; + writeCommaIfNeedsComma(writer); + writer.writeOpenArray(); + } + + private void writeCloseObjectWithStateInfo(JsonWriter writer) throws IOException { + writingObject = false; + needsComma = true; + writer.writeCloseObject(); + } + + private void writeCloseArrayWithStateInfo(JsonWriter writer) throws IOException { + writingArray = false; + needsComma = true; + writer.writeCloseArray(); + } } From cc5d96de1c0524c430458779cf38c1c8cce5ff28 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 09:58:59 +0100 Subject: [PATCH 25/30] Deprecated --- .../java/io/jvm/xml/XmlNamespaceManager.java | 215 +++++++++--------- 1 file changed, 108 insertions(+), 107 deletions(-) diff --git a/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java index 41c53d1..4291a8d 100644 --- a/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java +++ b/json/src/main/java/io/jvm/xml/XmlNamespaceManager.java @@ -10,115 +10,116 @@ * An ad-hoc implementation of an XmlNamespaceManager. * Provides operations for adding/removing and resolving namespaces, * and scope management. - * + * * Partially mirrors the functionality of .NET's System.Xml.XmlNamespaceManager. - * + * * Used for the implementation of XmlJsonSerializer and XmlJsonDeserializer. */ -public class XmlNamespaceManager { - - /* Fields */ - - /** - * A stack of namespace prefix:uri mappings - */ - private Deque> xmlNamespaceScopes; - - /* Properties */ - - private String defaultNamespace=""; - - /** - * The default namespace URI if exists, otherwise an empty string - */ - public String getDefaultNamespace() { - return defaultNamespace; - } - - public void setDefaultNamespace(String defaultNamespace) { - this.defaultNamespace = defaultNamespace; - } - - /* Methods */ - - public XmlNamespaceManager(){ - xmlNamespaceScopes = new ArrayDeque>(); - } - - public void pushScope(){ - xmlNamespaceScopes.push(new HashMap()); - } - - public Map popScope(){ - return xmlNamespaceScopes.pop(); - } - - /** - * Add a namespace to the current namespace context - */ - public void addNamespace(String prefix, String uri){ - getCurrentScope().put(prefix, uri); - } - - /** - * Remove a namespace from the current namespace context - */ - public void removeNamespace(String prefix, String uri){ - getCurrentScope().remove(prefix); - } - - /** - * Gets the namespace URI in the current scope for the given prefix. - * If the prefix is an empty string, returns the default namespace - */ - public String lookupNamespace(String prefix){ - if(prefix=="") - return getDefaultNamespace(); - else - return getCurrentScope().get(prefix); - } - - /** - * Finds the first prefix for a given URI in the current scope and returns - * it if it exists, otherwise returns "". If the URI is null, returns null. - */ - public String lookupPrefix(String uri) { - if (uri == null) - return null; - else { - Map namespaceScope = xmlNamespaceScopes.peek(); - - for (Entry entry : namespaceScope.entrySet()) { - if (uri.equals(entry.getValue())) - return entry.getKey(); - } - return ""; - } - } - - /** - - * The given prefix has a namespace defined for current scope - */ - public boolean hasNamespace(String prefix){ - return getCurrentScope().get(prefix) != null; - } - - /* Private methods */ - - private Map getCurrentScope(){ - return xmlNamespaceScopes.peek(); - } - - /* TODOs */ - // Not reimplemented from .NET's System.Xml.*: - // Data types: - // - NameTable - // - XmlNamespaceScope - // Constructors: - // - XmlNamespaceManager(NameTable) - // Methods: - // - getNamespacesInScope - // - getEnumerator +@Deprecated +public class XmlNamespaceManager { + + /* Fields */ + + /** + * A stack of namespace prefix:uri mappings + */ + private Deque> xmlNamespaceScopes; + + /* Properties */ + + private String defaultNamespace=""; + + /** + * The default namespace URI if exists, otherwise an empty string + */ + public String getDefaultNamespace() { + return defaultNamespace; + } + + public void setDefaultNamespace(String defaultNamespace) { + this.defaultNamespace = defaultNamespace; + } + + /* Methods */ + + public XmlNamespaceManager(){ + xmlNamespaceScopes = new ArrayDeque>(); + } + + public void pushScope(){ + xmlNamespaceScopes.push(new HashMap()); + } + + public Map popScope(){ + return xmlNamespaceScopes.pop(); + } + + /** + * Add a namespace to the current namespace context + */ + public void addNamespace(String prefix, String uri){ + getCurrentScope().put(prefix, uri); + } + + /** + * Remove a namespace from the current namespace context + */ + public void removeNamespace(String prefix, String uri){ + getCurrentScope().remove(prefix); + } + + /** + * Gets the namespace URI in the current scope for the given prefix. + * If the prefix is an empty string, returns the default namespace + */ + public String lookupNamespace(String prefix){ + if(prefix=="") + return getDefaultNamespace(); + else + return getCurrentScope().get(prefix); + } + + /** + * Finds the first prefix for a given URI in the current scope and returns + * it if it exists, otherwise returns "". If the URI is null, returns null. + */ + public String lookupPrefix(String uri) { + if (uri == null) + return null; + else { + Map namespaceScope = xmlNamespaceScopes.peek(); + + for (Entry entry : namespaceScope.entrySet()) { + if (uri.equals(entry.getValue())) + return entry.getKey(); + } + return ""; + } + } + + /** + + * The given prefix has a namespace defined for current scope + */ + public boolean hasNamespace(String prefix){ + return getCurrentScope().get(prefix) != null; + } + + /* Private methods */ + + private Map getCurrentScope(){ + return xmlNamespaceScopes.peek(); + } + + /* TODOs */ + // Not reimplemented from .NET's System.Xml.*: + // Data types: + // - NameTable + // - XmlNamespaceScope + // Constructors: + // - XmlNamespaceManager(NameTable) + // Methods: + // - getNamespacesInScope + // - getEnumerator } From b3596416ab79d6d243b86ca631d8cc6548bc6e67 Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 10:00:18 +0100 Subject: [PATCH 26/30] Few tweaks --- .../deserializers/XmlJsonDeserializer.java | 448 +++++++++--------- 1 file changed, 223 insertions(+), 225 deletions(-) diff --git a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java index f031e4e..d4260a7 100644 --- a/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java +++ b/json/src/main/java/io/jvm/json/deserializers/XmlJsonDeserializer.java @@ -17,249 +17,247 @@ public class XmlJsonDeserializer implements JsonDeserializer { - private static final Document[] ZERO_ARRAY = new Document[0]; - - /* Implementation */ - /* Special tags */ - private final String textNodeTag = "#text"; - private final String commentNodeTag = "#comment"; - private final String cDataNodeTag = "#cdata-section"; - private final String whitespaceNodeTag = "#whitespace"; - private final String significantWhitespaceNodeTag = "#significant-whitespace"; - private final String declarationNodeTag = "?xml"; - - private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; - private final String xmlnsPrefix = "xmlns"; - - private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; - private final String jsonArrayAttribute = "Array"; - - @Override - public Document[] getZeroArray() { - return ZERO_ARRAY; - } + private static final Document[] ZERO_ARRAY = new Document[0]; - /** - * Constructs an {@link org.w3c.dom.Document} object using the given - * {@link io.jvm.json.JsonReader} - * - * @return The constructed {@link org.w3c.dom.Document} object - * @throws IOException - */ - @Override - public Document fromJson(final JsonReader reader) throws IOException { + /* Implementation */ + /* Special tags */ + private final String textNodeTag = "#text"; + private final String commentNodeTag = "#comment"; + private final String cDataNodeTag = "#cdata-section"; + private final String whitespaceNodeTag = "#whitespace"; + private final String significantWhitespaceNodeTag = "#significant-whitespace"; + private final String declarationNodeTag = "?xml"; - Document document; + private final String xmlnsURL = "http://www.w3.org/2000/xmlns/"; + private final String xmlnsPrefix = "xmlns"; - try { - document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + private final String jsonNamespaceUri = "http://james.newtonking.com/projects/json"; + private final String jsonArrayAttribute = "Array"; - /* The document must have a single Json node */ - reader.assertReadToken('{'); + @Override + public Document[] getZeroArray() { + return ZERO_ARRAY; + } - /* The first element is the root node */ - String rootElementName = reader.readString(); + /** + * Constructs an {@link org.w3c.dom.Document} object using the given + * {@link io.jvm.json.JsonReader} + * + * @return The constructed {@link org.w3c.dom.Document} object + * @throws IOException + */ + @Override + public Document fromJson(final JsonReader reader) throws IOException { - Element root = document.createElement(rootElementName); - document.appendChild(root); + Document document; - reader.assertReadToken(':'); + try { + document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); - buildNodeValueSubtree(document, root, reader); + /* The document must have a single Json node */ + reader.assertReadToken('{'); - reader.assertReadToken('}'); - reader.consumeWhitespaces(); - reader.assertEndOfStream(); - } catch (ParserConfigurationException ex) { - document = null; // TODO: Handle the exception, this is just until - // we implement the deserializer - } + /* The first element is the root node */ + String rootElementName = reader.readString(); - return document; - } + Element root = document.createElement(rootElementName); + document.appendChild(root); - private boolean valueIsObject(JsonReader reader) throws IOException { - return reader.readToken() == '{'; - } + reader.assertReadToken(':'); - private boolean valueIsArray(JsonReader reader) throws IOException { - return reader.readToken() == '['; - } + buildNodeValueSubtree(document, root, reader); - private boolean isTextContentNode(Node node) { - return (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.COMMENT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE); + reader.assertReadToken('}'); + reader.consumeWhitespaces(); + reader.assertEndOfStream(); + } catch (ParserConfigurationException ex) { + document = null; // TODO: Handle the exception } - private void buildTextValue(Document document, Node node, JsonReader reader) throws IOException { - switch (reader.readToken()) { - case '"': - /* String */ - if (isTextContentNode(node)) { - node.setNodeValue(reader.readString()); - } else - node.appendChild(document.createTextNode(reader.readString())); - break; - case 't': - /* true */ - node.setNodeValue(new Boolean(reader.readTrue()).toString()); - break; - case 'f': - /* false */ - node.setNodeValue(new Boolean(reader.readFalse()).toString()); - break; - case 'n': - /* null */ - reader.readNull(); - node.setNodeValue(null); - break; - default: - /* Number or invalid */ - node.setNodeValue(reader.readRawNumber(new StringBuilder()).toString()); - break; - } + return document; + } + + private boolean valueIsObject(JsonReader reader) throws IOException { + return reader.readToken() == '{'; + } + + private boolean valueIsArray(JsonReader reader) throws IOException { + return reader.readToken() == '['; + } + + private boolean isTextContentNode(Node node) { + return (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.COMMENT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE); + } + + private void buildTextValue(Document document, Node node, JsonReader reader) throws IOException { + switch (reader.readToken()) { + case '"': + /* String */ + if (isTextContentNode(node)) { + node.setNodeValue(reader.readString()); + } else + node.appendChild(document.createTextNode(reader.readString())); + break; + case 't': + /* true */ + node.setNodeValue(new Boolean(reader.readTrue()).toString()); + break; + case 'f': + /* false */ + node.setNodeValue(new Boolean(reader.readFalse()).toString()); + break; + case 'n': + /* null */ + reader.readNull(); + node.setNodeValue(null); + break; + default: + /* Number or invalid */ + node.setNodeValue(reader.readRawNumber(new StringBuilder()).toString()); + break; } - - /** - * Recursively builds an XML Element node's subtree from the content of the - * given JsonReader. The node needs to exist, and the JsonReader needs to be - * positioned at the Json element's value. - */ - private void buildNodeValueSubtree(Document document, Node parent, JsonReader reader) throws IOException { - if (valueIsObject(reader)) { - buildObjectValueSubtree(document, parent, reader); - } else if (valueIsArray(reader)) { - String arrayNodesName = parent.getNodeName(); - Element grandParent = (Element) parent.getParentNode(); - grandParent.removeChild(parent); - buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); - } else { - /* Otherwise the value is string/true/false/null/number or invalid */ - // Note: JSON converted from XML should never have non-string - // true/false/null - buildTextValue(document, parent, reader); - } + } + + /** + * Recursively builds an XML Element node's subtree from the content of the + * given JsonReader. The node needs to exist, and the JsonReader needs to be + * positioned at the Json element's value. + */ + private void buildNodeValueSubtree(Document document, Node parent, JsonReader reader) throws IOException { + if (valueIsObject(reader)) { + buildObjectValueSubtree(document, parent, reader); + } else if (valueIsArray(reader)) { + String arrayNodesName = parent.getNodeName(); + Element grandParent = (Element) parent.getParentNode(); + grandParent.removeChild(parent); + buildArrayValueSubtree(document, grandParent, arrayNodesName, reader); + } else { + /* Otherwise the value is string/true/false/null/number or invalid */ + // Note: JSON converted from XML should never have non-string + // true/false + buildTextValue(document, parent, reader); } - - /** - * Builds an XML subtree from a JSON object element - * - * @param document - * the {@link Document} this tree belongs too - * @param parent - * the parent {@link Element} node of the subtree - * @param reader - * the {@link JsonReader} we are currently using to read the Json - * stream - */ - private void buildObjectValueSubtree(Document document, Node parentNode, JsonReader reader) throws IOException { - - reader.assertReadToken('{'); - - Element parent = (Element) parentNode; - - boolean needsComma = false; - while (reader.readToken() != '}') { - if (needsComma) { - reader.assertLastToken(','); - reader.next(); - } - - String childNodeName = reader.readString(); - reader.assertReadToken(':'); - - /* If it's an attribute node */ - if (childNodeName.startsWith("@")) { - String nodeValue = reader.readString(); - parent.setAttribute(childNodeName.substring(1), nodeValue); - } - /* If it's a special node */ - else if (childNodeName.startsWith("#")) { - if (childNodeName.equals(commentNodeTag)) { - Comment childElement = document.createComment(""); - parent.appendChild(childElement); - buildNodeValueSubtree(document, childElement, reader); - } else if (childNodeName.equals(cDataNodeTag)) { - CDATASection childElement = document.createCDATASection(""); - parent.appendChild(childElement); - buildNodeValueSubtree(document, childElement, reader); - } else if (childNodeName.equals(textNodeTag)) { - Text childElement = document.createTextNode(""); - parent.appendChild(childElement); - buildNodeValueSubtree(document, childElement, reader); - } else if (childNodeName.equals(whitespaceNodeTag) - || childNodeName.equals(significantWhitespaceNodeTag)) { - // Ignore - } else { - /* - * All other nodes whose name starts with a '#' are invalid - * XML nodes, and thus ignored: - */ - } - - } - /* If it's a processing instruction */ - else if (childNodeName.startsWith("?")) { - String processingNodeData = reader.readString(); - parent.appendChild(document.createProcessingInstruction(childNodeName.substring(1), processingNodeData)); - } - /* If it's a normal node */ - else { - Element childElement = document.createElement(childNodeName); - parent.appendChild(childElement); - buildNodeValueSubtree(document, childElement, reader); - } - - needsComma = true; - } - reader.assertReadToken('}'); + } + + /** + * Builds an XML subtree from a JSON object element + * + * @param document + * the {@link Document} this tree belongs too + * @param parent + * the parent {@link Element} node of the subtree + * @param reader + * the {@link JsonReader} we are currently using to read the Json + * stream + */ + private void buildObjectValueSubtree(Document document, Node parentNode, JsonReader reader) throws IOException { + + reader.assertReadToken('{'); + + Element parent = (Element) parentNode; + + boolean needsComma = false; + while (reader.readToken() != '}') { + if (needsComma) { + reader.assertLastToken(','); + reader.next(); + } + + String childNodeName = reader.readString(); + reader.assertReadToken(':'); + + /* If it's an attribute node */ + if (childNodeName.startsWith("@")) { + String nodeValue = reader.readString(); + parent.setAttribute(childNodeName.substring(1), nodeValue); + } + /* If it's a special node */ + else if (childNodeName.startsWith("#")) { + if (childNodeName.equals(commentNodeTag)) { + Comment childElement = document.createComment(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(cDataNodeTag)) { + CDATASection childElement = document.createCDATASection(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(textNodeTag)) { + Text childElement = document.createTextNode(""); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } else if (childNodeName.equals(whitespaceNodeTag) || childNodeName.equals(significantWhitespaceNodeTag)) { + // Ignore + } else { + /* + * All other nodes whose name starts with a '#' are invalid XML nodes, + * and thus ignored: + */ + } + + } + /* If it's a processing instruction */ + else if (childNodeName.startsWith("?")) { + String processingNodeData = reader.readString(); + parent.appendChild(document.createProcessingInstruction(childNodeName.substring(1), processingNodeData)); + } + /* If it's a normal node */ + else { + Element childElement = document.createElement(childNodeName); + parent.appendChild(childElement); + buildNodeValueSubtree(document, childElement, reader); + } + + needsComma = true; } - - private Node createChildNodeAccordingToName(Document document, String nodeName) { - Node childNode; - - if (nodeName.equals(textNodeTag)) - childNode = document.createTextNode(""); - else if (nodeName.equals(cDataNodeTag)) - childNode = document.createCDATASection(""); - else if (nodeName.equals(commentNodeTag)) - childNode = document.createComment(""); - else - childNode = document.createElement(nodeName); - - return childNode; + reader.assertReadToken('}'); + } + + private Node createChildNodeAccordingToName(Document document, String nodeName) { + Node childNode; + + if (nodeName.equals(textNodeTag)) + childNode = document.createTextNode(""); + else if (nodeName.equals(cDataNodeTag)) + childNode = document.createCDATASection(""); + else if (nodeName.equals(commentNodeTag)) + childNode = document.createComment(""); + else + childNode = document.createElement(nodeName); + + return childNode; + } + + /** + * Builds a sequence of XML elements from a Json array. The first element of + * the sequence must exist before calling this method + * + * E.g. {@code "array":["1","2","3"]} translates to + * {@code 123} + * + * @param document + * @param parent + * @param reader + * @throws IOException + */ + private void buildArrayValueSubtree(Document document, Node parent, String arrayNodesName, JsonReader reader) + throws IOException { + reader.assertReadToken('['); + + boolean needsComma = false; + while (reader.readToken() != ']') { + if (needsComma) { + reader.assertLastToken(','); + reader.next(); + } + + Node childNode = createChildNodeAccordingToName(document, arrayNodesName); + + parent.appendChild(childNode); + buildNodeValueSubtree(document, childNode, reader); + + needsComma = true; } - /** - * Builds a sequence of XML elements from a Json array. The first element of - * the sequence must exist before calling this method - * - * E.g. {@code "array":["1","2","3"]} translates to - * {@code 123} - * - * @param document - * @param parent - * @param reader - * @throws IOException - */ - private void buildArrayValueSubtree(Document document, Node parent, String arrayNodesName, JsonReader reader) - throws IOException { - reader.assertReadToken('['); - - boolean needsComma = false; - while (reader.readToken() != ']') { - if (needsComma) { - reader.assertLastToken(','); - reader.next(); - } - - Node childNode = createChildNodeAccordingToName(document, arrayNodesName); - - parent.appendChild(childNode); - buildNodeValueSubtree(document, childNode, reader); - - needsComma = true; - } - - reader.assertReadToken(']'); - } + reader.assertReadToken(']'); + } } From c239d33ce38f2ec7891b380d49c5b6daf1adae5e Mon Sep 17 00:00:00 2001 From: hperadin Date: Fri, 21 Mar 2014 10:38:02 +0100 Subject: [PATCH 27/30] Strict Json testing --- json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java | 2 +- json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java index 0d55f0b..97cff33 100644 --- a/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Json2XmlRoundTripTest.java @@ -94,7 +94,7 @@ private static void assertJsonEquivalence(String lhs, String rhs) throws JSONExc System.out.println(lhs); System.out.println(rhs); System.out.println(); - JSONAssert.assertEquals(lhs, rhs, false); + JSONAssert.assertEquals(lhs, rhs, true); } private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { diff --git a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java index 71df105..0f81dea 100644 --- a/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java +++ b/json/src/test/java/io/jvm/json/Xml2JsonRoundTripTest.java @@ -108,7 +108,7 @@ private static void assertJsonEquivalence(String lhs, String rhs) throws JSONExc System.out.println(lhs); System.out.println(rhs); - JSONAssert.assertEquals(lhs, rhs, false); + JSONAssert.assertEquals(lhs, rhs, true); } private static void assertXmlEquivalence(String message, Document lhs, Document rhs) { From 4f89bce845029ff303e7d0f4a854822a833320bb Mon Sep 17 00:00:00 2001 From: hperadin Date: Tue, 25 Mar 2014 10:58:24 +0100 Subject: [PATCH 28/30] Tests cleanup --- .../json/reference/CurrencyConvertor.json.xml | 1 + .../reference/CurrencyConvertor.json.xml.json | 1 + .../json/reference/Weather.json.xml | 1 + .../json/reference/Weather.json.xml.json | 1 + .../json/reference/boox.json.xml | 22 ++++ .../json/reference/boox.json.xml.json | 1 + .../json/reference/boox_withprolog.json.xml | 22 ++++ .../reference/boox_withprolog.json.xml.json | 1 + .../json/reference/cdatatest.json.xml | 13 ++ .../json/reference/cdatatest.json.xml.json | 1 + .../json/reference/comments.json.xml | 5 + .../json/reference/comments.json.xml.json | 7 + .../json/reference/hello.json.xml | 1 + .../json/reference/hello.json.xml.json | 1 + .../json/reference/modes.json.xml | 1 + .../json/reference/modes.json.xml.json | 1 + .../json/reference/purchaseOrder.json.xml | 9 ++ .../reference/purchaseOrder.json.xml.json | 1 + .../reference/purchaseOrderInstance.json.xml | 1 + .../purchaseOrderInstance.json.xml.json | 1 + .../json/reference/samlRequest.json.xml | 5 + .../json/reference/samlRequest.json.xml.json | 1 + .../json/reference/samlResponse.json.xml | 41 ++++++ .../json/reference/samlResponse.json.xml.json | 1 + .../json/source/CurrencyConvertor.json | 1 + .../roundtripTests/json/source/Weather.json | 1 + .../roundtripTests/json/source/boox.json | 1 + .../json/source/boox_withprolog.json | 1 + .../roundtripTests/json/source/cdatatest.json | 1 + .../roundtripTests/json/source/comments.json | 7 + .../roundtripTests/json/source/hello.json | 1 + .../roundtripTests/json/source/modes.json | 1 + .../notImplemented/boox_withprolog.json | 1 + .../json/source/purchaseOrder.json | 1 + .../json/source/purchaseOrderInstance.json | 1 + .../json/source/samlRequest.json | 1 + .../json/source/samlResponse.json | 1 + .../xml/reference/CurrencyConvertor.xml.json | 2 +- .../reference/CurrencyConvertor.xml.json.xml | 2 +- .../xml/reference/Weather.xml.json | 2 +- .../xml/reference/Weather.xml.json.xml | 2 +- .../xml/reference/boox.xml.json | 2 +- .../xml/reference/boox.xml.json.xml | 10 +- .../xml/reference/comments.xml.json | 7 + .../xml/reference/comments.xml.json.xml | 5 + .../xml/reference/mixed.xml.json | 1 + .../xml/reference/mixed.xml.json.xml | 1 + .../xml/reference/modes.xml.json | 2 +- .../xml/reference/modes.xml.json.xml | 2 +- .../xml/source/CurrencyConvertor.xml | 3 +- .../roundtripTests/xml/source/Weather.xml | 3 +- .../roundtripTests/xml/source/boox.xml | 7 +- .../xml/source/boox_withprolog.xml | 121 ++++++++++++++++++ .../roundtripTests/xml/source/comments.xml | 5 + .../roundtripTests/xml/source/mixed.xml | 1 + .../roundtripTests/xml/source/modes.xml | 1 + 56 files changed, 316 insertions(+), 22 deletions(-) create mode 100644 json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/Weather.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/Weather.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/boox.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/boox.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/comments.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/hello.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/hello.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/modes.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/modes.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml create mode 100644 json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml.json create mode 100644 json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.json create mode 100644 json/src/test/resources/roundtripTests/json/source/Weather.json create mode 100644 json/src/test/resources/roundtripTests/json/source/boox.json create mode 100644 json/src/test/resources/roundtripTests/json/source/boox_withprolog.json create mode 100644 json/src/test/resources/roundtripTests/json/source/cdatatest.json create mode 100644 json/src/test/resources/roundtripTests/json/source/comments.json create mode 100644 json/src/test/resources/roundtripTests/json/source/hello.json create mode 100644 json/src/test/resources/roundtripTests/json/source/modes.json create mode 100644 json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json create mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrder.json create mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.json create mode 100644 json/src/test/resources/roundtripTests/json/source/samlRequest.json create mode 100644 json/src/test/resources/roundtripTests/json/source/samlResponse.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/comments.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json create mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml create mode 100644 json/src/test/resources/roundtripTests/xml/source/comments.xml create mode 100644 json/src/test/resources/roundtripTests/xml/source/mixed.xml diff --git a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml new file mode 100644 index 0000000..510345e --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml @@ -0,0 +1 @@ +<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml.json new file mode 100644 index 0000000..be75f5e --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.json.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml b/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml new file mode 100644 index 0000000..466789b --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml @@ -0,0 +1 @@ +Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml.json new file mode 100644 index 0000000..080f817 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/Weather.json.xml.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.json.xml b/json/src/test/resources/roundtripTests/json/reference/boox.json.xml new file mode 100644 index 0000000..677b81b --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/boox.json.xml @@ -0,0 +1,22 @@ +A sample text node for testing conversionsGambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve Ascendantanother sample text nodeFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/boox.json.xml.json new file mode 100644 index 0000000..420840e --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/boox.json.xml.json @@ -0,0 +1 @@ +{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml b/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml new file mode 100644 index 0000000..fb9d8eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml.json new file mode 100644 index 0000000..15403eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/boox_withprolog.json.xml.json @@ -0,0 +1 @@ +{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml b/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml new file mode 100644 index 0000000..85e4411 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml.json new file mode 100644 index 0000000..99ad17c --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/cdatatest.json.xml.json @@ -0,0 +1 @@ +{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/comments.json.xml b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml new file mode 100644 index 0000000..c3a3b26 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json new file mode 100644 index 0000000..1059186 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json @@ -0,0 +1,7 @@ +{ +"root":{ + "#comment":"Though specified in the documentation," + , "#comment":"Comments are not implemented in Json.Net" + , "#comment":"Instead they are serialized as JavaScript comments" +} +} diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.json.xml b/json/src/test/resources/roundtripTests/json/reference/hello.json.xml new file mode 100644 index 0000000..92412af --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/hello.json.xml @@ -0,0 +1 @@ +text node in the middleWSDL File for HelloService \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/hello.json.xml.json new file mode 100644 index 0000000..b252e58 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/hello.json.xml.json @@ -0,0 +1 @@ +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle","#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/","#cdata-section":"cdata somewha at the end"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/modes.json.xml b/json/src/test/resources/roundtripTests/json/reference/modes.json.xml new file mode 100644 index 0000000..f0fdf83 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/modes.json.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/modes.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/modes.json.xml.json new file mode 100644 index 0000000..4ae5e0f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/modes.json.xml.json @@ -0,0 +1 @@ +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml new file mode 100644 index 0000000..a0a0d0b --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml @@ -0,0 +1,9 @@ + + Purchase order schema for Example.com. + Copyright 2000 Example.com. All rights reserved. + + Purchase order schema for Example.Microsoft.com. + Copyright 2001 Example.Microsoft.com. All rights reserved. + + Application info. + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml.json new file mode 100644 index 0000000..a3d8679 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.json.xml.json @@ -0,0 +1 @@ +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml new file mode 100644 index 0000000..5f4fd35 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml @@ -0,0 +1 @@ +Alice Smith123 Maple StreetMill ValleyCA90952Robert Smith8 Oak AvenueOld TownPA95819Hurry, my lawn is going wild!Lawnmower1148.95Confirm this is electricBaby Monitor139.981999-05-21 \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml.json new file mode 100644 index 0000000..82ca4fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.json.xml.json @@ -0,0 +1 @@ +{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml new file mode 100644 index 0000000..6350387 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml @@ -0,0 +1,5 @@ + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml.json new file mode 100644 index 0000000..3ccfa8f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/samlRequest.json.xml.json @@ -0,0 +1 @@ +{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml new file mode 100644 index 0000000..e92c002 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml @@ -0,0 +1,41 @@ + + max.feide.no + + max.feide.no + + k7z/t3iPKiyY9P7B87FIsMxnlnk= + + KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY= + + MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw== + + UB/WJAaKAPrSHbqlbcKWu7JktcKY + + urn:mace:feide.no:services:no.feide.moodle + + urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ== + + dGVzdEBmZWlkZS5ubw== + + VU5JTkVUVA== + + VU5JTkVUVA== + + ZGM9dW5pbmV0dCxkYz1ubw== + + c3R1ZGVudA== + + bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v + + bm8= + + b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw== + + RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF + + RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF + + ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA== + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml.json new file mode 100644 index 0000000..c99220f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/reference/samlResponse.json.xml.json @@ -0,0 +1 @@ +{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.json b/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.json new file mode 100644 index 0000000..be75f5e --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/Weather.json b/json/src/test/resources/roundtripTests/json/source/Weather.json new file mode 100644 index 0000000..080f817 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/Weather.json @@ -0,0 +1 @@ +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/boox.json b/json/src/test/resources/roundtripTests/json/source/boox.json new file mode 100644 index 0000000..bd104b5 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/boox.json @@ -0,0 +1 @@ +{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} diff --git a/json/src/test/resources/roundtripTests/json/source/boox_withprolog.json b/json/src/test/resources/roundtripTests/json/source/boox_withprolog.json new file mode 100644 index 0000000..15403eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/boox_withprolog.json @@ -0,0 +1 @@ +{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/cdatatest.json b/json/src/test/resources/roundtripTests/json/source/cdatatest.json new file mode 100644 index 0000000..99ad17c --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/cdatatest.json @@ -0,0 +1 @@ +{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/comments.json b/json/src/test/resources/roundtripTests/json/source/comments.json new file mode 100644 index 0000000..1059186 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/comments.json @@ -0,0 +1,7 @@ +{ +"root":{ + "#comment":"Though specified in the documentation," + , "#comment":"Comments are not implemented in Json.Net" + , "#comment":"Instead they are serialized as JavaScript comments" +} +} diff --git a/json/src/test/resources/roundtripTests/json/source/hello.json b/json/src/test/resources/roundtripTests/json/source/hello.json new file mode 100644 index 0000000..9fc7831 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/hello.json @@ -0,0 +1 @@ +{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle", "#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/", "#cdata-section":"cdata somewha at the end"}}}}} diff --git a/json/src/test/resources/roundtripTests/json/source/modes.json b/json/src/test/resources/roundtripTests/json/source/modes.json new file mode 100644 index 0000000..4ae5e0f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/modes.json @@ -0,0 +1 @@ +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json b/json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json new file mode 100644 index 0000000..15403eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json @@ -0,0 +1 @@ +{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.json new file mode 100644 index 0000000..46cf7f3 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.json @@ -0,0 +1 @@ +{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.json new file mode 100644 index 0000000..82ca4fd --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.json @@ -0,0 +1 @@ +{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlRequest.json b/json/src/test/resources/roundtripTests/json/source/samlRequest.json new file mode 100644 index 0000000..3ccfa8f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/samlRequest.json @@ -0,0 +1 @@ +{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlResponse.json b/json/src/test/resources/roundtripTests/json/source/samlResponse.json new file mode 100644 index 0000000..c99220f --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/source/samlResponse.json @@ -0,0 +1 @@ +{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json index be75f5e..f8b47e8 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json @@ -1 +1 @@ -{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file +{"?xml":{"@version":"1.0","@encoding":"utf-8"},"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml index 510345e..54fab6d 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml @@ -1 +1 @@ -<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file +<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json index 080f817..5bcc7e6 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json @@ -1 +1 @@ -{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file +{"?xml":{"@version":"1.0","@encoding":"utf-8"},"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml index 466789b..fdcc8fd 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml @@ -1 +1 @@ -Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file +Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json index 4274864..15403eb 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json @@ -1 +1 @@ -{"catalog":{"#cdata-section":"kokodak","book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":["kukuriku","kokodak","mijau"],"author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}],"#text":["\ntestoiejsoitjeo\n ","\noiajweofiajwefoij\n "]}} \ No newline at end of file +{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml index e784464..fb9d8eb 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml @@ -1,7 +1,7 @@ -Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen - of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life @@ -19,8 +19,4 @@ SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development - environment. -testoiejsoitjeo - -oiajweofiajwefoij - \ No newline at end of file + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json b/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json new file mode 100644 index 0000000..1059186 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json @@ -0,0 +1,7 @@ +{ +"root":{ + "#comment":"Though specified in the documentation," + , "#comment":"Comments are not implemented in Json.Net" + , "#comment":"Instead they are serialized as JavaScript comments" +} +} diff --git a/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml new file mode 100644 index 0000000..c3a3b26 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json b/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json new file mode 100644 index 0000000..e19d426 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json @@ -0,0 +1 @@ +{"root":{"array":["a","b","c","d"],"#text":["some text","some text1some text2","some text3"],"#cdata-section":["some CDATA","some CDATA"],"a":["a0","a1","a2"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"},"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml new file mode 100644 index 0000000..0bdbc2d --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2some text3a0a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json index 4ae5e0f..e839afd 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json @@ -1 +1 @@ -{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file +{"?xml":{"@version":"1.0","@encoding":"UTF-8"},"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml index f0fdf83..c8c4330 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml index 9dc5019..bd2e3ba 100644 --- a/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml +++ b/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml @@ -1,3 +1,4 @@ + @@ -277,4 +278,4 @@ - + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/Weather.xml index cafa4fe..062edd0 100644 --- a/json/src/test/resources/roundtripTests/xml/source/Weather.xml +++ b/json/src/test/resources/roundtripTests/xml/source/Weather.xml @@ -1,3 +1,4 @@ + @@ -345,4 +346,4 @@ - + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/boox.xml b/json/src/test/resources/roundtripTests/xml/source/boox.xml index 70a1870..ffae1a1 100644 --- a/json/src/test/resources/roundtripTests/xml/source/boox.xml +++ b/json/src/test/resources/roundtripTests/xml/source/boox.xml @@ -1,5 +1,5 @@ + - Gambardella, Matthew XML Developer's Guide @@ -9,7 +9,6 @@ An in-depth look at creating applications with XML. -testoiejsoitjeo Ralls, Kim Midnight Rain @@ -20,11 +19,7 @@ testoiejsoitjeo an evil sorceress, and her own childhood to become queen of the world. -oiajweofiajwefoij - - - Corets, Eva Maeve Ascendant Fantasy diff --git a/json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml b/json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml new file mode 100644 index 0000000..ffae1a1 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml @@ -0,0 +1,121 @@ + + + + Gambardella, Matthew + XML Developer's Guide + Computer + 44.95 + 2000-10-01 + An in-depth look at creating applications + with XML. + + + Ralls, Kim + Midnight Rain + Fantasy + 5.95 + 2000-12-16 + A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world. + + + Corets, Eva + Maeve Ascendant + Fantasy + 5.95 + 2000-11-17 + After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society. + + + Corets, Eva + Oberon's Legacy + Fantasy + 5.95 + 2001-03-10 + In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant. + + + Corets, Eva + The Sundered Grail + Fantasy + 5.95 + 2001-09-10 + The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy. + + + Randall, Cynthia + Lover Birds + Romance + 4.95 + 2000-09-02 + When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled. + + + Thurman, Paula + Splish Splash + Romance + 4.95 + 2000-11-02 + A deep sea diver finds true love twenty + thousand leagues beneath the sea. + + + Knorr, Stefan + Creepy Crawlies + Horror + 4.95 + 2000-12-06 + An anthology of horror stories about roaches, + centipedes, scorpions and other insects. + + + Kress, Peter + Paradox Lost + Science Fiction + 6.95 + 2000-11-02 + After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum. + + + O'Brien, Tim + Microsoft .NET: The Programming Bible + Computer + 36.95 + 2000-12-09 + Microsoft's .NET initiative is explored in + detail in this deep programmer's reference. + + + O'Brien, Tim + MSXML3: A Comprehensive Guide + Computer + 36.95 + 2000-12-01 + The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more. + + + Galos, Mike + Visual Studio 7: A Comprehensive Guide + Computer + 49.95 + 2001-04-16 + Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. + + + diff --git a/json/src/test/resources/roundtripTests/xml/source/comments.xml b/json/src/test/resources/roundtripTests/xml/source/comments.xml new file mode 100644 index 0000000..c3a3b26 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/source/comments.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/json/src/test/resources/roundtripTests/xml/source/mixed.xml b/json/src/test/resources/roundtripTests/xml/source/mixed.xml new file mode 100644 index 0000000..454207b --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/source/mixed.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2a0some text3a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/modes.xml b/json/src/test/resources/roundtripTests/xml/source/modes.xml index 4bc8af1..f3fab87 100644 --- a/json/src/test/resources/roundtripTests/xml/source/modes.xml +++ b/json/src/test/resources/roundtripTests/xml/source/modes.xml @@ -1,3 +1,4 @@ + From ef8a0d381e2e9830dcb47e810c82708805a70601 Mon Sep 17 00:00:00 2001 From: hperadin Date: Tue, 25 Mar 2014 11:14:14 +0100 Subject: [PATCH 29/30] deleted old test files --- .../reference/CurrencyConvertor.xml.json.xml | 1 - .../CurrencyConvertor.xml.json.xml.json | 1 - .../json/reference/Weather.xml.json.xml | 1 - .../json/reference/Weather.xml.json.xml.json | 1 - .../json/reference/boox.xml.json.xml | 22 ---------- .../json/reference/boox.xml.json.xml.json | 1 - .../json/reference/cdatatest.xml.json.xml | 13 ------ .../reference/cdatatest.xml.json.xml.json | 1 - .../json/reference/hello.xml.json.xml | 1 - .../json/reference/hello.xml.json.xml.json | 1 - .../json/reference/modes.xml.json.xml | 1 - .../json/reference/modes.xml.json.xml.json | 1 - .../json/reference/purchaseOrder.xml.json.xml | 9 ---- .../reference/purchaseOrder.xml.json.xml.json | 1 - .../purchaseOrderInstance.xml.json.xml | 1 - .../purchaseOrderInstance.xml.json.xml.json | 1 - .../json/reference/samlRequest.xml.json.xml | 5 --- .../reference/samlRequest.xml.json.xml.json | 1 - .../json/reference/samlResponse.xml.json.xml | 41 ------------------- .../reference/samlResponse.xml.json.xml.json | 1 - .../json/source/CurrencyConvertor.xml.json | 1 - .../json/source/Weather.xml.json | 1 - .../roundtripTests/json/source/boox.xml.json | 1 - .../json/source/cdatatest.xml.json | 1 - .../roundtripTests/json/source/hello.xml.json | 1 - .../roundtripTests/json/source/modes.xml.json | 1 - .../json/source/purchaseOrder.xml.json | 1 - .../source/purchaseOrderInstance.xml.json | 1 - .../json/source/samlRequest.xml.json | 1 - .../json/source/samlResponse.xml.json | 1 - .../xml/reference/mixed.json.xml.json | 1 - .../xml/reference/mixed.json.xml.json.xml | 1 - .../roundtripTests/xml/source/mixed.json.xml | 1 - 33 files changed, 118 deletions(-) delete mode 100644 json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/Weather.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/boox.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/hello.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/modes.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json delete mode 100644 json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json delete mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json delete mode 100644 json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/mixed.json.xml diff --git a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml deleted file mode 100644 index 510345e..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ -<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json deleted file mode 100644 index be75f5e..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/CurrencyConvertor.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml deleted file mode 100644 index 466789b..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ -Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json deleted file mode 100644 index 080f817..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/Weather.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml deleted file mode 100644 index 677b81b..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml +++ /dev/null @@ -1,22 +0,0 @@ -A sample text node for testing conversionsGambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications - with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, - an evil sorceress, and her own childhood to become queen - of the world.Corets, EvaMaeve Ascendantanother sample text nodeFantasy5.952000-11-17After the collapse of a nanotechnology - society in England, the young survivors lay the - foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious - agent known only as Oberon helps to create a new life - for the inhabitants of London. Sequel to Maeve - Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, - battle one another for control of England. Sequel to - Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology - conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty - thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, - centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg - Uncertainty Device, James Salway discovers the problems - of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in - detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in - detail, with attention to XML DOM interfaces, XSLT processing, - SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, - looking at how Visual Basic, Visual C++, C#, and ASP+ are - integrated into a comprehensive development - environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json deleted file mode 100644 index 420840e..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/boox.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml deleted file mode 100644 index 85e4411..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json deleted file mode 100644 index 99ad17c..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/cdatatest.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml deleted file mode 100644 index 92412af..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ -text node in the middleWSDL File for HelloService \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json deleted file mode 100644 index b252e58..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/hello.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle","#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/","#cdata-section":"cdata somewha at the end"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml deleted file mode 100644 index f0fdf83..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json deleted file mode 100644 index 4ae5e0f..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/modes.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml deleted file mode 100644 index a0a0d0b..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Purchase order schema for Example.com. - Copyright 2000 Example.com. All rights reserved. - - Purchase order schema for Example.Microsoft.com. - Copyright 2001 Example.Microsoft.com. All rights reserved. - - Application info. - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json deleted file mode 100644 index a3d8679..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/purchaseOrder.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml deleted file mode 100644 index 5f4fd35..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ -Alice Smith123 Maple StreetMill ValleyCA90952Robert Smith8 Oak AvenueOld TownPA95819Hurry, my lawn is going wild!Lawnmower1148.95Confirm this is electricBaby Monitor139.981999-05-21 \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json deleted file mode 100644 index 82ca4fd..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/purchaseOrderInstance.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml deleted file mode 100644 index 6350387..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml +++ /dev/null @@ -1,5 +0,0 @@ - - urn:mace:feide.no:services:no.feide.moodle - - urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json deleted file mode 100644 index 3ccfa8f..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/samlRequest.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml b/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml deleted file mode 100644 index e92c002..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml +++ /dev/null @@ -1,41 +0,0 @@ - - max.feide.no - - max.feide.no - - k7z/t3iPKiyY9P7B87FIsMxnlnk= - - KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY= - - MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw== - - UB/WJAaKAPrSHbqlbcKWu7JktcKY - - urn:mace:feide.no:services:no.feide.moodle - - urn:oasis:names:tc:SAML:2.0:ac:classes:Password - - RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ== - - dGVzdEBmZWlkZS5ubw== - - VU5JTkVUVA== - - VU5JTkVUVA== - - ZGM9dW5pbmV0dCxkYz1ubw== - - c3R1ZGVudA== - - bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v - - bm8= - - b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw== - - RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF - - RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF - - ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA== - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json deleted file mode 100644 index c99220f..0000000 --- a/json/src/test/resources/roundtripTests/json/reference/samlResponse.xml.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json deleted file mode 100644 index be75f5e..0000000 --- a/json/src/test/resources/roundtripTests/json/source/CurrencyConvertor.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/Weather.xml.json b/json/src/test/resources/roundtripTests/json/source/Weather.xml.json deleted file mode 100644 index 080f817..0000000 --- a/json/src/test/resources/roundtripTests/json/source/Weather.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/boox.xml.json b/json/src/test/resources/roundtripTests/json/source/boox.xml.json deleted file mode 100644 index bd104b5..0000000 --- a/json/src/test/resources/roundtripTests/json/source/boox.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"catalog":{"book":[{"@id":"bk101","#text":"A sample text node for testing conversions","author":"Gambardella, Matthew","#cdata-section":"This part is here so we can normally test out comments","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","#cdata-section":"Also a short comment so we can test it out...","author":"Corets, Eva","title":"Maeve Ascendant","#text":"another sample text node","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} diff --git a/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json b/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json deleted file mode 100644 index 99ad17c..0000000 --- a/json/src/test/resources/roundtripTests/json/source/cdatatest.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"root":{"#cdata-section":"\nfunction matchwo(a,b)\n{\nif (a < b && a < 0) then\n {\n return 1;\n }\nelse\n {\n return 0;\n }\n}\n"}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/hello.xml.json b/json/src/test/resources/roundtripTests/json/source/hello.xml.json deleted file mode 100644 index 9fc7831..0000000 --- a/json/src/test/resources/roundtripTests/json/source/hello.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"definitions":{"@name":"HelloService","@targetNamespace":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns":"http://schemas.xmlsoap.org/wsdl/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tns":"http://www.examples.com/wsdl/HelloService.wsdl","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","message":[{"@name":"SayHelloRequest","part":{"@name":"firstName","@type":"xsd:string"}},{"@name":"SayHelloResponse","part":{"@name":"greeting","@type":"xsd:string"}}],"portType":{"@name":"Hello_PortType","operation":{"@name":"sayHello","input":{"@message":"tns:SayHelloRequest"},"output":{"@message":"tns:SayHelloResponse"}}},"binding":{"@name":"Hello_Binding","@type":"tns:Hello_PortType","soap:binding":{"@style":"rpc","@transport":"http://schemas.xmlsoap.org/soap/http"},"operation":{"@name":"sayHello","soap:operation":{"@soapAction":"sayHello"},"input":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}},"#text":"text node in the middle", "#cdata-section":"cdata after text node","output":{"soap:body":{"@encodingStyle":"http://schemas.xmlsoap.org/soap/encoding/","@namespace":"urn:examples:helloservice","@use":"encoded"}}}},"service":{"@name":"Hello_Service","#cdata-section":"cdata in the middle","documentation":"WSDL File for HelloService","port":{"@binding":"tns:Hello_Binding","@name":"Hello_Port","soap:address":{"@location":"http://www.examples.com/SayHello/", "#cdata-section":"cdata somewha at the end"}}}}} diff --git a/json/src/test/resources/roundtripTests/json/source/modes.xml.json b/json/src/test/resources/roundtripTests/json/source/modes.xml.json deleted file mode 100644 index 4ae5e0f..0000000 --- a/json/src/test/resources/roundtripTests/json/source/modes.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json deleted file mode 100644 index 46cf7f3..0000000 --- a/json/src/test/resources/roundtripTests/json/source/purchaseOrder.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"xs:schema":{"@xmlns:xs":"http://www.w3.org/2001/XMLSchema","@targetNamespace":"http://tempuri.org/po.xsd","@xmlns":"http://tempuri.org/po.xsd","@elementFormDefault":"qualified","xs:annotation":{"xs:documentation":{"@xml:lang":"en","#text":"\n Purchase order schema for Example.com.\n Copyright 2000 Example.com. All rights reserved.\n "}},"xs:element":[{"@name":"purchaseOrder","@type":"PurchaseOrderType"},{"@name":"comment","@type":"xs:string"}],"xs:complexType":[{"@name":"PurchaseOrderType","xs:sequence":{"xs:element":[{"@name":"shipTo","@type":"USAddress"},{"@name":"billTo","@type":"USAddress"},{"@ref":"comment","@minOccurs":"0"},{"@name":"items","@type":"Items"}]},"xs:attribute":{"@name":"orderDate","@type":"xs:date"}},{"@name":"USAddress","xs:annotation":{"xs:documentation":"\n Purchase order schema for Example.Microsoft.com.\n Copyright 2001 Example.Microsoft.com. All rights reserved.\n ","xs:appinfo":"\n Application info.\n "},"xs:sequence":{"xs:element":[{"@name":"name","@type":"xs:string"},{"@name":"street","@type":"xs:string"},{"@name":"city","@type":"xs:string"},{"@name":"state","@type":"xs:string"},{"@name":"zip","@type":"xs:decimal"}]},"xs:attribute":{"@name":"country","@type":"xs:NMTOKEN","@fixed":"US"}},{"@name":"Items","xs:sequence":{"xs:element":{"@name":"item","@minOccurs":"0","@maxOccurs":"unbounded","xs:complexType":{"xs:sequence":{"xs:element":[{"@name":"productName","@type":"xs:string"},{"@name":"quantity","xs:simpleType":{"xs:restriction":{"@base":"xs:positiveInteger","xs:maxExclusive":{"@value":"100"}}}},{"@name":"USPrice","@type":"xs:decimal"},{"@ref":"comment","@minOccurs":"0"},{"@name":"shipDate","@type":"xs:date","@minOccurs":"0"}]},"xs:attribute":{"@name":"partNum","@type":"SKU","@use":"required"}}}}}],"xs:simpleType":{"@name":"SKU","xs:restriction":{"@base":"xs:string","xs:pattern":{"@value":"\\d{3}-[A-Z]{2}"}}}}} diff --git a/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json b/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json deleted file mode 100644 index 82ca4fd..0000000 --- a/json/src/test/resources/roundtripTests/json/source/purchaseOrderInstance.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"purchaseOrder":{"@xmlns":"http://tempuri.org/po.xsd","@orderDate":"1999-10-20","shipTo":{"@country":"US","name":"Alice Smith","street":"123 Maple Street","city":"Mill Valley","state":"CA","zip":"90952"},"billTo":{"@country":"US","name":"Robert Smith","street":"8 Oak Avenue","city":"Old Town","state":"PA","zip":"95819"},"comment":"Hurry, my lawn is going wild!","items":{"item":[{"@partNum":"872-AA","productName":"Lawnmower","quantity":"1","USPrice":"148.95","comment":"Confirm this is electric"},{"@partNum":"926-AA","productName":"Baby Monitor","quantity":"1","USPrice":"39.98","shipDate":"1999-05-21"}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json b/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json deleted file mode 100644 index 3ccfa8f..0000000 --- a/json/src/test/resources/roundtripTests/json/source/samlRequest.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"samlp:AuthnRequest":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:34Z","@ForceAuthn":"false","@IsPassive":"false","@ProtocolBinding":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST","@AssertionConsumerServiceURL":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:mace:feide.no:services:no.feide.moodle\n "},"samlp:NameIDPolicy":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","@SPNameQualifier":"moodle.bridge.feide.no","@AllowCreate":"true"},"samlp:RequestedAuthnContext":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Comparison":"exact","saml:AuthnContextClassRef":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport\n "}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json b/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json deleted file mode 100644 index c99220f..0000000 --- a/json/src/test/resources/roundtripTests/json/source/samlResponse.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"samlp:Response":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@ID":"s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Version":"2.0","@IssueInstant":"2007-12-10T11:39:48Z","@Destination":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php","saml:Issuer":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n max.feide.no\n "},"samlp:Status":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","samlp:StatusCode":{"@xmlns:samlp":"urn:oasis:names:tc:SAML:2.0:protocol","@Value":"urn:oasis:names:tc:SAML:2.0:status:Success"}},"saml:Assertion":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","@Version":"2.0","@ID":"s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","@IssueInstant":"2007-12-10T11:39:48Z","saml:Issuer":"\n max.feide.no\n ","Signature":{"@xmlns":"http://www.w3.org/2000/09/xmldsig#","SignedInfo":{"CanonicalizationMethod":{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"},"SignatureMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#rsa-sha1"},"Reference":{"@URI":"#s2b7afe8e21a0910d027dfbc94ec4b862e1fbbd9ab","Transforms":{"Transform":[{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature"},{"@Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#"}]},"DigestMethod":{"@Algorithm":"http://www.w3.org/2000/09/xmldsig#sha1"},"DigestValue":"\n k7z/t3iPKiyY9P7B87FIsMxnlnk=\n "}},"SignatureValue":"\n KvUrzGcwGsu8WMNogIRfAxxWlO4uKXhJrouOYaadkzUHvz1xbVURH35si6U8084utNAjXTjZyxfj qurEX7VgCw6Xn7Fxn4nJxD6FOP5x/iRk8KqCufipRNHwICq/VufqPkrP7sVLdymJyZ2Cu5QrEU23 qaIzjFf84Kfp4LVnlJY=\n ","KeyInfo":{"X509Data":{"X509Certificate":"\n MIIB/jCCAWcCBEbzjNswDQYJKoZIhvcNAQEFBQAwRjELMAkGA1UEBhMCTk8xEDAOBgNVBAoTB1VO SU5FVFQxDjAMBgNVBAsTBUZlaWRlMRUwEwYDVQQDEwxtYXguZmVpZGUubm8wHhcNMDcwOTIxMDky MDI3WhcNMDcxMjIwMDkyMDI3WjBGMQswCQYDVQQGEwJOTzEQMA4GA1UEChMHVU5JTkVUVDEOMAwG A1UECxMFRmVpZGUxFTATBgNVBAMTDG1heC5mZWlkZS5ubzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEAvZlBzQ2jGM6Q9STBJ6tqtugkOBMEU/kpvvwOlT6c1X5UIXMwApL+NV2Eaqk+oA0N+M42 J7Sy0dLDqKVCwsh7qpsIYlDS/omyUMdy6AzvptRUUhLLhC6zQFFAU+6rcUKEiSkER5eziB4M3ae0 EkW0drm1rOZwb22tr8NJ65q3gnsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCmVSta9TWin/wvvGOi e8Cq7cEg0MJLkBWLofNNzrzh6hiQgfuz9KMom/kh9JuGEjyE7rIDbXp2ilxSHgZSaVfEkwnMfQ51 vuHUrtRolD/skysIocm+HJKbsmPMjSRfUFyzBh4RNjPoCvZvTdnyBfMP/i/H39njAdBRi+49aopc vw==\n "}}},"saml:Subject":{"saml:NameID":{"@NameQualifier":"max.feide.no","@SPNameQualifier":"urn:mace:feide.no:services:no.feide.moodle","@Format":"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","#text":"\n UB/WJAaKAPrSHbqlbcKWu7JktcKY\n "},"saml:SubjectConfirmation":{"@Method":"urn:oasis:names:tc:SAML:2.0:cm:bearer","saml:SubjectConfirmationData":{"@NotOnOrAfter":"2007-12-10T19:39:48Z","@InResponseTo":"_bec424fa5103428909a30ff1e31168327f79474984","@Recipient":"http://moodle.bridge.feide.no/simplesaml/saml2/sp/AssertionConsumerService.php"}}},"saml:Conditions":{"@NotBefore":"2007-12-10T11:29:48Z","@NotOnOrAfter":"2007-12-10T19:39:48Z","saml:AudienceRestriction":{"saml:Audience":"\n urn:mace:feide.no:services:no.feide.moodle\n "}},"saml:AuthnStatement":{"@AuthnInstant":"2007-12-10T11:39:48Z","@SessionIndex":"s259fad9cad0cf7d2b3b68f42b17d0cfa6668e0201","saml:AuthnContext":{"saml:AuthnContextClassRef":"\n urn:oasis:names:tc:SAML:2.0:ac:classes:Password\n "}},"saml:AttributeStatement":{"saml:Attribute":[{"@Name":"givenName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChnaXZlbk5hbWUpIMO4w6bDpcOYw4bDhQ==\n "}},{"@Name":"eduPersonPrincipalName","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n dGVzdEBmZWlkZS5ubw==\n "}},{"@Name":"o","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"ou","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n VU5JTkVUVA==\n "}},{"@Name":"eduPersonOrgDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"eduPersonPrimaryAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n c3R1ZGVudA==\n "}},{"@Name":"mail","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bW9yaWEtc3VwcG9ydEB1bmluZXR0Lm5v\n "}},{"@Name":"preferredLanguage","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n bm8=\n "}},{"@Name":"eduPersonOrgUnitDN","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n b3U9dW5pbmV0dCxvdT1vcmdhbml6YXRpb24sZGM9dW5pbmV0dCxkYz1ubw==\n "}},{"@Name":"sn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChzbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"cn","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n RkVJREUgVGVzdCBVc2VyIChjbikgw7jDpsOlw5jDhsOF\n "}},{"@Name":"eduPersonAffiliation","saml:AttributeValue":{"@xmlns:saml":"urn:oasis:names:tc:SAML:2.0:assertion","#text":"\n ZW1wbG95ZWU=_c3RhZmY=_c3R1ZGVudA==\n "}}]}}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json deleted file mode 100644 index e19d426..0000000 --- a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json +++ /dev/null @@ -1 +0,0 @@ -{"root":{"array":["a","b","c","d"],"#text":["some text","some text1some text2","some text3"],"#cdata-section":["some CDATA","some CDATA"],"a":["a0","a1","a2"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"},"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml deleted file mode 100644 index 0bdbc2d..0000000 --- a/json/src/test/resources/roundtripTests/xml/reference/mixed.json.xml.json.xml +++ /dev/null @@ -1 +0,0 @@ -abcdsome textsome text1some text2some text3a0a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml b/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml deleted file mode 100644 index 454207b..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/mixed.json.xml +++ /dev/null @@ -1 +0,0 @@ -abcdsome textsome text1some text2a0some text3a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file From e5fec1d7042b883948b4f75269955b9bea6598db Mon Sep 17 00:00:00 2001 From: hperadin Date: Tue, 25 Mar 2014 14:17:56 +0100 Subject: [PATCH 30/30] Unsupported use cases tests moved to separate dirs --- .../json/reference/comments.json.xml.json | 8 +- .../json/source/notImplemented/mixed.json | 31 -- .../json/unsupported_use_cases/README.md | 7 + .../reference/boox_withprolog.json.xml} | 0 .../reference/boox_withprolog.json.xml.json} | 0 .../reference/comments.json.xml} | 0 .../reference/comments.json.xml.json} | 0 .../reference/mixed.json.xml} | 0 .../reference/mixed.json.xml.json} | 0 .../source}/boox_withprolog.json | 0 .../source/comments.json} | 0 .../source/mixed.json | 0 .../xml/reference/CurrencyConvertor.xml.json | 2 +- .../reference/CurrencyConvertor.xml.json.xml | 2 +- .../xml/reference/Weather.xml.json | 2 +- .../xml/reference/Weather.xml.json.xml | 2 +- .../xml/reference/boox.xml.json | 2 +- .../xml/reference/boox.xml.json.xml | 2 +- .../xml/reference/modes.xml.json | 2 +- .../xml/reference/modes.xml.json.xml | 2 +- .../xml/source/CurrencyConvertor.xml | 3 +- .../roundtripTests/xml/source/Weather.xml | 3 +- .../roundtripTests/xml/source/boox.xml | 1 - .../roundtripTests/xml/source/modes.xml | 1 - .../notImplemented/CurrencyConvertor.xml | 281 -------------- .../xml/source/notImplemented/Weather.xml | 349 ------------------ .../xml/source/notImplemented/boox.xml | 121 ------ .../source/notImplemented/boox_withprolog.xml | 121 ------ .../xml/source/notImplemented/modes.xml | 178 --------- .../source/notImplemented/purchaseOrder.xml | 75 ---- .../unsupported_use_cases/reference/README.md | 11 + .../reference/boox_withprolog.xml.json | 0 .../reference/boox_withprolog.xml.json.xml | 22 ++ .../reference/reference/comments.xml.json | 7 + .../reference/comments.xml.json.xml} | 0 .../reference/reference/mixed.xml.json | 1 + .../reference}/reference/mixed.xml.json.xml | 0 .../source/boox_withprolog.xml | 0 .../unsupported_use_cases/source/comments.xml | 5 + .../unsupported_use_cases/source/mixed.xml | 1 + 40 files changed, 65 insertions(+), 1177 deletions(-) delete mode 100644 json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json create mode 100644 json/src/test/resources/roundtripTests/json/unsupported_use_cases/README.md rename json/src/test/resources/roundtripTests/{xml/reference/boox_withprolog.xml.json.xml => json/unsupported_use_cases/reference/boox_withprolog.json.xml} (100%) rename json/src/test/resources/roundtripTests/json/{source/boox_withprolog.json => unsupported_use_cases/reference/boox_withprolog.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{xml/reference/comments.xml.json.xml => json/unsupported_use_cases/reference/comments.json.xml} (100%) rename json/src/test/resources/roundtripTests/json/{source/comments.json => unsupported_use_cases/reference/comments.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/{xml/source/mixed.xml => json/unsupported_use_cases/reference/mixed.json.xml} (100%) rename json/src/test/resources/roundtripTests/{xml/reference/mixed.xml.json => json/unsupported_use_cases/reference/mixed.json.xml.json} (100%) rename json/src/test/resources/roundtripTests/json/{source/notImplemented => unsupported_use_cases/source}/boox_withprolog.json (100%) rename json/src/test/resources/roundtripTests/{xml/reference/comments.xml.json => json/unsupported_use_cases/source/comments.json} (100%) rename json/src/test/resources/roundtripTests/json/{ => unsupported_use_cases}/source/mixed.json (100%) delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml delete mode 100644 json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/README.md rename json/src/test/resources/roundtripTests/xml/{ => unsupported_use_cases/reference}/reference/boox_withprolog.xml.json (100%) create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json.xml create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json rename json/src/test/resources/roundtripTests/xml/{source/comments.xml => unsupported_use_cases/reference/reference/comments.xml.json.xml} (100%) create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json rename json/src/test/resources/roundtripTests/xml/{ => unsupported_use_cases/reference}/reference/mixed.xml.json.xml (100%) rename json/src/test/resources/roundtripTests/xml/{ => unsupported_use_cases}/source/boox_withprolog.xml (100%) create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/comments.xml create mode 100644 json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/mixed.xml diff --git a/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json index 1059186..efb9e15 100644 --- a/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json +++ b/json/src/test/resources/roundtripTests/json/reference/comments.json.xml.json @@ -1,7 +1 @@ -{ -"root":{ - "#comment":"Though specified in the documentation," - , "#comment":"Comments are not implemented in Json.Net" - , "#comment":"Instead they are serialized as JavaScript comments" -} -} +{"root":{"#comment":[]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json b/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json deleted file mode 100644 index 36cc118..0000000 --- a/json/src/test/resources/roundtripTests/json/source/notImplemented/mixed.json +++ /dev/null @@ -1,31 +0,0 @@ -{ -"root":{ - "array":["a","b","c","d"] - , "#text":"some text" - , "#cdata-section":"some CDATA" - , "#text":"some text1" - , "#text":"some text2" - , "a":"a0" - , "#cdata-section":"some CDATA" - , "#text":"some text3" - , "a":"a1" - , "a":"a2" - , "object":{ - "array":["a","b","c","d"] - ,"array":["a","b","c","d"] - ,"array":["a","b","c","#text"] - , "object":{ - "array":["a","b","c","d"] - ,"array":["a","b","c","d"] - ,"array":["a","b","c","#text"] - , "#text":"some text" - , "#cdata-section":"some CDATA" - , "#text":"some text" - , "#text":"some text" - } , "#text":"some text" - , "#cdata-section":"some CDATA" - , "#text":"some text" - , "#text":"some text" - } -} -} diff --git a/json/src/test/resources/roundtripTests/json/unsupported_use_cases/README.md b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/README.md new file mode 100644 index 0000000..05727a1 --- /dev/null +++ b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/README.md @@ -0,0 +1,7 @@ +# Unsupported use cases: + +Use cases we currently do not support: + - multiple key:value pairs with equal key values + - Xml comments + - serializing #cdata-section and #text nodes as Json arrays (currently they are merged) + - Xml prologs and processing instructions diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/boox_withprolog.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json.xml rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/boox_withprolog.json.xml diff --git a/json/src/test/resources/roundtripTests/json/source/boox_withprolog.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/boox_withprolog.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/json/source/boox_withprolog.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/boox_withprolog.json.xml.json diff --git a/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/comments.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/comments.xml.json.xml rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/comments.json.xml diff --git a/json/src/test/resources/roundtripTests/json/source/comments.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/comments.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/json/source/comments.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/comments.json.xml.json diff --git a/json/src/test/resources/roundtripTests/xml/source/mixed.xml b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/mixed.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/mixed.xml rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/mixed.json.xml diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/mixed.json.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/reference/mixed.json.xml.json diff --git a/json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/boox_withprolog.json similarity index 100% rename from json/src/test/resources/roundtripTests/json/source/notImplemented/boox_withprolog.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/boox_withprolog.json diff --git a/json/src/test/resources/roundtripTests/xml/reference/comments.xml.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/comments.json similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/comments.xml.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/comments.json diff --git a/json/src/test/resources/roundtripTests/json/source/mixed.json b/json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/mixed.json similarity index 100% rename from json/src/test/resources/roundtripTests/json/source/mixed.json rename to json/src/test/resources/roundtripTests/json/unsupported_use_cases/source/mixed.json diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json index f8b47e8..be75f5e 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json @@ -1 +1 @@ -{"?xml":{"@version":"1.0","@encoding":"utf-8"},"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file +{"wsdl:definitions":{"@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://www.webserviceX.NET/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@targetNamespace":"http://www.webserviceX.NET/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://www.webserviceX.NET/","s:element":[{"@name":"ConversionRate","s:complexType":{"s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"FromCurrency","@type":"tns:Currency"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ToCurrency","@type":"tns:Currency"}]}}},{"@name":"ConversionRateResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"ConversionRateResult","@type":"s:double"}}}},{"@name":"double","@type":"s:double"}],"s:simpleType":{"@name":"Currency","s:restriction":{"@base":"s:string","s:enumeration":[{"@value":"AFA"},{"@value":"ALL"},{"@value":"DZD"},{"@value":"ARS"},{"@value":"AWG"},{"@value":"AUD"},{"@value":"BSD"},{"@value":"BHD"},{"@value":"BDT"},{"@value":"BBD"},{"@value":"BZD"},{"@value":"BMD"},{"@value":"BTN"},{"@value":"BOB"},{"@value":"BWP"},{"@value":"BRL"},{"@value":"GBP"},{"@value":"BND"},{"@value":"BIF"},{"@value":"XOF"},{"@value":"XAF"},{"@value":"KHR"},{"@value":"CAD"},{"@value":"CVE"},{"@value":"KYD"},{"@value":"CLP"},{"@value":"CNY"},{"@value":"COP"},{"@value":"KMF"},{"@value":"CRC"},{"@value":"HRK"},{"@value":"CUP"},{"@value":"CYP"},{"@value":"CZK"},{"@value":"DKK"},{"@value":"DJF"},{"@value":"DOP"},{"@value":"XCD"},{"@value":"EGP"},{"@value":"SVC"},{"@value":"EEK"},{"@value":"ETB"},{"@value":"EUR"},{"@value":"FKP"},{"@value":"GMD"},{"@value":"GHC"},{"@value":"GIP"},{"@value":"XAU"},{"@value":"GTQ"},{"@value":"GNF"},{"@value":"GYD"},{"@value":"HTG"},{"@value":"HNL"},{"@value":"HKD"},{"@value":"HUF"},{"@value":"ISK"},{"@value":"INR"},{"@value":"IDR"},{"@value":"IQD"},{"@value":"ILS"},{"@value":"JMD"},{"@value":"JPY"},{"@value":"JOD"},{"@value":"KZT"},{"@value":"KES"},{"@value":"KRW"},{"@value":"KWD"},{"@value":"LAK"},{"@value":"LVL"},{"@value":"LBP"},{"@value":"LSL"},{"@value":"LRD"},{"@value":"LYD"},{"@value":"LTL"},{"@value":"MOP"},{"@value":"MKD"},{"@value":"MGF"},{"@value":"MWK"},{"@value":"MYR"},{"@value":"MVR"},{"@value":"MTL"},{"@value":"MRO"},{"@value":"MUR"},{"@value":"MXN"},{"@value":"MDL"},{"@value":"MNT"},{"@value":"MAD"},{"@value":"MZM"},{"@value":"MMK"},{"@value":"NAD"},{"@value":"NPR"},{"@value":"ANG"},{"@value":"NZD"},{"@value":"NIO"},{"@value":"NGN"},{"@value":"KPW"},{"@value":"NOK"},{"@value":"OMR"},{"@value":"XPF"},{"@value":"PKR"},{"@value":"XPD"},{"@value":"PAB"},{"@value":"PGK"},{"@value":"PYG"},{"@value":"PEN"},{"@value":"PHP"},{"@value":"XPT"},{"@value":"PLN"},{"@value":"QAR"},{"@value":"ROL"},{"@value":"RUB"},{"@value":"WST"},{"@value":"STD"},{"@value":"SAR"},{"@value":"SCR"},{"@value":"SLL"},{"@value":"XAG"},{"@value":"SGD"},{"@value":"SKK"},{"@value":"SIT"},{"@value":"SBD"},{"@value":"SOS"},{"@value":"ZAR"},{"@value":"LKR"},{"@value":"SHP"},{"@value":"SDD"},{"@value":"SRG"},{"@value":"SZL"},{"@value":"SEK"},{"@value":"CHF"},{"@value":"SYP"},{"@value":"TWD"},{"@value":"TZS"},{"@value":"THB"},{"@value":"TOP"},{"@value":"TTD"},{"@value":"TND"},{"@value":"TRL"},{"@value":"USD"},{"@value":"AED"},{"@value":"UGX"},{"@value":"UAH"},{"@value":"UYU"},{"@value":"VUV"},{"@value":"VEB"},{"@value":"VND"},{"@value":"YER"},{"@value":"YUM"},{"@value":"ZMK"},{"@value":"ZWD"},{"@value":"TRY"}]}}}},"wsdl:message":[{"@name":"ConversionRateSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRate"}},{"@name":"ConversionRateSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:ConversionRateResponse"}},{"@name":"ConversionRateHttpGetIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:double"}},{"@name":"ConversionRateHttpPostIn","wsdl:part":[{"@name":"FromCurrency","@type":"s:string"},{"@name":"ToCurrency","@type":"s:string"}]},{"@name":"ConversionRateHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:double"}}],"wsdl:portType":[{"@name":"CurrencyConvertorSoap","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateSoapIn"},"wsdl:output":{"@message":"tns:ConversionRateSoapOut"}}},{"@name":"CurrencyConvertorHttpGet","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpGetIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpGetOut"}}},{"@name":"CurrencyConvertorHttpPost","wsdl:operation":{"@name":"ConversionRate","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"
Get conversion rate from one currency to another currency

Differenct currency Code and Names around the world

AFA-Afghanistan Afghani
ALL-Albanian Lek
DZD-Algerian Dinar
ARS-Argentine Peso
AWG-Aruba Florin
AUD-Australian Dollar
BSD-Bahamian Dollar
BHD-Bahraini Dinar
BDT-Bangladesh Taka
BBD-Barbados Dollar
BZD-Belize Dollar
BMD-Bermuda Dollar
BTN-Bhutan Ngultrum
BOB-Bolivian Boliviano
BWP-Botswana Pula
BRL-Brazilian Real
GBP-British Pound
BND-Brunei Dollar
BIF-Burundi Franc
XOF-CFA Franc (BCEAO)
XAF-CFA Franc (BEAC)
KHR-Cambodia Riel
CAD-Canadian Dollar
CVE-Cape Verde Escudo
KYD-Cayman Islands Dollar
CLP-Chilean Peso
CNY-Chinese Yuan
COP-Colombian Peso
KMF-Comoros Franc
CRC-Costa Rica Colon
HRK-Croatian Kuna
CUP-Cuban Peso
CYP-Cyprus Pound
CZK-Czech Koruna
DKK-Danish Krone
DJF-Dijibouti Franc
DOP-Dominican Peso
XCD-East Caribbean Dollar
EGP-Egyptian Pound
SVC-El Salvador Colon
EEK-Estonian Kroon
ETB-Ethiopian Birr
EUR-Euro
FKP-Falkland Islands Pound
GMD-Gambian Dalasi
GHC-Ghanian Cedi
GIP-Gibraltar Pound
XAU-Gold Ounces
GTQ-Guatemala Quetzal
GNF-Guinea Franc
GYD-Guyana Dollar
HTG-Haiti Gourde
HNL-Honduras Lempira
HKD-Hong Kong Dollar
HUF-Hungarian Forint
ISK-Iceland Krona
INR-Indian Rupee
IDR-Indonesian Rupiah
IQD-Iraqi Dinar
ILS-Israeli Shekel
JMD-Jamaican Dollar
JPY-Japanese Yen
JOD-Jordanian Dinar
KZT-Kazakhstan Tenge
KES-Kenyan Shilling
KRW-Korean Won
KWD-Kuwaiti Dinar
LAK-Lao Kip
LVL-Latvian Lat
LBP-Lebanese Pound
LSL-Lesotho Loti
LRD-Liberian Dollar
LYD-Libyan Dinar
LTL-Lithuanian Lita
MOP-Macau Pataca
MKD-Macedonian Denar
MGF-Malagasy Franc
MWK-Malawi Kwacha
MYR-Malaysian Ringgit
MVR-Maldives Rufiyaa
MTL-Maltese Lira
MRO-Mauritania Ougulya
MUR-Mauritius Rupee
MXN-Mexican Peso
MDL-Moldovan Leu
MNT-Mongolian Tugrik
MAD-Moroccan Dirham
MZM-Mozambique Metical
MMK-Myanmar Kyat
NAD-Namibian Dollar
NPR-Nepalese Rupee
ANG-Neth Antilles Guilder
NZD-New Zealand Dollar
NIO-Nicaragua Cordoba
NGN-Nigerian Naira
KPW-North Korean Won
NOK-Norwegian Krone
OMR-Omani Rial
XPF-Pacific Franc
PKR-Pakistani Rupee
XPD-Palladium Ounces
PAB-Panama Balboa
PGK-Papua New Guinea Kina
PYG-Paraguayan Guarani
PEN-Peruvian Nuevo Sol
PHP-Philippine Peso
XPT-Platinum Ounces
PLN-Polish Zloty
QAR-Qatar Rial
ROL-Romanian Leu
RUB-Russian Rouble
WST-Samoa Tala
STD-Sao Tome Dobra
SAR-Saudi Arabian Riyal
SCR-Seychelles Rupee
SLL-Sierra Leone Leone
XAG-Silver Ounces
SGD-Singapore Dollar
SKK-Slovak Koruna
SIT-Slovenian Tolar
SBD-Solomon Islands Dollar
SOS-Somali Shilling
ZAR-South African Rand
LKR-Sri Lanka Rupee
SHP-St Helena Pound
SDD-Sudanese Dinar
SRG-Surinam Guilder
SZL-Swaziland Lilageni
SEK-Swedish Krona
TRY-Turkey Lira
CHF-Swiss Franc
SYP-Syrian Pound
TWD-Taiwan Dollar
TZS-Tanzanian Shilling
THB-Thai Baht
TOP-Tonga Pa'anga
TTD-Trinidad&amp;Tobago Dollar
TND-Tunisian Dinar
TRL-Turkish Lira
USD-U.S. Dollar
AED-UAE Dirham
UGX-Ugandan Shilling
UAH-Ukraine Hryvnia
UYU-Uruguayan New Peso
VUV-Vanuatu Vatu
VEB-Venezuelan Bolivar
VND-Vietnam Dong
YER-Yemen Riyal
YUM-Yugoslav Dinar
ZMK-Zambian Kwacha
ZWD-Zimbabwe Dollar

"},"wsdl:input":{"@message":"tns:ConversionRateHttpPostIn"},"wsdl:output":{"@message":"tns:ConversionRateHttpPostOut"}}}],"wsdl:binding":[{"@name":"CurrencyConvertorSoap","@type":"tns:CurrencyConvertorSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorSoap12","@type":"tns:CurrencyConvertorSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":{"@name":"ConversionRate","soap12:operation":{"@soapAction":"http://www.webserviceX.NET/ConversionRate","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}},{"@name":"CurrencyConvertorHttpGet","@type":"tns:CurrencyConvertorHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}},{"@name":"CurrencyConvertorHttpPost","@type":"tns:CurrencyConvertorHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":{"@name":"ConversionRate","http:operation":{"@location":"/ConversionRate"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}}],"wsdl:service":{"@name":"CurrencyConvertor","wsdl:port":[{"@name":"CurrencyConvertorSoap","@binding":"tns:CurrencyConvertorSoap","soap:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorSoap12","@binding":"tns:CurrencyConvertorSoap12","soap12:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpGet","@binding":"tns:CurrencyConvertorHttpGet","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}},{"@name":"CurrencyConvertorHttpPost","@binding":"tns:CurrencyConvertorHttpPost","http:address":{"@location":"http://www.webservicex.com/CurrencyConvertor.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml index 54fab6d..510345e 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/CurrencyConvertor.xml.json.xml @@ -1 +1 @@ -<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file +<br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote><br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json index 5bcc7e6..080f817 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json @@ -1 +1 @@ -{"?xml":{"@version":"1.0","@encoding":"utf-8"},"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file +{"wsdl:definitions":{"@xmlns:s":"http://www.w3.org/2001/XMLSchema","@xmlns:soap12":"http://schemas.xmlsoap.org/wsdl/soap12/","@xmlns:mime":"http://schemas.xmlsoap.org/wsdl/mime/","@xmlns:tns":"http://ws.cdyne.com/WeatherWS/","@xmlns:soap":"http://schemas.xmlsoap.org/wsdl/soap/","@xmlns:tm":"http://microsoft.com/wsdl/mime/textMatching/","@xmlns:http":"http://schemas.xmlsoap.org/wsdl/http/","@xmlns:soapenc":"http://schemas.xmlsoap.org/soap/encoding/","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","wsdl:types":{"s:schema":{"@elementFormDefault":"qualified","@targetNamespace":"http://ws.cdyne.com/WeatherWS/","s:element":[{"@name":"GetWeatherInformation","s:complexType":null},{"@name":"GetWeatherInformationResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetWeatherInformationResult","@type":"tns:ArrayOfWeatherDescription"}}}},{"@name":"GetCityForecastByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityForecastByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"GetCityForecastByZIPResult","@type":"tns:ForecastReturn"}}}},{"@name":"GetCityWeatherByZIP","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"1","@name":"ZIP","@type":"s:string"}}}},{"@name":"GetCityWeatherByZIPResponse","s:complexType":{"s:sequence":{"s:element":{"@minOccurs":"1","@maxOccurs":"1","@name":"GetCityWeatherByZIPResult","@type":"tns:WeatherReturn"}}}},{"@name":"ArrayOfWeatherDescription","@nillable":"true","@type":"tns:ArrayOfWeatherDescription"},{"@name":"ForecastReturn","@nillable":"true","@type":"tns:ForecastReturn"},{"@name":"WeatherReturn","@type":"tns:WeatherReturn"}],"s:complexType":[{"@name":"ArrayOfWeatherDescription","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"WeatherDescription","@type":"tns:WeatherDescription"}}},{"@name":"WeatherDescription","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"PictureURL","@type":"s:string"}]}},{"@name":"ForecastReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ForecastResult","@type":"tns:ArrayOfForecast"}]}},{"@name":"ArrayOfForecast","s:sequence":{"s:element":{"@minOccurs":"0","@maxOccurs":"unbounded","@name":"Forecast","@nillable":"true","@type":"tns:Forecast"}}},{"@name":"Forecast","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Date","@type":"s:dateTime"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Desciption","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"Temperatures","@type":"tns:temp"},{"@minOccurs":"1","@maxOccurs":"1","@name":"ProbabilityOfPrecipiation","@type":"tns:POP"}]}},{"@name":"temp","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"MorningLow","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"DaytimeHigh","@type":"s:string"}]}},{"@name":"POP","s:sequence":{"s:element":[{"@minOccurs":"0","@maxOccurs":"1","@name":"Nighttime","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Daytime","@type":"s:string"}]}},{"@name":"WeatherReturn","s:sequence":{"s:element":[{"@minOccurs":"1","@maxOccurs":"1","@name":"Success","@type":"s:boolean"},{"@minOccurs":"0","@maxOccurs":"1","@name":"ResponseText","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"State","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"City","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WeatherStationCity","@type":"s:string"},{"@minOccurs":"1","@maxOccurs":"1","@name":"WeatherID","@type":"s:short"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Description","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Temperature","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"RelativeHumidity","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Wind","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Pressure","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Visibility","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"WindChill","@type":"s:string"},{"@minOccurs":"0","@maxOccurs":"1","@name":"Remarks","@type":"s:string"}]}}]}},"wsdl:message":[{"@name":"GetWeatherInformationSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformation"}},{"@name":"GetWeatherInformationSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetWeatherInformationResponse"}},{"@name":"GetCityForecastByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIP"}},{"@name":"GetCityForecastByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityForecastByZIPResponse"}},{"@name":"GetCityWeatherByZIPSoapIn","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIP"}},{"@name":"GetCityWeatherByZIPSoapOut","wsdl:part":{"@name":"parameters","@element":"tns:GetCityWeatherByZIPResponse"}},{"@name":"GetWeatherInformationHttpGetIn"},{"@name":"GetWeatherInformationHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpGetIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpGetOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}},{"@name":"GetWeatherInformationHttpPostIn"},{"@name":"GetWeatherInformationHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ArrayOfWeatherDescription"}},{"@name":"GetCityForecastByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityForecastByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:ForecastReturn"}},{"@name":"GetCityWeatherByZIPHttpPostIn","wsdl:part":{"@name":"ZIP","@type":"s:string"}},{"@name":"GetCityWeatherByZIPHttpPostOut","wsdl:part":{"@name":"Body","@element":"tns:WeatherReturn"}}],"wsdl:portType":[{"@name":"WeatherSoap","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationSoapIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationSoapOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPSoapOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPSoapIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPSoapOut"}}]},{"@name":"WeatherHttpGet","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpGetIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpGetOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpGetOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpGetIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpGetOut"}}]},{"@name":"WeatherHttpPost","wsdl:operation":[{"@name":"GetWeatherInformation","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Gets Information for each WeatherID"},"wsdl:input":{"@message":"tns:GetWeatherInformationHttpPostIn"},"wsdl:output":{"@message":"tns:GetWeatherInformationHttpPostOut"}},{"@name":"GetCityForecastByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityForecastByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityForecastByZIPHttpPostOut"}},{"@name":"GetCityWeatherByZIP","wsdl:documentation":{"@xmlns:wsdl":"http://schemas.xmlsoap.org/wsdl/","#text":"Allows you to get your City's Weather, which is updated hourly. U.S. Only"},"wsdl:input":{"@message":"tns:GetCityWeatherByZIPHttpPostIn"},"wsdl:output":{"@message":"tns:GetCityWeatherByZIPHttpPostOut"}}]}],"wsdl:binding":[{"@name":"WeatherSoap","@type":"tns:WeatherSoap","soap:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap:body":{"@use":"literal"}},"wsdl:output":{"soap:body":{"@use":"literal"}}}]},{"@name":"WeatherSoap12","@type":"tns:WeatherSoap","soap12:binding":{"@transport":"http://schemas.xmlsoap.org/soap/http"},"wsdl:operation":[{"@name":"GetWeatherInformation","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetWeatherInformation","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityForecastByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}},{"@name":"GetCityWeatherByZIP","soap12:operation":{"@soapAction":"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP","@style":"document"},"wsdl:input":{"soap12:body":{"@use":"literal"}},"wsdl:output":{"soap12:body":{"@use":"literal"}}}]},{"@name":"WeatherHttpGet","@type":"tns:WeatherHttpGet","http:binding":{"@verb":"GET"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"http:urlEncoded":null},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]},{"@name":"WeatherHttpPost","@type":"tns:WeatherHttpPost","http:binding":{"@verb":"POST"},"wsdl:operation":[{"@name":"GetWeatherInformation","http:operation":{"@location":"/GetWeatherInformation"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityForecastByZIP","http:operation":{"@location":"/GetCityForecastByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}},{"@name":"GetCityWeatherByZIP","http:operation":{"@location":"/GetCityWeatherByZIP"},"wsdl:input":{"mime:content":{"@type":"application/x-www-form-urlencoded"}},"wsdl:output":{"mime:mimeXml":{"@part":"Body"}}}]}],"wsdl:service":{"@name":"Weather","wsdl:port":[{"@name":"WeatherSoap","@binding":"tns:WeatherSoap","soap:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherSoap12","@binding":"tns:WeatherSoap12","soap12:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpGet","@binding":"tns:WeatherHttpGet","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}},{"@name":"WeatherHttpPost","@binding":"tns:WeatherHttpPost","http:address":{"@location":"http://wsf.cdyne.com/WeatherWS/Weather.asmx"}}]}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml index fdcc8fd..466789b 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/Weather.xml.json.xml @@ -1 +1 @@ -Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file +Gets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. OnlyGets Information for each WeatherIDAllows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. OnlyAllows you to get your City's Weather, which is updated hourly. U.S. Only \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json index 15403eb..20fe148 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json @@ -1 +1 @@ -{"?xml":{"@version":"1.0"},"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file +{"catalog":{"book":[{"@id":"bk101","author":"Gambardella, Matthew","title":"XML Developer's Guide","genre":"Computer","price":"44.95","publish_date":"2000-10-01","description":"An in-depth look at creating applications \n with XML."},{"@id":"bk102","author":"Ralls, Kim","title":"Midnight Rain","genre":"Fantasy","price":"5.95","publish_date":"2000-12-16","description":"A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world."},{"@id":"bk103","author":"Corets, Eva","title":"Maeve Ascendant","genre":"Fantasy","price":"5.95","publish_date":"2000-11-17","description":"After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society."},{"@id":"bk104","author":"Corets, Eva","title":"Oberon's Legacy","genre":"Fantasy","price":"5.95","publish_date":"2001-03-10","description":"In post-apocalypse England, the mysterious \n agent known only as Oberon helps to create a new life \n for the inhabitants of London. Sequel to Maeve \n Ascendant."},{"@id":"bk105","author":"Corets, Eva","title":"The Sundered Grail","genre":"Fantasy","price":"5.95","publish_date":"2001-09-10","description":"The two daughters of Maeve, half-sisters, \n battle one another for control of England. Sequel to \n Oberon's Legacy."},{"@id":"bk106","author":"Randall, Cynthia","title":"Lover Birds","genre":"Romance","price":"4.95","publish_date":"2000-09-02","description":"When Carla meets Paul at an ornithology \n conference, tempers fly as feathers get ruffled."},{"@id":"bk107","author":"Thurman, Paula","title":"Splish Splash","genre":"Romance","price":"4.95","publish_date":"2000-11-02","description":"A deep sea diver finds true love twenty \n thousand leagues beneath the sea."},{"@id":"bk108","author":"Knorr, Stefan","title":"Creepy Crawlies","genre":"Horror","price":"4.95","publish_date":"2000-12-06","description":"An anthology of horror stories about roaches,\n centipedes, scorpions and other insects."},{"@id":"bk109","author":"Kress, Peter","title":"Paradox Lost","genre":"Science Fiction","price":"6.95","publish_date":"2000-11-02","description":"After an inadvertant trip through a Heisenberg\n Uncertainty Device, James Salway discovers the problems \n of being quantum."},{"@id":"bk110","author":"O'Brien, Tim","title":"Microsoft .NET: The Programming Bible","genre":"Computer","price":"36.95","publish_date":"2000-12-09","description":"Microsoft's .NET initiative is explored in \n detail in this deep programmer's reference."},{"@id":"bk111","author":"O'Brien, Tim","title":"MSXML3: A Comprehensive Guide","genre":"Computer","price":"36.95","publish_date":"2000-12-01","description":"The Microsoft MSXML3 parser is covered in \n detail, with attention to XML DOM interfaces, XSLT processing, \n SAX and more."},{"@id":"bk112","author":"Galos, Mike","title":"Visual Studio 7: A Comprehensive Guide","genre":"Computer","price":"49.95","publish_date":"2001-04-16","description":"Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are \n integrated into a comprehensive development \n environment."}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml index fb9d8eb..ce1c998 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/boox.xml.json.xml @@ -1,4 +1,4 @@ -Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json index e839afd..4ae5e0f 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json @@ -1 +1 @@ -{"?xml":{"@version":"1.0","@encoding":"UTF-8"},"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file +{"modes":{"mode":[{"@name":"tg-fa-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"tg-fa-tagger","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"}]}},{"@name":"tg-fa-transfer","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]}]}},{"@name":"tg-fa","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"tg-fa.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"tg-fa.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.tg-fa.t1x"},{"@name":"tg-fa.t1x.bin"},{"@name":"tg-fa.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"tg-fa.autogen.bin"}}]}},{"@name":"fa-tg-test","@install":"no","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc -g","file":{"@name":"fa-tg.autogen.bin"}}]}},{"@name":"fa-tg_translit","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -p","file":{"@name":"fa-tg.autopgen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.alpha.bin"}}]}},{"@name":"fa-tg","@install":"yes","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]},{"@name":"lt-proc $1","file":{"@name":"fa-tg.autogen.bin"}},{"@name":"lt-proc -t","file":{"@name":"fa-tg.autopgen.bin"}}]}},{"@name":"fa-tg-tagger","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}}]}},{"@name":"fa-tg-transfer","pipeline":{"program":[{"@name":"lt-proc","file":{"@name":"fa-tg.automorf.bin"}},{"@name":"apertium-tagger -g $2","file":{"@name":"fa-tg.prob"}},{"@name":"apertium-pretransfer"},{"@name":"apertium-transfer","file":[{"@name":"apertium-tg-fa.fa-tg.t1x"},{"@name":"fa-tg.t1x.bin"},{"@name":"fa-tg.autobil.bin"}]}]}}]}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml index c8c4330..f0fdf83 100644 --- a/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml +++ b/json/src/test/resources/roundtripTests/xml/reference/modes.xml.json.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml index bd2e3ba..9dc5019 100644 --- a/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml +++ b/json/src/test/resources/roundtripTests/xml/source/CurrencyConvertor.xml @@ -1,4 +1,3 @@ - @@ -278,4 +277,4 @@ - \ No newline at end of file + diff --git a/json/src/test/resources/roundtripTests/xml/source/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/Weather.xml index 062edd0..cafa4fe 100644 --- a/json/src/test/resources/roundtripTests/xml/source/Weather.xml +++ b/json/src/test/resources/roundtripTests/xml/source/Weather.xml @@ -1,4 +1,3 @@ - @@ -346,4 +345,4 @@ - \ No newline at end of file + diff --git a/json/src/test/resources/roundtripTests/xml/source/boox.xml b/json/src/test/resources/roundtripTests/xml/source/boox.xml index ffae1a1..0ed0a15 100644 --- a/json/src/test/resources/roundtripTests/xml/source/boox.xml +++ b/json/src/test/resources/roundtripTests/xml/source/boox.xml @@ -1,4 +1,3 @@ - Gambardella, Matthew diff --git a/json/src/test/resources/roundtripTests/xml/source/modes.xml b/json/src/test/resources/roundtripTests/xml/source/modes.xml index f3fab87..4bc8af1 100644 --- a/json/src/test/resources/roundtripTests/xml/source/modes.xml +++ b/json/src/test/resources/roundtripTests/xml/source/modes.xml @@ -1,4 +1,3 @@ - diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml deleted file mode 100644 index bd2e3ba..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/CurrencyConvertor.xml +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> - - - - - - - <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> - - - - - - - <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml deleted file mode 100644 index 062edd0..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/Weather.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets Information for each WeatherID - - - - - Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only - - - - - Allows you to get your City's Weather, which is updated hourly. U.S. Only - - - - - - - Gets Information for each WeatherID - - - - - Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only - - - - - Allows you to get your City's Weather, which is updated hourly. U.S. Only - - - - - - - Gets Information for each WeatherID - - - - - Allows you to get your City Forecast Over the Next 7 Days, which is updated hourly. U.S. Only - - - - - Allows you to get your City's Weather, which is updated hourly. U.S. Only - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml deleted file mode 100644 index ffae1a1..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - Gambardella, Matthew - XML Developer's Guide - Computer - 44.95 - 2000-10-01 - An in-depth look at creating applications - with XML. - - - Ralls, Kim - Midnight Rain - Fantasy - 5.95 - 2000-12-16 - A former architect battles corporate zombies, - an evil sorceress, and her own childhood to become queen - of the world. - - - Corets, Eva - Maeve Ascendant - Fantasy - 5.95 - 2000-11-17 - After the collapse of a nanotechnology - society in England, the young survivors lay the - foundation for a new society. - - - Corets, Eva - Oberon's Legacy - Fantasy - 5.95 - 2001-03-10 - In post-apocalypse England, the mysterious - agent known only as Oberon helps to create a new life - for the inhabitants of London. Sequel to Maeve - Ascendant. - - - Corets, Eva - The Sundered Grail - Fantasy - 5.95 - 2001-09-10 - The two daughters of Maeve, half-sisters, - battle one another for control of England. Sequel to - Oberon's Legacy. - - - Randall, Cynthia - Lover Birds - Romance - 4.95 - 2000-09-02 - When Carla meets Paul at an ornithology - conference, tempers fly as feathers get ruffled. - - - Thurman, Paula - Splish Splash - Romance - 4.95 - 2000-11-02 - A deep sea diver finds true love twenty - thousand leagues beneath the sea. - - - Knorr, Stefan - Creepy Crawlies - Horror - 4.95 - 2000-12-06 - An anthology of horror stories about roaches, - centipedes, scorpions and other insects. - - - Kress, Peter - Paradox Lost - Science Fiction - 6.95 - 2000-11-02 - After an inadvertant trip through a Heisenberg - Uncertainty Device, James Salway discovers the problems - of being quantum. - - - O'Brien, Tim - Microsoft .NET: The Programming Bible - Computer - 36.95 - 2000-12-09 - Microsoft's .NET initiative is explored in - detail in this deep programmer's reference. - - - O'Brien, Tim - MSXML3: A Comprehensive Guide - Computer - 36.95 - 2000-12-01 - The Microsoft MSXML3 parser is covered in - detail, with attention to XML DOM interfaces, XSLT processing, - SAX and more. - - - Galos, Mike - Visual Studio 7: A Comprehensive Guide - Computer - 49.95 - 2001-04-16 - Microsoft Visual Studio 7 is explored in depth, - looking at how Visual Basic, Visual C++, C#, and ASP+ are - integrated into a comprehensive development - environment. - - - diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml deleted file mode 100644 index ffae1a1..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/boox_withprolog.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - Gambardella, Matthew - XML Developer's Guide - Computer - 44.95 - 2000-10-01 - An in-depth look at creating applications - with XML. - - - Ralls, Kim - Midnight Rain - Fantasy - 5.95 - 2000-12-16 - A former architect battles corporate zombies, - an evil sorceress, and her own childhood to become queen - of the world. - - - Corets, Eva - Maeve Ascendant - Fantasy - 5.95 - 2000-11-17 - After the collapse of a nanotechnology - society in England, the young survivors lay the - foundation for a new society. - - - Corets, Eva - Oberon's Legacy - Fantasy - 5.95 - 2001-03-10 - In post-apocalypse England, the mysterious - agent known only as Oberon helps to create a new life - for the inhabitants of London. Sequel to Maeve - Ascendant. - - - Corets, Eva - The Sundered Grail - Fantasy - 5.95 - 2001-09-10 - The two daughters of Maeve, half-sisters, - battle one another for control of England. Sequel to - Oberon's Legacy. - - - Randall, Cynthia - Lover Birds - Romance - 4.95 - 2000-09-02 - When Carla meets Paul at an ornithology - conference, tempers fly as feathers get ruffled. - - - Thurman, Paula - Splish Splash - Romance - 4.95 - 2000-11-02 - A deep sea diver finds true love twenty - thousand leagues beneath the sea. - - - Knorr, Stefan - Creepy Crawlies - Horror - 4.95 - 2000-12-06 - An anthology of horror stories about roaches, - centipedes, scorpions and other insects. - - - Kress, Peter - Paradox Lost - Science Fiction - 6.95 - 2000-11-02 - After an inadvertant trip through a Heisenberg - Uncertainty Device, James Salway discovers the problems - of being quantum. - - - O'Brien, Tim - Microsoft .NET: The Programming Bible - Computer - 36.95 - 2000-12-09 - Microsoft's .NET initiative is explored in - detail in this deep programmer's reference. - - - O'Brien, Tim - MSXML3: A Comprehensive Guide - Computer - 36.95 - 2000-12-01 - The Microsoft MSXML3 parser is covered in - detail, with attention to XML DOM interfaces, XSLT processing, - SAX and more. - - - Galos, Mike - Visual Studio 7: A Comprehensive Guide - Computer - 49.95 - 2001-04-16 - Microsoft Visual Studio 7 is explored in depth, - looking at how Visual Basic, Visual C++, C#, and ASP+ are - integrated into a comprehensive development - environment. - - - diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml deleted file mode 100644 index f3fab87..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/modes.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml b/json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml deleted file mode 100644 index e2de63b..0000000 --- a/json/src/test/resources/roundtripTests/xml/source/notImplemented/purchaseOrder.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - Purchase order schema for Example.com. - Copyright 2000 Example.com. All rights reserved. - - - - - - - - - - - - - - - - - - - - - Purchase order schema for Example.Microsoft.com. - Copyright 2001 Example.Microsoft.com. All rights reserved. - - - Application info. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/README.md b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/README.md new file mode 100644 index 0000000..0f66c2d --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/README.md @@ -0,0 +1,11 @@ +# Round trip tests xml->json and vice versa. + + +## Directories: + + - json - json source and reference files + - source - source json files + - reference - reference files converted using Json.Net + - xml - xml source and reference files + - source - source XML files + - reference - reference files converted using Json.Net diff --git a/json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/boox_withprolog.xml.json rename to json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json.xml new file mode 100644 index 0000000..fb9d8eb --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/boox_withprolog.xml.json.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json new file mode 100644 index 0000000..1059186 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json @@ -0,0 +1,7 @@ +{ +"root":{ + "#comment":"Though specified in the documentation," + , "#comment":"Comments are not implemented in Json.Net" + , "#comment":"Instead they are serialized as JavaScript comments" +} +} diff --git a/json/src/test/resources/roundtripTests/xml/source/comments.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/comments.xml rename to json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/comments.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json new file mode 100644 index 0000000..e19d426 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json @@ -0,0 +1 @@ +{"root":{"array":["a","b","c","d"],"#text":["some text","some text1some text2","some text3"],"#cdata-section":["some CDATA","some CDATA"],"a":["a0","a1","a2"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"object":{"array":["a","b","c","d","a","b","c","d","a","b","c","#text"],"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"},"#text":["some text","some textsome text"],"#cdata-section":"some CDATA"}}} \ No newline at end of file diff --git a/json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/reference/mixed.xml.json.xml rename to json/src/test/resources/roundtripTests/xml/unsupported_use_cases/reference/reference/mixed.xml.json.xml diff --git a/json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/boox_withprolog.xml similarity index 100% rename from json/src/test/resources/roundtripTests/xml/source/boox_withprolog.xml rename to json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/boox_withprolog.xml diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/comments.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/comments.xml new file mode 100644 index 0000000..c3a3b26 --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/comments.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/mixed.xml b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/mixed.xml new file mode 100644 index 0000000..454207b --- /dev/null +++ b/json/src/test/resources/roundtripTests/xml/unsupported_use_cases/source/mixed.xml @@ -0,0 +1 @@ +abcdsome textsome text1some text2a0some text3a1a2abcdabcdabc#textabcdabcdabc#textsome textsome textsome textsome textsome textsome text \ No newline at end of file