NET客户端和Axis Web服务的严重问题 [英] Serious problem with NET client and Axis web service

查看:82
本文介绍了NET客户端和Axis Web服务的严重问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个转贴,附加信息。我有一个Net 2.0客户端(C#

Winform)调用Axis Web服务。 .NET客户端可以进行身份​​验证,

创建请求的对象,序列化对象并发送。在Axis服务器上收到

而没有问题。当响应是单值类型(long,

string等)或值数组时,.NET客户端也可以从Axis Web服务接收响应

类型。


但是如果返回一个对象,它总是显示为空。看看

NetMon,响应值出现在SOAP消息中,但似乎

..Net有麻烦

反序列化SOAP消息成对象。任何想法?


谢谢,

This is a repost, with additional information. I have a Net 2.0 client (C#
Winform) calling an Axis web service. The .NET client can authenticate,
create requested objects, serialize the objects and send. These are received
without issue on the Axis server. The .NET client can also receive responses
from the Axis web service when the response is a single value type (long,
string, etc), or an array of value types.

However if an object is returned, it always appears empty. Looking at
NetMon, the response values appear in the SOAP message, but it seems that
..Net has trouble
deserializing the SOAP message into an object. Any ideas?

Thanks,

推荐答案

" David R" < Da **** @ discuss.microsoft.com写信息

news:94 ************************ ********** @ microsof t.com ...
"David R" <Da****@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...

这是一个重新发布的附加信息。我有一个Net 2.0客户端

(C#

Winform)调用Axis Web服务。 .NET客户端可以进行身份​​验证,

创建请求的对象,序列化对象并发送。在Axis服务器上收到

没有问题的
。当响应是单值类型时,.NET客户端也可以从Axis Web服务接收

响应

(long,

string,等等。或者是一个值类型数组。


但是如果返回一个对象,它总是显示为空。看看

NetMon,响应值出现在SOAP消息中,但似乎

.Net有麻烦

将SOAP消息反序列化为一个东西。有任何想法吗?
This is a repost, with additional information. I have a Net 2.0 client
(C#
Winform) calling an Axis web service. The .NET client can authenticate,
create requested objects, serialize the objects and send. These are
received
without issue on the Axis server. The .NET client can also receive
responses
from the Axis web service when the response is a single value type (long,
string, etc), or an array of value types.

However if an object is returned, it always appears empty. Looking at
NetMon, the response values appear in the SOAP message, but it seems that
.Net has trouble
deserializing the SOAP message into an object. Any ideas?



当命名空间不匹配时,我发生了这种情况。 .NET期望

名称空间B,但是名称空间A和到了。由于它没有收到名称空间B中的任何内容,因此它返回了它从名称空间B中得到的内容。 -

什么都没有!


John

I''ve had this happen when there is a namespace mismatch. .NET is expecting
namespace "B", but namespace "A" arrives instead. Since it didn''t receive
anything from namespace "B", it returns you what it got from namespace "B" -
nothing!

John


John,


感谢您的快速回复。因此我正在创建的对象具有

定义:

公共类WorkRequestTO WSClass.s307a68成员

因为没有填充因为SOAP消息的内容是

xmlns =" http://service.external.xxx.xxxsystems.com:>。我这是对的?如何在没有调整Axis服务命名空间的情况下解决这个问题?


谢谢,


David


" John Saunders"写道:
John,

Thanks for the quick response. So the object I am creating, with the
definition of:
public class WorkRequestTO Member of WSClass.s307a68
isn''t filled because what comes in on the SOAP message is
xmlns="http://service.external.xxx.xxxsystems.com:>. I this correct? How
can I fix this without adapting the namespace of the Axis service?

Thanks,

David

"John Saunders" wrote:

" David R" < Da **** @ discuss.microsoft.com写信息

news:94 ************************ ********** @ microsof t.com ...
"David R" <Da****@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...

这是一个重新发布的附加信息。我有一个Net 2.0客户端

(C#

Winform)调用Axis Web服务。 .NET客户端可以进行身份​​验证,

创建请求的对象,序列化对象并发送。在Axis服务器上收到

没有问题的
。当响应是单值类型时,.NET客户端也可以从Axis Web服务接收

响应

(long,

string,等等。或者是一个值类型数组。


但是如果返回一个对象,它总是显示为空。看看

NetMon,响应值出现在SOAP消息中,但似乎

.Net有麻烦

将SOAP消息反序列化为一个东西。有任何想法吗?
This is a repost, with additional information. I have a Net 2.0 client
(C#
Winform) calling an Axis web service. The .NET client can authenticate,
create requested objects, serialize the objects and send. These are
received
without issue on the Axis server. The .NET client can also receive
responses
from the Axis web service when the response is a single value type (long,
string, etc), or an array of value types.

However if an object is returned, it always appears empty. Looking at
NetMon, the response values appear in the SOAP message, but it seems that
.Net has trouble
deserializing the SOAP message into an object. Any ideas?



当命名空间不匹配时,我发生了这种情况。 .NET期望

名称空间B,但是名称空间A和到了。由于它没有收到名称空间B中的任何内容,因此它返回了它从名称空间B中得到的内容。 -

什么都没有!


John


I''ve had this happen when there is a namespace mismatch. .NET is expecting
namespace "B", but namespace "A" arrives instead. Since it didn''t receive
anything from namespace "B", it returns you what it got from namespace "B" -
nothing!

John


我找到了这个,可能是有用的。


SOAP请求包含以下内容:

xmlns =" http://service.external.xxx.xxxsystems.com>。


以下是在reference.cs文件中:


[System.Web.Services.Protocols.SoapDocumentMethodAt致敬("",

RequestNamespace =" http://service.external.xxx.xxxsystems.com" ;,

ResponseNamespace =" http://service.external.xxx.xxxsystems。 com",

Use = System.Web.Services.Description.SoapBindingUse .Literal,

ParameterStyle = System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]

[返回:

System.Xml.Serialization.XmlElementAttribute(" getW orkRequestStatusReturn")]

public WorkRequestStatusTO getWorkRequestStatus(long workRequestId){

object [] results = this.Invoke(" getWork RequestStatus",new

object [] {

workRequestId});

return((WorkRequestStatusTO)(results [0]));


" David R"写道:
I found this, which might be helpful.

The SOAP request contains the following:
xmlns="http://service.external.xxx.xxxsystems.com>.

The following was in the reference.cs file:

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("",
RequestNamespace="http://service.external.xxx.xxxsystems.com",
ResponseNamespace="http://service.external.xxx.xxxsystems.com",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
[return:
System.Xml.Serialization.XmlElementAttribute("getW orkRequestStatusReturn")]
public WorkRequestStatusTO getWorkRequestStatus(long workRequestId) {
object[] results = this.Invoke("getWorkRequestStatus", new
object[] {
workRequestId});
return ((WorkRequestStatusTO)(results[0]));

"David R" wrote:

John,


感谢您的快速回复。因此我正在创建的对象具有

定义:

公共类WorkRequestTO WSClass.s307a68成员

因为没有填充因为SOAP消息的内容是

xmlns =" http://service.external.xxx.xxxsystems.com:>。我这是对的?如何在没有调整Axis服务命名空间的情况下解决这个问题?


谢谢,


David


" John Saunders"写道:
John,

Thanks for the quick response. So the object I am creating, with the
definition of:
public class WorkRequestTO Member of WSClass.s307a68
isn''t filled because what comes in on the SOAP message is
xmlns="http://service.external.xxx.xxxsystems.com:>. I this correct? How
can I fix this without adapting the namespace of the Axis service?

Thanks,

David

"John Saunders" wrote:

" David R" < Da **** @ discuss.microsoft.com写信息

news:94 ************************ ********** @ microsof t.com ...
"David R" <Da****@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...

这是一个重新发布的附加信息。我有一个Net 2.0客户端

(C#

Winform)调用Axis Web服务。 .NET客户端可以进行身份​​验证,

创建请求的对象,序列化对象并发送。在Axis服务器上收到

没有问题的
。当响应是单值类型时,.NET客户端也可以从Axis Web服务接收

响应

(long,

string,等等。或者是一系列值类型。

>

但是如果返回一个对象,它总是显示为空。看看

NetMon,响应值出现在SOAP消息中,但似乎

.Net有麻烦

将SOAP消息反序列化为一个东西。有任何想法吗?
This is a repost, with additional information. I have a Net 2.0 client
(C#
Winform) calling an Axis web service. The .NET client can authenticate,
create requested objects, serialize the objects and send. These are
received
without issue on the Axis server. The .NET client can also receive
responses
from the Axis web service when the response is a single value type (long,
string, etc), or an array of value types.
>
However if an object is returned, it always appears empty. Looking at
NetMon, the response values appear in the SOAP message, but it seems that
.Net has trouble
deserializing the SOAP message into an object. Any ideas?



当命名空间不匹配时,我发生了这种情况。 .NET期望

名称空间B,但是名称空间A和到了。由于它没有收到名称空间B中的任何内容,因此它返回了它从名称空间B中得到的内容。 -

什么都没有!


John

I''ve had this happen when there is a namespace mismatch. .NET is expecting
namespace "B", but namespace "A" arrives instead. Since it didn''t receive
anything from namespace "B", it returns you what it got from namespace "B" -
nothing!

John


这篇关于NET客户端和Axis Web服务的严重问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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