开发者

Mirth Transformer Error: prefix for element is not bound

开发者 https://www.devze.com 2022-12-22 23:26 出处:网络
I\'m getting the following error when trying to convert HL7v3 to HL7v2 The message passed in is: <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>

I'm getting the following error when trying to convert HL7v3 to HL7v2

The message passed in is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:ns3="urn:gov:hhs:fha:nhinc:common:patientcorrelationfacade" xmlns:ns4=开发者_如何学Python"http://schemas.xmlsoap.org/ws/2004/08/addressing" ITSVersion="XML_1.0">
            <id extension="4ae5403:12752e71a17:-7b52" root="1.1.1"/>
...
        </PRPA_IN201306UV02>
    </S:Body>
</S:Envelope>

The error I get is:

ERROR-300: Transformer error ERROR MESSAGE: Error evaluating transformer com.webreach.mirth.server.MirthJavascriptTransformerException: CHANNEL: v3v2ConversionResponseMessage CONNECTOR: sourceConnector SCRIPT SOURCE:

LINE NUMBER: 5 DETAILS: TypeError: The prefix "S" for element "S:Envelope" is not bound. at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:460) at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:356) at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48) at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197) at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:200) at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:251) at org.mule.routing.inbound.SelectiveConsumer.isMatch(SelectiveConsumer.java:61) at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:83) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:231) at com.webreach.mirth.connectors.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:207) at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:108) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:90) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Unknown Source)

When I remove the S: tag in front of the Envelope and Body and redefine the namespace to default, it gives me a new error

TypeError: The prefix "xsi" for attribute "xsi:nil" associated with an element type "targetMessage" is not bound."

This is referring to

<targetMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:nil="true"/>

As if Mirth can't handle the namespaces being defined on the same line as the first use of that element.

Any suggestions would be useful


I had to uncheck the "Strip Namespace" property on my incoming transformer.


To add to the solution, you'll have to ensure that you Strip Namespace from:

  • the Source Transformer's Inbound AND Outbound Message Template
  • the Destination Transformer's Inbound Message Template

The Inbound:

Mirth Transformer Error: prefix for element is not bound

0

精彩评论

暂无评论...
验证码 换一张
取 消