【发布时间】:2014-09-05 18:35:02
【问题描述】:
您好,我正在尝试将 compile 我的 C# 代码转换为 .dll 文件,以便在 VBA script 中使用客户端。
我的 C# 代码引用了一个 SOAP Web 服务并且表现不佳。当我运行csc /target:library file.cs 时,com 上出现以下错误 CS0234 和 CS0246 BbsSecurityContext,BbsEntityResult(Web 服务中的类)。它说com 命名空间在命名空间SOAPTest 中不存在。如果我能提供更多信息,请告诉我。
这是文件中的一个sn-p代码
...
using SOAPTest.com.blueberryhosting.broadviewbbsvcstg;
using System.Runtime.InteropServices;
namespace SOAPTest
{
[Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123E")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Webservice
{
private BbsSecurityContext sc;
public Webservice(string apiKey, string sourceSystem, int userID)
{
createSecurityContext(apiKey, sourceSystem, userID);
}
...
public void getInvestors(string filepath)
{
using (BbsInteropWebService ws = new BbsInteropWebService())
{
BbsEntityResult x = ws.GetInvestors(sc);
if(x.Success)
{
generateCSV(x,filepath);
}
}
}
...
【问题讨论】:
标签: c# .net web-services vba soap