2013-01-15 64 views
3

當我使用WSDL類型提供程序爲Confluence SOAP服務創建客戶端時,我得到具有(unit - > unit)簽名的所有方法。F#WSDL類型提供程序和Confluence

#r "System.ServiceModel.dll" 
#r "FSharp.Data.TypeProviders.dll" 
open System.ServiceModel 
open Microsoft.FSharp.Data.TypeProviders 

[<Literal>] 
let ConfluenceServiceWsdl = "https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2?WSDL" 
type ConfluenceService = Microsoft.FSharp.Data.TypeProviders.WsdlService<ConfluenceServiceWsdl> 

let service = ConfluenceService.``Getconfluenceservice-v2``() 

service.getPages;; 
... 
val it : (unit -> unit) = <fun:[email protected]> 

,但它應該是這樣的 Vector<PageSummary> getPages(String token, String spaceKey) - (從Remote Confluence Methods文檔)

我在做什麼錯?如何創建全功能服務客戶端? WSDL有問題嗎?

P.S. Confluence SOAP WSDL由Apache Axis生成。

回答

2

看起來像this issue。作爲一種變通方法(髒的)可以執行以下操作:

  1. 指定LocalSchemaFile = .wsdlschema和ForceUpdate =假
  2. 打開.wsdlschema,固定對應於故障消息,並添加相應的元件

作爲樣品:

<wsdl:message name="VersionMismatchException"> 
    <wsdl:part name="fault" type="tns1:VersionMismatchException"/> 
</wsdl:message> 

將成爲

<wsdl:message name="VersionMismatchException"> 
    <wsdl:part name="fault" element="tns1:VersionMismatchException"/> 
</wsdl:message> 

<complexType name="AlreadyExistsException"> 
    <complexContent> 
     <extension base="tns1:RemoteException"> 
      <sequence/> 
     </extension> 
    </complexContent> 
</complexType> 

將改爲

<complexType name="AlreadyExistsException"> 
    <complexContent mixed="false"> 
     <extension base="tns1:RemoteException"> 
      <sequence /> 
     </extension> 
    </complexContent> 
</complexType> 
<element name="AlreadyExistsException" type="tns1:AlreadyExistsException"/> 
+0

我已經糾正了文件,像你說的那樣,但它並不能幫助。 [confluenceservice-v2.wsdlschema](https://gist.github.com/4550826) –

+0

試試這個:https://gist.github.com/4550877 – desco

相關問題