[Mono-bugs] [Bug 324764] Mono runtime ignores XmlRoot attribute when creating SOAP messages
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Apr 21 07:52:45 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=324764
User tdavis at new-atom.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=324764#c3
Trevor Davis <tdavis at new-atom.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tdavis at new-atom.net
--- Comment #3 from Trevor Davis <tdavis at new-atom.net> 2009-04-21 05:52:42 MDT ---
As a work around for this problem, you can put an XmlElement attribute onto the
function parameter to override the name of the request node like the following.
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml.Serialization;
namespace WebLabs.Services
{
/// <summary>
/// Summary description for TestWebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class TestWebService : System.Web.Services.WebService
{
[WebMethod]
public void TestMethod([XmlElement("Object")]XmlTestObject obj)
{
}
[System.Xml.Serialization.XmlRoot("Object")]
public class TestObject
{
public TestObject()
{
}
public string Field = string.Empty;
}
}
}
Hope that is of use to you.
Trevor
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list