首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

WebService参数有关问题

2013-01-11 
WebService参数问题Webservice方法带了自定义对象作为参数,运行的时候就这样TestThe test form is only av

WebService参数问题
Webservice方法带了自定义对象作为参数,运行的时候就这样
Test
The test form is only available for methods with primitive types as parameters. 
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
新手,不知道该怎么做,自定义对象里面有
public class DataText
{
    public string backupFile = "C:\\temp\\MicrosoftDynamicsAX.bak";
    public Boolean isFullExport = false;
    public Boolean isRecurring = true;
    public string[] axmodels = { "15" };
    public string[][] cleansFields = { new String[] { "SalesTable", "DEL_DeliveryCity", "DEL_DeliveryState" } };
    public DataTextSchedular = new DataTextSchedular();                                    
public DataText()
{
}
}有高手教教我吧
[解决办法]

引用:
public DataTextSchedular = new DataTextSchedular();  

DataTextSchedular 在webservice 里面, 你只能用简单的对象类型
int, bool, string 

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383513
[解决办法]
把你webservice需要的参数封装成一个类  然后序列化通过webservice传过去  接收后在反序列化回来就行了

热点排行