Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F# WSDL code generation

Tags:

soap

wsdl

wcf

f#

I'm using VS.NET 2010 integrated shell with F# and I'm trying to consume a soap web service... How do I go about generating F# source? I tried

wsdl l:"C:\Program Files (x86)\FSharpPowerPack-2.0.0.0\bin\FSharp.Compiler.CodeDom.dll" http://localhost/?wsdl

Along with

wsdl /language:"Microsoft.FSharp.Compiler.CodeDom.FSharpCodeProvider, Microsoft.FSharp.Compiler.CodeDom, Version=1.9.2.9, Culture=neutral, PublicKeyToken=a19089b1c74d0809"

However I can't seem to get the /language switch to work.

EDIT:

taspeotis' answer got me going... This generated F# source for the web service:

gacutil -i "C:\Program Files (x86)\FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.dll"
svcutil /language:"Microsoft.FSharp.Compiler.CodeDom.FSharpCodeProvider, FSharp.Compiler.CodeDom, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809" http://localhost/?wsdl
like image 811
jizugu Avatar asked Oct 13 '22 20:10

jizugu


1 Answers

Have you added FSharp.Compiler.CodeDom.dll to the GAC? Use gacutil.exe to do this.

3rd party edit

Here an example gacutil.exe /l System.XML.Linq to list certain assemblies. Besides to FSharp.Compiler.CodeDom (source) an alternative might be the FSharp.Data library

Quote from jizugu: This generated F# source for the web service:

gacutil -i 
   "C:\Program Files (x86)\FSharpPowerPack-2.0.0.0\bin\FSharp.PowerPack.dll"

svcutil 
  /language:"Microsoft.FSharp.Compiler.CodeDom.FSharpCodeProvider  
        ,FSharp.Compiler.CodeDom, Version=2.0.0.0, Culture=neutral
        ,PublicKeyToken=a19089b1c74d0809" http://localhost/?wsdl
like image 71
ta.speot.is Avatar answered Jan 04 '23 22:01

ta.speot.is