Serialization

B

Brock Allen

Your web service needs a XML namespace since it's defining a XML Schema.
Control this namespace this way:

[WebService(Namespace="http://www.develop.com/webservices/")]
public class Calc
{
[WebMethod]
public int Add(int n1, int n2)
{
int sum = n1 + n2;
return(sum);
}
}
 
J

jsh02_nova

Does anybody know how to control the serialization of the response a
webmethod? In short how can modify the response stream to remove the <string
xmlns="http://tempuri.org/"> and the </string> tags?
 
J

jsh02_nova

Thanks for the replay Brock.
Actually what I used was Me.Context.Response.Write("<?xml version=""1.0""?>"
+ SomeData) and I got the xml I needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top