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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reverse Proxy Server 6 78
Apache SSL and mod_rewrite not working 8 123
IIS url rewrite rule for web application 3 52
WEB Farm 6 64
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now