Mike,
The XML parser is having trouble with namespaces in the data:
1. In the XSD declaration, you have the attribute
elementFormDefault=”qualified”
This tells the parser that every element in the XML files will be prefixed with a namespace qualifier. This is not the case in your sample; elements “insertPatientHL7RecResponse” and “insertPatientHL7RecResult” are not prefixed.
2. You also have the attribute
targetNamespace=”http://www.w3.org/2003/05/soap-envelope”
This tells the parser that every element will be contained in the “soap” namespace. However, in the sample XML file, the vendor resets the namespace of the element “insertPatientHL7RecResponse” to the default namespace by appending the attribute xmlns=”website here” to it. Since the parser is looking in the “soap” namespace, this element is not found, hence the error message you are getting.
If you want to still use your XSD, you can simply modify the XML files with an inbound TPS, removing the default namespace assignment and adding the missing “soap:”prefix to the elements. The following corrected sample should work fine for you:
MSH|^~&|||ADM|SITE|20150608000000||ACK|Therapute|P|2.6 MSA|AA|77258863
It took just 3 “regsub” commands to modify the sample. It would be a very short TPS for you to create, unless you can get the vendor to modify their output.
I hope this helps.