web stats
namespace error hl7xml - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2007, 12:23 AM
apalmero apalmero is offline
Mirth Newb
 
Join Date: Nov 2006
Posts: 12
apalmero
Default namespace error hl7xml

Hello,

I`m using mirth 1.4, and I have a SOAP to SOAP channel. The enter
message is a HL7xml.

<?xml version="1.0" encoding="UTF-8"?>
<ns2:RSP_K22 xmlns:ns2="http://mynamespace.com/hl7">
<ns2:MSH>
<ns2:MSH.1>^~\&</ns2:MSH.1>
<ns2:MSH.2>ISO-8859-1</ns2:MSH.2>
....

doesn´t Mirth work with different namespaces?

this is the error:

ERROR-200: Filter error
ERROR MESSAGE: Error evaluating filter
org.mozilla.javascript.EcmaError: TypeError: error: Use of undefined namespace prefix: ns2 (9e6f7aa1-3eab-4b0e-b788-414f01eedd7d#5)
....

console:
ERROR 2007-03-30 10:25:07,115 [_soapConnector#1619090.soap:Mirth.receiver.2] com.webreach.mirth.server.mule.providers.soap.Serv iceProxy$AxisServiceHandler: org.mule.umo.routing.RoutingException: Failed to transform message before applying the filter. Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.webreach.mirth .server.mule.providers.soap.axis.AxisConnector@1a8 e53c, endpointUri=soap://localhost:8090/services, transformer=Transformer{name='SOAPRequestToString' , returnClass=false, returnClass=false, sourceTypes=[]}, name='_soapEndpoint#-322513352', type='receiver', properties={}, transactionConfig=org.mule.impl.MuleTransactionCon fig@17a6bd, filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: [Ljava.lang.Object;



Reply With Quote
  #2  
Old 03-30-2007, 03:51 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: namespace error hl7xml

For a valid XML/HL7 you should use the formal namespace:
Code:
xmlns="urn:hl7-org:v2xml"
Reply With Quote
  #3  
Old 03-30-2007, 01:43 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: namespace error hl7xml

Mirth strips out namespace declarations on incoming messages (to allow the use of msg[] and tmp[] notations).

You can add namespaces back in the transformer by doing:

msg.setNamespace(new Namespace("ns2", "http://mynamespace.com/hl7")); in a Javascript step.
__________________
Chris Lang
Reply With Quote
  #4  
Old 04-02-2007, 12:43 AM
apalmero apalmero is offline
Mirth Newb
 
Join Date: Nov 2006
Posts: 12
apalmero
Default Re: namespace error hl7xml

Thanks. Thats what I needed
Reply With Quote
  #5  
Old 04-18-2007, 05:26 AM
huubvandemortel huubvandemortel is offline
OBX.2 Kenobi
 
Join Date: Apr 2007
Posts: 55
huubvandemortel
Default Re: namespace error hl7xml

I'm having the same problem. Working on Mirth 1.4.0 I find it difficult to follow suggestions when the documentation is behind and almost no examples are available.

If I try to create a transformer step the only type I see is type=Mapper.

So How do I create a javascript step ???

Reply With Quote
  #6  
Old 04-18-2007, 05:59 AM
nshaik nshaik is offline
Mirth Guru
 
Join Date: Sep 2006
Posts: 302
nshaik
Default Re: namespace error hl7xml

Transformer screen / Right-click / Add New Step / Shows a row with "Name" and "Mapper" columns / Double click under "Type" / Dropdown List shows "Mapper", Message Builder", and "JavaScript" / Select "JavaScript".
Reply With Quote
  #7  
Old 04-18-2007, 06:00 AM
nshaik nshaik is offline
Mirth Guru
 
Join Date: Sep 2006
Posts: 302
nshaik
Default Re: namespace error hl7xml

Transformer screen / Right-click / Add New Step / Shows a row with "Name" and "Type" columns / Double click under "Type" / Dropdown List shows "Mapper", "Message Builder", and "JavaScript" / Select "JavaScript".
Reply With Quote
  #8  
Old 04-18-2007, 01:12 PM
huubvandemortel huubvandemortel is offline
OBX.2 Kenobi
 
Join Date: Apr 2007
Posts: 55
huubvandemortel
Default Re: namespace error hl7xml

Thats a neat one

But still , being a beginner I permit myself to ask a little bit further. The javascript does not have the intended effect.

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>

ERROR-200: Filter error
ERROR MESSAGE: Error evaluating filter
org.mozilla.javascript.EcmaError: TypeError: error: Use of undefined namespace prefix: soap (ce5b78e9-be24-48dd-9a65-d7492eb3ed06#5)
at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3226)
at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3216)
at org.mozilla.javascript.ScriptRuntime.typeError(Scr iptRuntime.java:3232)
at org.mozilla.javascript.xmlimpl.XML.createFromJS(XM L.java:378)
at org.mozilla.javascript.xmlimpl.XML.jsConstructor(X ML.java:3050)
at org.mozilla.javascript.xmlimpl.XMLObjectImpl.execI dCall(XMLObjectImpl.java:546)
at org.mozilla.javascript.IdFunctionObject.call(IdFun ctionObject.java:124)
at org.mozilla.javascript.BaseFunction.construct(Base Function.java:310)
at org.mozilla.javascript.ScriptRuntime.newObject(Scr iptRuntime.java:2067)
at org.mozilla.javascript.gen.c137._c2(ce5b78e9-be24-48dd-9a65-d7492eb3ed06:5)
at org.mozilla.javascript.gen.c137.call(ce5b78e9-be24-48dd-9a65-d7492eb3ed06)
at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
at org.mozilla.javascript.gen.c137._c0(ce5b78e9-be24-48dd-9a65-d7492eb3ed06:6)
at org.mozilla.javascript.gen.c137.call(ce5b78e9-be24-48dd-9a65-d7492eb3ed06)
at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
at org.mozilla.javascript.gen.c137.call(ce5b78e9-be24-48dd-9a65-d7492eb3ed06)
at org.mozilla.javascript.gen.c137.exec(ce5b78e9-be24-48dd-9a65-d7492eb3ed06)
at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateFilterScript(JavaScriptTra nsformer.java:268)
at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:221)
at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:492)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:230)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)
at com.webreach.mirth.server.mule.providers.vm.VMMess ageReceiver.getMessages(VMMessageReceiver.java:105 )
at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:73)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
at java.lang.Thread.run(Unknown Source)


I'm trying to process the response on a SOAP request done in channel-1. Within the destination definition in channel-1 I send the response to channel-2, being a channel reader. On the source I defined a transformer step with

msg.setNamespace(new Namespace("soap","http://schemas.xmlsoap.org/soap/envelope/"));

Is there anything clearly wrong here ??

I would like to transform the SOAP response to a HL7 message and send it to the orignal Client ??? Can I do that within channel-1 ??
Reply With Quote
  #9  
Old 04-18-2007, 11:37 PM
huubvandemortel huubvandemortel is offline
OBX.2 Kenobi
 
Join Date: Apr 2007
Posts: 55
huubvandemortel
Default Re: namespace error hl7xml

I looked at JavaScriptTransformer and evaluateFilterScript but there is no Filter defined. I tried to create a filter step with a simple return true;
but that did not help.

I tried to put the setNameSpace in the first step of a filterscript with no luck

There are some logger.debug and logger.error statements where can I find its output (I dont see it in the mirth.log or server console )?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WS: Use of undefined namespace prefix bolota Support 2 06-15-2010 11:31 AM
Problems with the namespace of an HL7 XML Doris Support 8 02-18-2009 02:29 AM
Reg. Xml namespace srinivasay Support 4 02-11-2009 03:53 PM
SOAP envelope namespace problem krlosnow Support 2 10-24-2008 12:12 AM
SOAP Listener namespace cord73 Support 2 05-03-2007 05:17 AM


All times are GMT -8. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation