473,836 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using SoapFormatter in a WebMethod? (and AOP stuff)

Hello. I have found out that a VS2005 WebService by default serializes
my objects using normal XmlSerializer. Howerver, I need it to serialize
them using SoapFormatter by default (without doing the call in every
"return" statement of each of my webmethods). Can this be done?

By the way, I would also to call a "SanityChec k()" method for every
object that is returned from my webmethods before sending them. Can this
be done without AOP?

I guess that, if the answer to my questions are both "No", I should go
for AOP :(


Andrés [ knocte ]

Jul 18 '07 #1
0 1402

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: James Willock | last post by:
Hi, I have a class derived from ApplicationException as below (excuse formatting): public class MyException : ApplicationException { public string CompanyName { get {return Application.CompanyName;}
by: Wiktor Zychla | last post by:
After signing all my assemblies with strong keys, I've found that the application refuses to deserialize any SOAP serialized data. The message says: Parse error, no assembly associated with the Xml key. and refers to the Xml key: <a1:C_XOptions id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SU2000Plus/sekretariat_RM
by: Philip K | last post by:
I was trying to use Soap serialisation to save some systems settings how ever it fails if the settings contain a Font object, works fine if the Font object is not in the object being serialised. Font is marked in the MS documentation. Exception has been thrown by the target of an invocation. at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
by: Jarda | last post by:
Hi all, i'm looking for some performance comparison some charts. I have read the xmlserializer is better, more flexible and faster (analyzing data types in constructor), but there are some limitation (i.e. public members). SoapFormatter is better to serialize arbitrary data. I have done some tests and SoapFormatter is faster 5 times than XmlSerializer. I don't undestand it, I have tried large arrays, small string .... the result seems the...
by: Jim S | last post by:
I have an application where I have to make a tree of objects. To do this, I have my own node class. At certain points in the application, I need to save data. I am having a problem with the SoapFormatter. The following program gets the exception: "The data at the root level is invalid. Line 55, position -460." This code works fine if I use a BinaryFormatter instead of a SoapFormatter. Any ideas? Here is a test program:
by: Phillip Galey | last post by:
I have an object called Place which contains only string properties and has the <Serializable()> flag before the class name declaration. I also have a collection object called Places, which is implemented using Inherits System.Collections.Specialized.NameObjectCollectionBase and also has the <Serializable()> flag before the class name declaration. In the calling code, I'm successfully serializing the object to an XML file using a...
by: seckley | last post by:
Hi i'm working on a project for school, i have created a serializable class that handles a person's name and address. i am using the collection class to handle the data. i then have to use a soapFormatter to write to a file and read form the file. the only entries i find in MSDN use string entries into a hashtable then stored using the soapFormatter. Dim addresses As New Hashtabl addresses.Add("Jeff", "123 Main Street, Redmond, WA 98052"...
by: JackRazz | last post by:
I'm trying to serialize a collection to a file stream by serializing each object individually. The code below works fine with the BinaryFormatter, but the SoapFormatter reads the first object and just goes to the end of the file. After reading the first object, the fStream.Position is pointed to the end of the file. The collection serializes/deserilizes fine when I just serialize the hashtable vs. each object in the hashtable. Does...
by: Hotlips | last post by:
I'm trying to use an SoapFormatter with a generic List (List<int>) (.NET 2.0) When I use it I get an exception that states that the collections from Generic-namespace cannot be used with the SoapFormatter. Why does the SoapFormatter not support generics?
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Hello. I have found out that a VS2005 WebService by default serializes my objects using normal XmlSerializer. Howerver, I need it to serialize them using SoapFormatter by default (without doing the call in every "return" statement of each of my webmethods). Can this be done? By the way, I would also to call a "SanityCheck()" method for every object that is returned from my webmethods before sending them. Can this be done without AOP? ...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.