I'm using the LanguageService (translation service) from Bing. I generated the F# soap client code with svcutil (and modified it a little to got it working) but got stuck with some methods that use the word to in their parameters. And it is reserved in F#.
[<System.ServiceModel.OperationContractAttribute(Action="http://api.microsofttranslator.com/V2/LanguageService/Translate", ReplyAction="http://api.microsofttranslator.com/V2/LanguageService/TranslateResponse")>]
abstract Translate :appId:string * text:string * from:string * to:string * contentType:string * category:string -> string
I already tried with _to and __to without luck.
I don't know if there is any way to undefine keywords or define the parameter another way (something like this: SOAPpy - reserved word in named parameter list ).
Thanks in advance!
abstract Translate :appId:string * text:string * from:string * ``to``:string * contentType:string * category:string -> string
Double back-ticks allow you to put almost any string (including spaces and punctuation, and obviously reserved words).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With