SidFishes
asked on
Webservices & Babelfish Error
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"
but
<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:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.UTFDataFormatExcep tion: Invalid byte 2 of 3-byte UTF-8 sequence.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.UTFDa taFormatEx ception: Invalid byte 2 of 3-byte UTF-8 sequence.
at org.apache.xerces.impl.io. UTF8Reader .invalidBy te(Unknown Source)
at org.apache.xerces.impl.io. UTF8Reader .read(Unkn own Source)
at org.apache.xerces.impl.XML EntityScan ner.load(U nknown Source)
at org.apache.xerces.impl.XML EntityScan ner.scanCo ntent(Unkn own Source)
at org.apache.xerces.impl.XML DocumentFr agmentScan nerImpl.sc anContent( Unknown Source)
at org.apache.xerces.impl.XML DocumentFr agmentScan nerImpl$Fr agmentCont entDispatc her.dispat ch(Unknown Source)
at org.apache.xerces.impl.XML DocumentFr agmentScan nerImpl.sc anDocument (Unknown Source)
at org.apache.xerces.parsers. XML11Confi guration.p arse(Unkno wn Source)
at org.apache.xerces.parsers. XML11Confi gu... </pre>
the code in the cfc is
<cfinvoke
webservice = "http://www.xmethods.net/sd/2001/BabelFishService.wsdl"
method = "BabelFish"
returnVariable = "translated">
<cfinvokeargument name="translationmode" value="en_fr" />
<cfinvokeargument name="sourcedata" value="#transstring#" />
</cfinvoke>
ca anyone replicate this...
anyone have any workarounds if it is a bug...
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"
but
<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:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.UTFDataFormatExcep
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.UTFDa
at org.apache.xerces.impl.io.
at org.apache.xerces.impl.io.
at org.apache.xerces.impl.XML
at org.apache.xerces.impl.XML
at org.apache.xerces.impl.XML
at org.apache.xerces.impl.XML
at org.apache.xerces.impl.XML
at org.apache.xerces.parsers.
at org.apache.xerces.parsers.
the code in the cfc is
<cfinvoke
webservice = "http://www.xmethods.net/sd/2001/BabelFishService.wsdl"
method = "BabelFish"
returnVariable = "translated">
<cfinvokeargument name="translationmode" value="en_fr" />
<cfinvokeargument name="sourcedata" value="#transstring#" />
</cfinvoke>
ca anyone replicate this...
anyone have any workarounds if it is a bug...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's not a bug, it's a feature! whee...
https://issues.apache.org/jira/browse/AXISCPP-964
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
https://issues.apache.org/jira/browse/AXISCPP-964
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
ASKER