将Web服务对象映射到.NET对象 [英] Mapping Web Service Objects to .NET objects

查看:81
本文介绍了将Web服务对象映射到.NET对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些用Linux编写的用PHP编写的Web服务。这些Web服务具有它们之间通用的对象。例如,其中一个对象是CallerInfo对象。它定义如下:

来电者信息字符串:用户名字符串:密码
字符串:应用程序名称

到目前为止这么好。所以我将这些作为服务引用添加到我的项目中。问题是,现在我对每个使用此对象的命名空间都有一个CallerInfo定义。所以我有一个MyProg.MyService1.CallerInfo和一个MyProg.MyService2.CallerInfo。

我以为我会试验这个整个映射的东西。所以我在我的.NET应用程序中创建了一个名为CallerInfo的类,它包含相同的属性并重新引用了我的对象。不幸的是,我认为它不起作用。它仍然希望我将特定的调用者信息传递给特定对象。有没有办法正确地做到这一点?或者是否只能使用.NET提供的服务?

I have a few web services that were written in PHP running on a Linux box.  These web services have objects that are common between them.  For example, one of the objects is the CallerInfo object.  It is defined as follows:

CallerInfo
string: UserName
string: Password
string: ApplicationName

So far so good.  So I add these as service references to my project.  The problem is, is now I have a CallerInfo definition for each namespace that utilizes this object.  So I have a MyProg.MyService1.CallerInfo and a MyProg.MyService2.CallerInfo.

I thought I'd experiment with this whole mapping thing.  So I created a class in my .NET application that is called CallerInfo and contains the same properties and refereshed my objects.  Unfortunatly I don't think it works.  It still wants me to pass a specific caller info to a specific object.  Is there a way to do this correctly?  Or is it only possible with .NET made services?

推荐答案

只能使用WCF。

什么是"整体"映射事物"你是指?
It's only possible with WCF.

What "whole mapping thing" are you referring to?


这篇关于将Web服务对象映射到.NET对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆