Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > avoiding deserialization

Reply
Thread Tools

avoiding deserialization

 
 
sean rogers
Guest
Posts: n/a
 
      08-15-2006
hi

1. i have a biztalk orchestration that calls my web service.
2. My web service receives the BTS message and deserializes it
3. My webservice then takes the deserialized object and re-serializes it
into an XmlDocument before sending it to another component to be processed.

My question is - is there anyway to remove step 2 - the unnecessary
deserialization from the BTS message into my object.

Can i hack the deserialization code out of the webservice?

thanks


 
Reply With Quote
 
 
 
 
Josh Twist
Guest
Posts: n/a
 
      08-17-2006
You could just change your web service to accept an XmlDocument
parameter instead of the objects that represent it. However, I really
wouldn't advise you to do this as it's as non web service'y' as using a
dataset:
http://www.thejoyofcode.com/SOA_and_..._of_Satan.aspx

I guess you're probably looking to do this because you're worried about
performance but I really wouldn't unless you're actually having
performance problems. Otherwise it's premature optimisation:
http://www.thejoyofcode.com/Premature_Optimisation.aspx

If possible - I'd try and change the 'other' component to take an
object and not an XmlDocument and do away with serialization until you
hit the wire. Though, I realise this might not be possible if the
component is legacy and/or not yours. Good luck!

Josh
http://www.thejoyofcode.com/

sean rogers wrote:
> hi
>
> 1. i have a biztalk orchestration that calls my web service.
> 2. My web service receives the BTS message and deserializes it
> 3. My webservice then takes the deserialized object and re-serializes it
> into an XmlDocument before sending it to another component to be processed.
>
> My question is - is there anyway to remove step 2 - the unnecessary
> deserialization from the BTS message into my object.
>
> Can i hack the deserialization code out of the webservice?
>
> thanks


 
Reply With Quote
 
 
 
 
sean rogers
Guest
Posts: n/a
 
      08-17-2006
thanks for your reply and your pragmatism. Its not exactly the awnser i was
looking for.

I have heard about intercepting the data stream before it reaches the
webservice - and so keeping it in its Xml format.
Just wondered if anyone had some code to do it.


"Josh Twist" wrote:

> You could just change your web service to accept an XmlDocument
> parameter instead of the objects that represent it. However, I really
> wouldn't advise you to do this as it's as non web service'y' as using a
> dataset:
> http://www.thejoyofcode.com/SOA_and_..._of_Satan.aspx
>
> I guess you're probably looking to do this because you're worried about
> performance but I really wouldn't unless you're actually having
> performance problems. Otherwise it's premature optimisation:
> http://www.thejoyofcode.com/Premature_Optimisation.aspx
>
> If possible - I'd try and change the 'other' component to take an
> object and not an XmlDocument and do away with serialization until you
> hit the wire. Though, I realise this might not be possible if the
> component is legacy and/or not yours. Good luck!
>
> Josh
> http://www.thejoyofcode.com/
>
> sean rogers wrote:
> > hi
> >
> > 1. i have a biztalk orchestration that calls my web service.
> > 2. My web service receives the BTS message and deserializes it
> > 3. My webservice then takes the deserialized object and re-serializes it
> > into an XmlDocument before sending it to another component to be processed.
> >
> > My question is - is there anyway to remove step 2 - the unnecessary
> > deserialization from the BTS message into my object.
> >
> > Can i hack the deserialization code out of the webservice?
> >
> > thanks

>
>

 
Reply With Quote
 
Josh Twist
Guest
Posts: n/a
 
      08-17-2006
Hi Sean,

You can intercept the stream using a SoapExtension (search on google
for lots of info) but this is typically to modify the stream in some
way. It usually ends up hitting the normal deserialization mechanisms
once you've fiddled with it.

Josh
http://www.thejoyofcode.com/




sean rogers wrote:
> thanks for your reply and your pragmatism. Its not exactly the awnser i was
> looking for.
>
> I have heard about intercepting the data stream before it reaches the
> webservice - and so keeping it in its Xml format.
> Just wondered if anyone had some code to do it.
>
>
> "Josh Twist" wrote:
>
> > You could just change your web service to accept an XmlDocument
> > parameter instead of the objects that represent it. However, I really
> > wouldn't advise you to do this as it's as non web service'y' as using a
> > dataset:
> > http://www.thejoyofcode.com/SOA_and_..._of_Satan.aspx
> >
> > I guess you're probably looking to do this because you're worried about
> > performance but I really wouldn't unless you're actually having
> > performance problems. Otherwise it's premature optimisation:
> > http://www.thejoyofcode.com/Premature_Optimisation.aspx
> >
> > If possible - I'd try and change the 'other' component to take an
> > object and not an XmlDocument and do away with serialization until you
> > hit the wire. Though, I realise this might not be possible if the
> > component is legacy and/or not yours. Good luck!
> >
> > Josh
> > http://www.thejoyofcode.com/
> >
> > sean rogers wrote:
> > > hi
> > >
> > > 1. i have a biztalk orchestration that calls my web service.
> > > 2. My web service receives the BTS message and deserializes it
> > > 3. My webservice then takes the deserialized object and re-serializes it
> > > into an XmlDocument before sending it to another component to be processed.
> > >
> > > My question is - is there anyway to remove step 2 - the unnecessary
> > > deserialization from the BTS message into my object.
> > >
> > > Can i hack the deserialization code out of the webservice?
> > >
> > > thanks

> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NameValueCollection Serialization Deserialization =?Utf-8?B?TWlrZSBMb2dhbg==?= ASP .Net 3 12-23-2004 01:38 AM
Deserialization Error--End of Stream =?Utf-8?B?U29sZWwgU29mdHdhcmU=?= ASP .Net 5 08-10-2004 12:17 PM
Deserialization Error--End Of Stream =?Utf-8?B?U29sZWwgU29mdHdhcmU=?= ASP .Net 1 07-30-2004 02:31 AM
Serialization/Deserialization or XML as DB umbertoeklat@yahoo.com ASP .Net 3 05-14-2004 03:47 PM



Advertisments