473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

overriding webservice serializer?

using .net 1.1

i think i might want to replace the xml serializer which my .Net
webservice uses with a custom serializer. anyone know:

a) is this possible?
b) if so, is it terribly difficult (to create a proper webservice
compliant serializer and override the .net "default" webservice xml
serializer)?

As far as I can tell, it's not possible. Seems like the way to control
webservice xml serialization is via the various attributes....

hawkeye parker

Dec 7 '05 #1
1 1649
On 6 Dec 2005 18:43:58 -0800, ha************@autodesk.com wrote:
using .net 1.1

i think i might want to replace the xml serializer which my .Net
webservice uses with a custom serializer. anyone know:

a) is this possible?
b) if so, is it terribly difficult (to create a proper webservice
compliant serializer and override the .net "default" webservice xml
serializer)?

As far as I can tell, it's not possible. Seems like the way to control
webservice xml serialization is via the various attributes....

hawkeye parker


A reply I got to from "Mork" just today may be just what you need: look up
"SoapExtension class" in the MSDN library index.

It won't let you replace the default serializer, but you can extend it.

A sample is included in the docs that logs raw requests and replies to an
xml file, but you can change or replace the XML on the fly.
Basically, you create two new classes, one derived from SoapExtension and
one from SoapExtensionAttribute.

The attribute you created this way can be applied to the method that
processes the request. Now when that method is called, a "ProcessMessage"
method in your SoapExtension-derived class is executed with access to the
raw XML (four times actually, at different stages of serialization and
deserialization).
Two catches I stumbled over:
1) you get one stream and create another in the ChainStream method, look
very carefully in the sample which stream is used for what in the request,
and ditto in the reply. It is not always so that the existing stream you
are passed in ChainStreams contains the original data.

2) even if you do not change anything to the XML, you _must_ create a new
stream in ChainStreams and copy data from one stream to the other in
ProcessMessage, as in the sample (which also doesn't change anything).
It didn't work when I just handed it back its own stream.
Dec 7 '05 #2

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

Similar topics

0
by: Fabrice Meichtry | last post by:
hi everybody, I still have some difficulties to acces a web service created in C# with soap toolkit.. In fact I'd like to access it with the low-level sample that was on the sample exemple. ...
2
by: Atul | last post by:
In my winform application, to access webmethod, we create a webservice proxy object. For the first time, when winform application is started, for creating proxy object(e.g. MyWebServiceProxy oProxy...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i donīt want to filter the return value of the method, i have to pass a new instance of the...
4
by: Martin Ehrlich | last post by:
Hello NG. I've got a little problem with sharing types between webservices and clients. I've created a business class with public fields within a shared assembly like: public class Item {
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
0
by: jimmyfishbean | last post by:
Hi, I have a successful VB6 web service client that uses the SOAP Toolkit 3 to make calls to a web service written in ASP.Net (VB.Net). However, due to Microsoft not recommending the use of...
0
by: Bill | last post by:
When communicating with a server via webservices, I need to view and set the timezone information for a simple object (it contains one DateTime and one string). Is there a way to force the...
0
by: rakeshkumawat | last post by:
I am facing a problem while reading the result which is loaded in DOMDocument. In which I am sending a request to web service and getting a record of Single Order. This is my VB Code which is i am...
8
by: =?Utf-8?B?UmF2aQ==?= | last post by:
Hi, I'm trying to pass values of different data-types to a web-service. I thought it would be easier to box these values and pass them as a System.object parameter, like public void...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
jinu1996
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...

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.