HighTechTalks DotNet Forums  

Serialization

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Serialization in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Brock Allen
 
Posts: n/a

Default Re: Serialization - 04-13-2005 , 10:18 AM






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



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





Reply With Quote
  #2  
Old   
jsh02_nova
 
Posts: n/a

Default Serialization - 04-14-2005 , 07:55 AM






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



Reply With Quote
  #3  
Old   
jsh02_nova
 
Posts: n/a

Default Re: Serialization - 04-14-2005 , 02:17 PM



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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.