web stats
ERROR - Error creating web service dispatch - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2020, 06:00 AM
hugito24 hugito24 is offline
What's HL7?
 
Join Date: Feb 2020
Posts: 5
hugito24 is on a distinguished road
Unhappy ERROR - Error creating web service dispatch

Hello,

I'v been developing in the past days some solutions in Mirth. I'm fairly new to it but im enjoying a lot!

I have this situation, the company I work with uses a SOAP WS to retrieve messages from a Database and then process them.

Here is what I have done so far:

I created a JS Reader to trigger the process to start (its like a dummy Source) and I give it a 1m scheduel.

I add a Return "a"; on the JS reader Script otherwise for some reason it doesnt pass to the Destinations part.

Then in the Destinations part I created a Web Service Sender and configured it to aim for the SOAP Action I want to.

Here is the catch, when I run the service at SOAPUI it works normally and I get a response if there are messages or not to be processed.

When I run the service at Mirth it gives me this ERROR:

ERROR: Error creating web service dispatch [XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x74 (at char #6511, byte #3999)]

Iv tried everything I could to try around the problem, seams that I have some invalid UTF-8 caracter but the SOAP Envelope is the same in SOAP UI and in Mirth.
Reply With Quote
  #2  
Old 02-06-2020, 07:32 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,346
cory_cole is on a distinguished road
Default

Your data is not in UTF-8 format and has characters that are invalid to UTF-8. You need to determine which format it is in and remove the invalid characters and convert UTF-8 or see if the receiving system can accept that format.
Reply With Quote
  #3  
Old 02-07-2020, 01:52 AM
hugito24 hugito24 is offline
What's HL7?
 
Join Date: Feb 2020
Posts: 5
hugito24 is on a distinguished road
Default

Quote:
Originally Posted by cory_cole View Post
Your data is not in UTF-8 format and has characters that are invalid to UTF-8. You need to determine which format it is in and remove the invalid characters and convert UTF-8 or see if the receiving system can accept that format.
Thanks for the answer! I used a UTF-8 valitdator and it didnt say I had invalid chars, also i use the Same SOAP Envelope on SOAPUI and it doesnt give me any UTF-8 invalid chars message.

I was able to fix this by swapping the Connector Type to 'HTTP Sender' and adding on the Headers the SOAP action and at content type this 'text/xml;charset=UTF-8'.

Then I send at the content field the soap envelope.

It works this way, but the other error is still haunting me
Reply With Quote
  #4  
Old 02-07-2020, 08:48 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,095
agermano is on a distinguished road
Default

Curious if your mirth server is running on windows?
Reply With Quote
  #5  
Old 02-10-2020, 01:04 AM
hugito24 hugito24 is offline
What's HL7?
 
Join Date: Feb 2020
Posts: 5
hugito24 is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
Curious if your mirth server is running on windows?
Yes, its running on a Windows Server 2012 r2 machine.
Reply With Quote
  #6  
Old 02-13-2020, 10:25 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,095
agermano is on a distinguished road
Default

There's probably some part in the mirth code that is converting a string to byte[] using the default charset, which is UTF-8 on linux, but not on Windows. The windows default and utf-8 are the same for any US-ASCII chars, but not for others.

Last edited by agermano; 02-13-2020 at 10:28 AM.
Reply With Quote
Reply

Tags
error, http sender, soap envelope, utf-8, web service destination

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


All times are GMT -8. The time now is 01:12 PM.


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