通过Soap传递一组数字

时间:2022-05-27 02:09:21

I’m fairly new to programming and I’m in need your help.

我是编程新手,我需要你的帮助。

I need to pass an array containing numbers to a Web Service using C# and Soap. And have the Sum of these numbers returned to the console application.

我需要使用c#和Soap将包含数字的数组传递给Web服务。并将这些数字的总和返回到控制台应用程序。

I understand that Array within Soap web services do not work well but I need a solution

我理解Soap web服务中的数组不能很好地工作,但是我需要一个解决方案

1 个解决方案

#1


0  

General info about Webservice: MSDN Web Services

关于Webservice的一般信息:MSDN Web Services

Simple example about how to create SOAP Web services in c#: WebServices c#

关于如何在c#: WebServices c#中创建SOAP Web服务的简单示例

Just change the second example and return an array.

只需更改第二个示例并返回一个数组。

"Via soap" you'll send just an XML document, but if you code the server and the client in c# it's all provided with Visual Studio, you won't even know that you are sending XML, it seems that you are sending objects.

“通过soap”,您将只发送一个XML文档,但是如果您用c#对服务器和客户端进行编码,它们都是由Visual Studio提供的,您甚至不会知道您正在发送XML,似乎您正在发送对象。

#1


0  

General info about Webservice: MSDN Web Services

关于Webservice的一般信息:MSDN Web Services

Simple example about how to create SOAP Web services in c#: WebServices c#

关于如何在c#: WebServices c#中创建SOAP Web服务的简单示例

Just change the second example and return an array.

只需更改第二个示例并返回一个数组。

"Via soap" you'll send just an XML document, but if you code the server and the client in c# it's all provided with Visual Studio, you won't even know that you are sending XML, it seems that you are sending objects.

“通过soap”,您将只发送一个XML文档,但是如果您用c#对服务器和客户端进行编码,它们都是由Visual Studio提供的,您甚至不会知道您正在发送XML,似乎您正在发送对象。