Webservices & Babelfish Error

Posted on 2006-11-14
Last Modified: 2013-12-24
I'm just starting to play around with webservices and an AJAX call to a cfc and have run into an issue with babelfish which appears to be a bug with the service but I'm wondering if it's an issue with something i'm doing wrong

This bit works
<cfset transstring = "My text. To provide many people an opportunity to try some food and have some fun. Those with ears will like it too. Another friend wanted some things and I"

<cfset transstring = "My text. To provide many people an opportunity to try some food and have some fun. Those with ears will like it too. Another friend wanted some things and I thought"

fails because the first occurrence of an accent character returned is in pensé the translation of the last word "thought".

length of the text doesn't seem to matter

<cfset transstring = "i would like to go swimming in the pool"> works

<cfset transstring = "i would like to go swimming in the summer"> fails (été)  

the error returned is

"    Could not perform web service invocation "BabelFish".
 Here is the fault returned when invoking the web service operation:


 faultCode: {}Server.userException
 faultString: Invalid byte 2 of 3-byte UTF-8 sequence.
      {} Invalid byte 2 of 3-byte UTF-8 sequence.
      at Source)
      at Source)
      at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
      at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configu... </pre>

the code in the cfc is

  webservice = ""
  method = "BabelFish"
  returnVariable = "translated">

<cfinvokeargument name="translationmode" value="en_fr" />
<cfinvokeargument name="sourcedata" value="#transstring#" />

ca anyone replicate this...

anyone have any workarounds if it is a bug...

Question by:SidFishes
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 20

Accepted Solution

trailblazzyr55 earned 500 total points
ID: 17942408
I'm not sure, I tried this myself and got the same error, I also went to a site that used the babel fish web service for sample translation and it choked on the same strings your's had problems with. However I couldn't find anything in relation to setting an encoding so you could return a translation without an error. I have a feeling it's a limit to the web service or at least a free version, haven't used it too much myself to know more or if there's a different version with that fixed...

LVL 36

Author Comment

ID: 17942719
what i figured...frustrating though as a translation webservice that can't handle characters created by the translation (duh) is somewhat pointless...I'll leave the q open and see if anyone else has ideas.
LVL 36

Author Comment

ID: 17947257
It's not a bug, it's a feature!  whee...

apparently it works fine when the web service server is running OS/400 but oops...nothing else as there is no appropriate translation step...

ah well...

pts to trail for taking the time to verify

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question