English 中文(简体)
称职
原标题:referencing a class as a web service

实现这一目标的最佳途径是什么。

我正在开发应用软件,作为网络服务。 这笔钱涉及一名雇员,并退还一名雇员的物品,该物品含有大量有关该雇员的信息。 (姓名、身份、全时/非全时等)

我想,我们现有的两项建议(以及今后更多的建议)能够称之为网络服务所将拥有的一种方法,并归还雇员的物体。 (此时此网络服务点还称,该目标可能增加了新的领域——薪金率等)。

我将如何在现有应用中从这一网络服务参考中创造新的目标。

我是否把它像<条码>Dim Employee”一样,成为新的帝国_webservice.employee?

那么,能够使用该物体? 或者,最好的做法是否也包括同一类别档案? 似乎不希望这样做,因为如果我改变这一类别,那么我就必须在任何地方这样做。

感谢对此作出的任何澄清。

最佳回答

当你在网上申请中添加提及网络服务时,该网络服务所暴露的物体在你为这一网络服务而创建的名称空间中,在你的申请中添加。

So, any reference to classes from that web service would need to reference the namespace for that web service, as you have indicated. You could also have an Imports WebServiceNameSpace if you don t want to fully qualify every class.

如果你使用自动网络服务接口生成功能,那么你就能够真正包括班级档案。 净额。

此外,如果你改变网络服务中的特性,这些更新的房地产就会向客户传播,直到你更新项目中的网络服务参考。

最后,如果你想在客户方面增加网络服务班的方法或额外性质,你可以使用<条码>部分<>。

例如,我要说,网络服务只提供每小时工资,但我要显示客户每周的工资。 我可以将网络服务类别扩大如下:

Namespace emp_webservice
  Partial Public Class employee
      Public Function GetWeeklyPayRate() As Decimal
          Return Me.HourlyRate * 8 * 5
      End Function
  End Class
End Namespace
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签