title: Mirth Connect and HL7 v3 message validation
body: <p>I'm using Mirth Connect (stable version) to create interfaces for HL7v3. I've created an interface to recieve a PRPA_IN201305UV02 message. </p>
  
  <p>At this point I want to do some sort of validation of the incoming XML message. After some search I discovered that HL7 has schemas files (xsd) to verify the correctness of the messages.</p>
  
  <p>So, I'm trying to implement the validation against a xsd file. Searching the mirth forum one of the administrators posted a <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/xml/validation/package-summary.html" rel="nofollow">link</a> to a java library for xml validation.</p>
  
  <p>In my channel source transformer I wrote the javascript based on that link.</p>
  
  <pre><code>// parse an XML document into a DOM tree
  var parser = Packages.javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder();
  var document = parser.parse(msg);
  </code></pre>
  
  <p>The last line of code is getting me an error when I recieve a message</p>
  
  <pre><code>Wrapped java.net.MalformedURLException: no protocol
  </code></pre>
  
  <p>I tried also with</p>
  
  <pre><code>var document = parser.parse(messageObject.getRawData());
  </code></pre>
  
  <p>But I get the same error.</p>
  
  <p>What is missing here?
  Is this the best way to do a XML validation on Mirth Connect?</p>
  
  <p>Thank you</p>