Class XMLInputReader

  • All Implemented Interfaces:
    InputReader

    public class XMLInputReader
    extends Object
    implements InputReader
    This class is capable of parsing XML through AXIOMS for the InputStream and build the respective JSON message
    • Method Detail

      • read

        public void read​(InputStream input,
                         Schema inputSchema,
                         InputBuilder messageBuilder)
                  throws ReaderException
        Read, parse the XML and notify with the output JSON message
        Specified by:
        read in interface InputReader
        Parameters:
        input - XML message InputStream
        inputSchema - Schema of the input message
        messageBuilder - Reference of the InputXMLMessageBuilder
        Throws:
        ReaderException - Exceptions in the parsing stage
      • getAttributeQName

        public String getAttributeQName​(org.apache.axiom.om.OMNamespace omNamespace,
                                        String localName)
      • getAttributeQName

        public String getAttributeQName​(org.apache.axiom.om.OMNamespace omNamespace,
                                        String localName,
                                        Map jsonSchemaMap)
                                 throws SchemaException
        This function will resolve prefix for given URI depending on the provided traversal level given by jsonSchemaMap
        Parameters:
        omNamespace -
        localName -
        jsonSchemaMap -
        Returns:
        Throws:
        SchemaException
      • getInputSchema

        public Schema getInputSchema()