D
Diego Gonzalez
If you remove the comments for the second method it does not works because
of the following error: "The namespace, urn:lagash, is a duplicate."
<%@ WebService Language="c#" Class="TestWebProject.Service1" %>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Xml.Serialization;
namespace TestWebProject
{
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:lagash")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="urn:lagash",
IsNullable=false)]
public class MyRequest
{
public string Something;
}
public class MyDataSet : DataSet
{
public MyDataSet()
{
this.Namespace = "urn:lagash";
}
}
[WebService(Namespace="urn:lagash")]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string Works( [XmlElementAttribute("req", Namespace="urn:lagash")]
MyRequest req )
{
return "Works";
}
/*
[WebMethod]
public string DoesNotWork( [XmlElementAttribute("req",
Namespace="urn:lagash")] MyDataSet req )
{
return "";
}
*/
}
}
Any input appreciated.
DiegoG
of the following error: "The namespace, urn:lagash, is a duplicate."
<%@ WebService Language="c#" Class="TestWebProject.Service1" %>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Xml.Serialization;
namespace TestWebProject
{
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:lagash")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="urn:lagash",
IsNullable=false)]
public class MyRequest
{
public string Something;
}
public class MyDataSet : DataSet
{
public MyDataSet()
{
this.Namespace = "urn:lagash";
}
}
[WebService(Namespace="urn:lagash")]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string Works( [XmlElementAttribute("req", Namespace="urn:lagash")]
MyRequest req )
{
return "Works";
}
/*
[WebMethod]
public string DoesNotWork( [XmlElementAttribute("req",
Namespace="urn:lagash")] MyDataSet req )
{
return "";
}
*/
}
}
Any input appreciated.
DiegoG