HHMM ...有趣 - 我跑svcutil.exe
從針對您所提供的URL的命令行,而我得到一噸約WSDL發出警告的,我也得到了一些代碼 - 是這樣的:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1", ConfigurationName="ConfluenceSoapService")]
public interface ConfluenceSoapService
{
// CODEGEN: Generating message contract since the wrapper namespace (http://soap.rpc.confluence.atlassian.com) of message getPermissionsRequest does not match the default value (http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1)
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
[System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, Use=System.ServiceModel.OperationFormatUse.Encoded)]
getPermissionsResponse getPermissions(getPermissionsRequest request);
// CODEGEN: Generating message contract since the wrapper namespace (http://soap.rpc.confluence.atlassian.com) of message searchRequest does not match the default value (http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1)
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
[System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, Use=System.ServiceModel.OperationFormatUse.Encoded)]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteException))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(Vector))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePermission))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteNodeStatus))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePageHistory))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteContentPermission))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(AbstractRemotePageSummary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSpaceSummary))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSearchResult))]
searchResponse search(searchRequest request);
所以我會嘗試在命令行中使用svcutil.exe
來生成您的ConfluenceSoapService.cs
文件,然後使用它與您的Confluence服務通信。
+1用於提示svcutil.exe。 – Bernard 2010-09-24 18:41:36
嗯......它似乎與svcutil.exe一起工作。這真的很奇怪。不過謝謝。 – StarKat99 2010-09-24 19:32:33
也適用於我,如果你在Visual Studio的開始菜單下有一個簡短的命令提示符讓svcutil易於訪問,那麼:'svcutil.exe http:// somedomain.com/someapi.wsdl' – AaronLS 2014-04-01 14:10:13