Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Serialization (http://www.velocityreviews.com/forums/t784863-serialization.html)

Brock Allen 04-13-2005 02:18 PM

Re: Serialization
 
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);
}
}

-Brock
DevelopMentor
http://staff.develop.com/ballen



> 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?
>





jsh02_nova 04-14-2005 11:55 AM

Serialization
 
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?

--
thx



jsh02_nova 04-14-2005 06:17 PM

Re: Serialization
 
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.

--

thx
-jsh




All times are GMT. The time now is 01:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.