Mirth 转换器错误:元素的前缀未绑定
尝试将 HL7v3 转换为 HL7v2 时出现以下错误
传入的消息是:
<?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="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>
我收到的错误是:
ERROR-300:变压器错误 错误消息:评估变压器时出错 com.webreach.mirth.server.MirthJavascriptTransformerException: 通道:v3v2ConversionResponseMessage 连接器:源连接器 脚本来源:
行数:5 详细信息:类型错误:元素“S:Envelope”的前缀“S”未绑定。 在 com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:460) 在 com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:356) 在 org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48) 在 org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197) 在 org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:200) 在 org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:251) 在 org.mule.routing.inbound.SelectiveConsumer.isMatch(SelectiveConsumer.java:61) 在 org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:83) 在 org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) 在 org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) 在 org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:231) 在 com.webreach.mirth.connectors.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:207) 在 org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:108) 在 org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:90) 在 org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) 在 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) 在 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) 在 java.lang.Thread.run(来源不明)
当我删除 Envelope 和 Body 前面的 S: 标记并将命名空间重新定义为默认值时,它给了我一个新的错误
类型错误:与元素类型“targetMessage”关联的属性“xsi:nil”的前缀“xsi”未绑定。”
这是指
<targetMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true"/>
仿佛 Mirth 无法处理与第一次使用在同一行定义的命名空间该元素的
任何建议都会有用。
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="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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我必须取消选中传入变压器上的“Strip Namespace”属性。
I had to uncheck the "Strip Namespace" property on my incoming transformer.
要添加到解决方案,您必须确保从以下位置剥离命名空间:
入站:
< img src="https://i.sstatic.net/17sw5.png" alt="Mirth 入站消息模板条命名空间">
To add to the solution, you'll have to ensure that you Strip Namespace from:
The Inbound: