简体   繁体   English

如何将服务引用添加到服务应用程序

[英]How to add a Service Reference to a service application

I am developing a service application in C#. 我正在用C#开发服务应用程序。 I want to consume a SOAP service to my service application. 我想在我的服务应用程序中使用SOAP服务。 when i build my service project, there is no problem and successful build is done. 当我构建服务项目时,没有问题,并且构建成功。 but when i start the service, the service is stopped and the message for stopping my service, in EventViewer of windows is about data types and class of soap service. 但是,当我启动该服务时,该服务将停止,并且在Windows的EventViewer中用于停止我的服务的消息是有关数据类型和soap服务的类的。

but my main question is that, Are there necessary cases for consuming a soap service in a service application in C#???? 但是我的主要问题是,是否有必要在C#的服务应用程序中使用Soap服务?

thanks. 谢谢。

It's not clear from your question whether you'd already added a reference to a SOAP-service or not. 从您的问题尚不清楚,您是否已经添加了对SOAP服务的引用。 If not, then you can do it the way it's described here: How to: Add, Update, or Remove a Service Reference . 如果没有,那么您可以按照此处描述的方式进行操作: 如何:添加,更新或删除服务参考

The order in which I usually do it: 我通常执行的顺序:

  1. Build the project with a SOAP-service 使用SOAP服务构建项目
  2. Run it 运行
  3. Add or Update a reference to the SOAP-service (while it's running) into my other projects, that consume it 在我的其他项目中添加或更新对SOAP服务的引用(运行时),以消耗该引用
  4. Build and run all projects 生成并运行所有项目

Every time the interface of your SOAP-project is changed go through the sequence above again. 每次更改SOAP项目的接口时,请再次按照上述顺序进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM