web stats
Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-03-2007, 10:10 AM
fernando.ramirez fernando.ramirez is offline
Mirth Newb
 
Join Date: Dec 2006
Posts: 24
fernando.ramirez
Default Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

I'm using a inbound channel with source File Reader and destination SOAP sender.

I get the following error:

Error invoking Web Service
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: getTextXxx() methods can not be called on START_ELEMENT
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:getTextXxx() methods can not be called on START_ELEMENT
at org.apache.axis.message.SOAPFaultBuilder.createFau lt(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElemen t(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.en dElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.sc anEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.pa rse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPar t.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.ja va:424)
at org.apache.axis.client.Call.invokeEngine(Call.java :2785)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:1862)
at org.mule.providers.soap.axis.AxisMessageDispatcher .invokeWebService(AxisMessageDispatcher.java:238)
at org.mule.providers.soap.axis.AxisMessageDispatcher .doDispatch(AxisMessageDispatcher.java:208)
at org.mule.providers.AbstractMessageDispatcher$Worke r.run(AbstractMessageDispatcher.java:257)
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)

{http://xml.apache.org/axis/}hostname:FERNANDOXP

getTextXxx() methods can not be called on START_ELEMENT
at org.apache.axis.message.SOAPFaultBuilder.createFau lt(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElemen t(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.en dElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.sc anEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.pa rse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPar t.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.ja va:424)
at org.apache.axis.client.Call.invokeEngine(Call.java :2785)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:1862)
at org.mule.providers.soap.axis.AxisMessageDispatcher .invokeWebService(AxisMessageDispatcher.java:238)
at org.mule.providers.soap.axis.AxisMessageDispatcher .doDispatch(AxisMessageDispatcher.java:208)
at org.mule.providers.AbstractMessageDispatcher$Worke r.run(AbstractMessageDispatcher.java:257)
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)


My XML Channel configuration is:

<com.webreach.mirth.model.Channel>
<id>d04f1e4f-d02d-487d-9c51-c1f0325f6c9d</id>
<name>TURRIANO_OUT</name>
<description></description>
<enabled>true</enabled>
<version>1.3.1</version>
<revision>8</revision>
<direction>INBOUND</direction>
<protocol>HL7</protocol>
<mode>BROADCAST</mode>
<sourceConnector>
<name>sourceConnector</name>
<properties>
<property name="checkFileAge">0</property>
<property name="charsetEncoding">DEFAULT_ENCODING</property>
<property name="fileAge">0</property>
<property name="autoDelete">0</property>
<property name="pollingFrequency">5000</property>
<property name="DataType">File Reader</property>
<property name="moveToDirectory">C:/turriano</property>
<property name="sortAttribute">date</property>
<property name="fileFilter">*.hl7</property>
<property name="host">C:/turriano</property>
<property name="moveToPattern">${ORIGINALNAME}.bak</property>
</properties>
<transformer>
<steps/>
</transformer>
<filter>
<rules/>
</filter>
<transportName>File Reader</transportName>
</sourceConnector>
<destinationConnectors>
<com.webreach.mirth.model.Connector>
<name>TURRIANO</name>
<properties>
<property name="host">axis:http://localhost:8080/turriano_srv/s...ice</property>
<property name="definition">&lt;com.webreach.mirth.model.ws. WSDefinition&gt;
&lt;operations&gt;
&lt;entry&gt;
&lt;string&gt;runService&lt;/string&gt;
&lt;com.webreach.mirth.model.ws.WSOperation&gt;
&lt;name&gt;runService&lt;/name&gt;
&lt;parameters&gt;
&lt;com.webreach.mirth.model.ws.WSParameter&gt;
&lt;name&gt;in0&lt;/name&gt;
&lt;type&gt;string&lt;/type&gt;
&lt;value&gt;intLabReceiver&lt;/value&gt;
&lt;array&gt;false&lt;/array&gt;
&lt;Null&gt;false&lt;/Null&gt;
&lt;minOccurs&gt;0&lt;/minOccurs&gt;
&lt;maxOccurs&gt;0&lt;/maxOccurs&gt;
&lt;nillable&gt;false&lt;/nillable&gt;
&lt;complex&gt;false&lt;/complex&gt;
&lt;/com.webreach.mirth.model.ws.WSParameter&gt;
&lt;com.webreach.mirth.model.ws.WSParameter&gt;
&lt;name&gt;in1&lt;/name&gt;
&lt;type&gt;base64Binary&lt;/type&gt;
&lt;value&gt;${message.transformedData}&lt;/value&gt;
&lt;array&gt;false&lt;/array&gt;
&lt;Null&gt;false&lt;/Null&gt;
&lt;minOccurs&gt;0&lt;/minOccurs&gt;
&lt;maxOccurs&gt;0&lt;/maxOccurs&gt;
&lt;nillable&gt;false&lt;/nillable&gt;
&lt;complex&gt;false&lt;/complex&gt;
&lt;/com.webreach.mirth.model.ws.WSParameter&gt;
&lt;/parameters&gt;
&lt;soapActionURI&gt;&lt;/soapActionURI&gt;
&lt;namespace&gt;http://webservices.bie.cisos.sescam..../namespace&gt;
&lt;/com.webreach.mirth.model.ws.WSOperation&gt;
&lt;/entry&gt;
&lt;/operations&gt;
&lt;complexTypes/&gt;
&lt;serviceEndpointURI&gt;http://XXX.XXX.XXX.XXX:XXXX/higeia/s...ndpointURI&gt;
&lt;/com.webreach.mirth.model.ws.WSDefinition&gt;</property>
<property name="wsdlUrl">http://localhost:8080/turriano_srv/s...sdl</property>
<property name="method">runService</property>
<property name="serviceEndpoint">http://localhost:8080/turriano_srv/s...ice</property>
<property name="soapEnvelope">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
&lt;soap:Envelope xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
&lt;soap:Body soap:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;runService xmlns=&quot;http://webservices.bie.cisos.sescam.org&quot;&gt;&#x0D;
&lt;in0&gt;intLabReceiver&lt;/in0&gt;&#x0D;
&lt;in1&gt;${message.transformedData}&lt;/in1&gt;&#x0D;
&lt;/runService&gt;&#x0D;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</property>
<property name="soapActionURI"></property>
<property name="DataType">SOAP Sender</property>
</properties>
<transformer>
<steps/>
</transformer>
<filter>
<rules/>
</filter>
<transportName>SOAP Sender</transportName>
</com.webreach.mirth.model.Connector>
</destinationConnectors>
<properties>
<property name="synchronous">false</property>
<property name="encryptData">false</property>
<property name="store_messages">true</property>
<property name="initialState">started</property>
<property name="max_message_age">-1</property>
<property name="transactional">false</property>
<property name="error_messages_only">false</property>
<property name="recv_xml_encoded">false</property>
</properties>
<preprocessingScript>// Modify the message variable below to pre process data&#x0D;
return message;</preprocessingScript>
</com.webreach.mirth.model.Channel>


Any idea what is happening?

Thanks


Reply With Quote
  #2  
Old 01-03-2007, 12:15 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

That error is coming from the SOAP server Mirth is connecting to. It might me an issue with passing the HL7 data over HTTP without being encoded. Try using the entity encoder

Code:
${encoder.encode(${message.rawData})}
__________________
Chris Lang
Reply With Quote
  #3  
Old 01-04-2007, 09:11 AM
fernando.ramirez fernando.ramirez is offline
Mirth Newb
 
Join Date: Dec 2006
Posts: 24
fernando.ramirez
Default Re: Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

putting $encoder.encode I don't get the excepcion.
But I have several questions.

what do the function $encoder.encode.

My param in1 is base64. Do I have to make this transformation and how?

Thanks.
Reply With Quote
  #4  
Old 01-04-2007, 10:19 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

The encoder converts the text passed in into valid HTML. It simply encodes all entities (such as ampersands and quotes).

In order to pass base64, you will need to perform a transformation and a mapping.

1) Google base64 javascript and grab the code to perform the encoding
2) Create a transformer step, change the type to javascript and paste the function you found
3) Create a mapping step and call the variable anything. In the mapping part put the name of the base64 function and messageObject.getRawData(). Ex:
Code:
base64encode(messageObject.getRawData())
4) In your SOAP sender change $message.rawData to ${your_var_name}. You can also drag it from the var list on the right.

-Chris
__________________
Chris Lang
Reply With Quote
  #5  
Old 01-04-2007, 11:03 AM
fernando.ramirez fernando.ramirez is offline
Mirth Newb
 
Join Date: Dec 2006
Posts: 24
fernando.ramirez
Default Re: Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

Thanks for you quick response.
We have made the transformation using java class (sun.misc.BASE64Encoder)
Reply With Quote
  #6  
Old 01-04-2007, 03:17 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Error using SOAP sender: getTextXxx() methods can not be called on START_ELEMENT

Excellent, glad it's working!
__________________
Chris Lang
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
Java SOAP sender writing to Mirth SOAP listener johnconnors General Discussion 1 01-27-2009 02:30 AM
Soap Sender and SOAP with attachments rescue Support 0 07-02-2008 03:14 AM
SOAP Listener & SOAP Sender Help required !! araheem Development 2 09-28-2007 08:42 AM
Channel router inbound donīt work with soap listener and soap sender together. friscov Support 7 02-01-2007 10:31 AM
Error using SOAP Sender Destination in INBOUND channel friscov Support 5 12-05-2006 09:10 AM


All times are GMT -8. The time now is 03:04 AM.


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