GovindChittesh / google-api-for-dotnet

Automatically exported from code.google.com/p/google-api-for-dotnet
0 stars 0 forks source link

Google Translator api problem #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
i am getting following error

Google.API.GoogleAPIException: Failed to get response. ---> 
System.Runtime.Serialization.SerializationException: Unable to deserialize XML 
body with root name 'HTML' and root namespace '' (for operation 'Translate' and 
contract ('ILanguageService', 'http://tempuri.org/')) using 
DataContractSerializer. Ensure that the type corresponding to the XML is added 
to the known types collection of the service. Server stack trace: at 
System.ServiceModel.Dispatcher.SingleBodyParameterMessageFormatter.ReadObject(Me
ssage message) at 
System.ServiceModel.Dispatcher.SingleBodyParameterMessageFormatter.DeserializeRe
ply(Message message, Object[] parameters) at 
System.ServiceModel.Dispatcher.DemultiplexingClientMessageFormatter.DeserializeR
eply(Message message, Object[] parameters) at 
System.ServiceModel.Dispatcher.CompositeClientFormatter.DeserializeReply(Message
 message, Object[] parameters) at 
System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc) 
at 
System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime 
operation, ProxyRpc& rpc) at 
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, 
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean 
oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at 
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessag
e methodCall, ProxyOperationRuntime operation) at 
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 
Exception rethrown at [0]: at 
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, 
IMessage retMsg) at 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, 
Int32 type) at Google.API.Translate.ILanguageService.Translate(String 
acceptLanguage, String key, String query, String langpair, String format) at 
Google.API.Translate.TranslateClient.<>c__DisplayClass1.b__0(ILanguageService 
service) at 
Google.API.RequestUtility.GetResultObject[TService,T](RequestCallback`2 
request, Uri address, Binding binding, String referrer) at 
Google.API.RequestUtility.GetResponseData[T,TService](RequestCallback`2 
request, Uri address, Binding binding, String referrer) --- End of inner 
exception stack trace --- at 
Google.API.RequestUtility.GetResponseData[T,TService](RequestCallback`2 
request, Uri address, Binding binding, String referrer) at 
Google.API.GoogleClient.GetResponseData[T,TService](RequestCallback`2 request) 
at Google.API.Translate.TranslateClient.NativeTranslate(String text, String 
from, String to, String format) at 
Google.API.Translate.TranslateClient.Translate(String text, String from, String 
to, String format) at Google.API.Translate.TranslateClient.Translate(String 
text, String from, String to) at _Default.Page_Load(Object sender, EventArgs e) 
in d:\GoogleTranslationAPI\Default.aspx.cs:line 18 

Original issue reported on code.google.com by chourasi...@gmail.com on 16 Feb 2011 at 9:51

GoogleCodeExporter commented 9 years ago
Please help me.How to use this api.

Original comment by chourasi...@gmail.com on 16 Feb 2011 at 9:53