Soap Web service
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngwebservices' list.


Bob Dombroski
We have a fairly complex object that is passed into a
web service method. This object can get rather large
as it contains embbeded objects in arrays.

Built in .net functionality has got us up and running
in no time at all, but now we need to meet performance
numbers and want to override some of the .net
webservice parsing. In laymen terms, we want to be
able to start reacting upon parts of the message prior
to the entire message being serialized into an object.
What is the best way of doing this? We are looking
into chaining, but not sure if this is the right
direction. In chaining your suppose to pass the
message along when you are done with your piece.

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
Dan Wahlin
You're on the right track. By using SOAP extensions you can interact
with the stream directly. You can find an example of doing that at the
following link:

http://www.xmlforasp.net/codeSection.aspx?csID=72

HTH,
Dan Wahlin

Wahlin Consulting LLC
Microsoft MVP - ASP.NET
http://www.XMLforASP.Net: #1 ASP.NET XML Resource
XML for ASP.NET Developers by Dan Wahlin in bookstores everywhere!

-----Original Message-----
From: Bob Dombroski [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 10:19 AM
To: aspngwebservices
Subject: [aspngwebservices] Soap Web service

We have a fairly complex object that is passed into a
web service method. This object can get rather large
as it contains embbeded objects in arrays.

Built in .net functionality has got us up and running
in no time at all, but now we need to meet performance
numbers and want to override some of the .net
webservice parsing. In laymen terms, we want to be
able to start reacting upon parts of the message prior
to the entire message being serialized into an object.
What is the best way of doing this? We are looking
into chaining, but not sure if this is the right
direction. In chaining your suppose to pass the
message along when you are done with your piece.

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

| [aspngwebservices] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebservices.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Bob Dombroski
How do I stop the soap serialization from happening?
As I understand it extensions are to perfom a generic
action on the message. We would like to use
XmlTextReader to walk the message and have multi
threaded activities processing parts of the message
(each part is atomic). All well and good with
extensions and chaining, but then do I just pass a
null reference in the in stream to prevent .net from
serializing the message. My actual web method does
nothing?

Thanks
Bob D

--- Dan Wahlin <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
Dan Wahlin
So you want to handle deserialization in a custom manner and don't want
any processing to occur within the actual WebMethod? I'm a little
unclear as to what you want to accomplished and where. You can
certainly use the XmlTextReader to parse the stream within the extension
(as in the example referred to below) before it is deserialized on the
web service side but it sounds like you may be wanting more than that or
want to stop the process at that point (or do something totally
different than I'm thinking).

Dan

Wahlin Consulting LLC
Microsoft MVP - ASP.NET
http://www.XMLforASP.Net: #1 ASP.NET XML Resource
XML for ASP.NET Developers by Dan Wahlin in bookstores everywhere!

-----Original Message-----
From: Bob Dombroski [mailto:Click here to reveal e-mail address]
Sent: Tuesday, August 13, 2002 4:08 AM
To: aspngwebservices
Subject: [aspngwebservices] RE: Soap Web service

How do I stop the soap serialization from happening?
As I understand it extensions are to perfom a generic
action on the message. We would like to use
XmlTextReader to walk the message and have multi
threaded activities processing parts of the message
(each part is atomic). All well and good with
extensions and chaining, but then do I just pass a
null reference in the in stream to prevent .net from
serializing the message. My actual web method does
nothing?

Thanks
Bob D

--- Dan Wahlin <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

| [aspngwebservices] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebservices.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Bob Dombroski
I think you have the idea...

Say our soap body contains and array of complex
elements, or objects. For a hypotheitcal example, say
your web method processed debit card transactions.
During the day you would get hit with one object in
the array as typically stores clear one at a time.
But...you could also get rammed with say Sear's batch
clearing with 10000's of transactions. I cant afford
the luxury of waiting for .net to serialize the whole
message. I want to take over that action so that when
I get done breaking out the first transaction in the
transaction, I can fire its processor on a new thread
and keep parsing the message.

If I let .net do its thing, I have to wait for the
10000th transaction to be parsed, prior to me being
able to start on transaction 1....thus causing a huge
bottle neck.

So, our thought is to keep all the cool WSDL
generation, soap validation, and use the standard
.asmx stuff, but we want to take over the message
processing prior to serialization and process the
request, thus leaving the actual meb method with
nothing to do.

I hope I made it clearer.

--- Dan Wahlin <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
yasser.shohoud
If I understand you correctly then you should just write your own Web
service (without the ASP.NET framework) because ASP.NET Web services do not
support XML streaming.
So you can just create a .aspx page that does what you described (parse the
input stream, process it and stream out the output message). Or you can do
the same in an HttpHandler.

Yasser Shohoud
http://LearnXmlws.com
Book: Real World XML Web Services, http://LearnXmlws.com/book

----- Original Message -----
From: "Bob Dombroski" <Click here to reveal e-mail address>
To: "aspngwebservices" <Click here to reveal e-mail address>
Sent: Tuesday, August 13, 2002 7:08 AM
Subject: [aspngwebservices] RE: Soap Web service

[Original message clipped]

Reply to this message...
 
    
Bob Dombroski
Not really interested in writing code to support WSDL,
soap athuentication, chaining etc. Looking to take
advantage of all .net has to offer except for the
serialization

--- "yasser.shohoud" <Click here to reveal e-mail address>
wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
Dan Wahlin
Yep...that makes sense. You want to manually process the incoming
stream and then skip .NET deserializing it at the Web method since it
could potentially be a very large message. I've never used extensions
to process the incoming message stream before deserialization and then
basically forward nothing on to the Web method. I'm guessing there
would be a way to do it but just haven't tried it myself. Although
there's probably a better way you could always strip out the records
from the message and just pass an empty envelope to the Web Method.
Will the client get any type of response (in other words would
asynchronous calls help)? I'm guessing not since you basically want to
skip the deserialization all together by the framework due to the
potential for a bottle-neck.

Dan

Wahlin Consulting LLC
Microsoft MVP - ASP.NET
http://www.XMLforASP.Net: #1 ASP.NET XML Resource
XML for ASP.NET Developers by Dan Wahlin in bookstores everywhere!

-----Original Message-----
From: Bob Dombroski [mailto:Click here to reveal e-mail address]
Sent: Tuesday, August 13, 2002 9:44 AM
To: aspngwebservices
Subject: [aspngwebservices] RE: Soap Web service

I think you have the idea...

Say our soap body contains and array of complex
elements, or objects. For a hypotheitcal example, say
your web method processed debit card transactions.
During the day you would get hit with one object in
the array as typically stores clear one at a time.
But...you could also get rammed with say Sear's batch
clearing with 10000's of transactions. I cant afford
the luxury of waiting for .net to serialize the whole
message. I want to take over that action so that when
I get done breaking out the first transaction in the
transaction, I can fire its processor on a new thread
and keep parsing the message.

If I let .net do its thing, I have to wait for the
10000th transaction to be parsed, prior to me being
able to start on transaction 1....thus causing a huge
bottle neck.

So, our thought is to keep all the cool WSDL
generation, soap validation, and use the standard
.asmx stuff, but we want to take over the message
processing prior to serialization and process the
request, thus leaving the actual meb method with
nothing to do.

I hope I made it clearer.

--- Dan Wahlin <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

| [aspngwebservices] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebservices.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Bob Dombroski
Thanks for the thoughts.

Yeah, you're oncovering our next bottleneck and that
is the streaming of the response (which does contain a
result on each transaction since they are atomic). Is
there a way to start chunking back the soap repsonse
prior to having the full message compiled? The more I
talk about it the more I think we need to write our
own framework :(

I appreciate the comments

--- Dan Wahlin <Click here to reveal e-mail address> wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
yasser.shohoud
Let's take these one at a time

> WSDL support

If you intend to rely on the framework to generate WSDL for you from Web
methods while actually processing the request and generating the response
yourself in a SoapExtension then you're asking for trouble. Basically you'll
have to maintain two things to keep the WSDL in synch with the
implementation. That by itself is not so bad, the real problem is that one
of the things you'll have to maintain is Web methods which indirectly lead
to the WSDL. So each time you change the request/response messaages you need
to:
Edit the Web methods to generate the right WSDL
Change SoapExtension to process the new messages

So why not just write your own Web service (using .aspx or a handler) and
write the WSDL yourself? Then every time you make a change to the messages
you have to
Change the WSDL directly
Change the implementation to process the new messages

To me this is much easier to maintain because you are only changing things
you care about (the WSDL and the implementation). It'll also give you the
most control.

>soap athuentication

What do you mean by this?

> chaining etc.

Assuming you main stream chaining in SoapExtension. Why would you need this
if you write your own HttpHandler? You can easily plug in modules along the
stream using HttpModules or you can modify the message to your heart's
content in the HttpHandler itself. Agree?

> etc.
What else?

Finally, if you really *need* request/response streaming (maybe you are
generating huge response messages and want to stream them out?) then you
cannot do that today with ASP.NET Web services directly without at least
abusing SoapExtension and Web methods.

Yasser Shohoud
http://LearnXmlws.com
Book: Real World XML Web Services, http://LearnXmlws.com/book

----- Original Message -----
From: "Bob Dombroski" <Click here to reveal e-mail address>
To: "aspngwebservices" <Click here to reveal e-mail address>
Sent: Tuesday, August 13, 2002 2:32 PM
Subject: [aspngwebservices] RE: Soap Web service

[Original message clipped]

Reply to this message...
 
    
Bob Dombroski
Okay one at a time

WSDL support...nope. It will be plug and play with
.net as in either choose of implmentation will be
dealing with the same object. If I change the object
and recompile the solution then the WSDL is auto-magic
if you will. The implemenation decision is in the
serialization of the message not in the actual
message.

>soap athuentication. Your right on this...a brain
fart occurred. Should be soap validation as I dont
want the added burden of handling invalid soap calls
in my implemenation of serialization.

Chaining...if I write my own modules, then I cant just
grab off the shelf web service addins that are/will be
available(Security/Encryption/Session Management etc)

etc....hoping you could tell me what I have missed

You are correct on the bastardization of web services
to acquire Response streaming, but for now we are
trying to elimnate the biggest bottleneck (the
request) at a time. The response is a tad bit smaller
in our message set.

--- "yasser.shohoud" <Click here to reveal e-mail address>
wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
yasser.shohoud
OK you lost me. In your SoapExtension, do you want to deserialize the
request XML document into objects or are you reading it with XmlReader? Or
both?

Yasser Shohoud
http://LearnXmlws.com
Book: Real World XML Web Services, http://LearnXmlws.com/book

----- Original Message -----
From: "Bob Dombroski" <Click here to reveal e-mail address>
To: "aspngwebservices" <Click here to reveal e-mail address>
Sent: Tuesday, August 13, 2002 4:14 PM
Subject: [aspngwebservices] RE: Soap Web service

[Original message clipped]

Reply to this message...
 
    
Bob Dombroski
sorry, again another brain lapse (too many hours at
the keyboard)...yes deserializing to objectS (plural).
We want to begin processing the first secondary object
as soon as it is peeled out of the message. Imagine
the main soap object contains a collection of
transaction objects (atomic). These transactions can
be processed as soon as the end node for that
transaction is reached. If there were 10000
transcation objects in the collection, currently we
cant start processing the first item in the collection
until the final item is deserialized...which is not
acceptable in our implementation.

--- "yasser.shohoud" <Click here to reveal e-mail address>
wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Reply to this message...
 
    
Paul John Gibbons
Bob,

You seem to want the convenience of ASP.NET web services but without the
price. I'm sure the stock perf will improve, but right now you've
crossed the line into the "advanced" world and will continue to be
frustrated until you accept this fact (please accept this in the spirit
it is offered I can't come up with better wording).

I agree with Yasser - you probably need your own .ashx to process the
stream. I have taken that route with the WS-Routing implementations I
have built so I'm not just speculating.

WSDL: Sorry - no automatic solution. If you don't control the client
I'll agree that this is a nuisance, but weigh the cost of maintaining
this against not solving your perf issues.

Validation: Standard ASP.NET requires you to add a SOAP extension which
chains into the request stream. If you do it yourself you can crack the
message and validate all in one step - not much more complicated after
you've done it for the first time.

Reuse: There are no off the shelf modules yet. If they appear I would
expect them to support DIME which implies a more generic model that you
can probably plug into your .ashx anyway.

I hope this is useful,

Paul Gibbons
Click here to reveal e-mail address
Author: .NET Development for Java Programmers (Apress)

-----Original Message-----
From: Bob Dombroski [mailto:Click here to reveal e-mail address]
Sent: Tuesday, August 13, 2002 1:14 PM
To: aspngwebservices
Subject: [aspngwebservices] RE: Soap Web service

Okay one at a time

WSDL support...nope. It will be plug and play with
.net as in either choose of implmentation will be
dealing with the same object. If I change the object
and recompile the solution then the WSDL is auto-magic
if you will. The implemenation decision is in the
serialization of the message not in the actual
message.

>soap athuentication. Your right on this...a brain
fart occurred. Should be soap validation as I dont
want the added burden of handling invalid soap calls
in my implemenation of serialization.

Chaining...if I write my own modules, then I cant just
grab off the shelf web service addins that are/will be
available(Security/Encryption/Session Management etc)

etc....hoping you could tell me what I have missed

You are correct on the bastardization of web services
to acquire Response streaming, but for now we are
trying to elimnate the biggest bottleneck (the
request) at a time. The response is a tad bit smaller
in our message set.

--- "yasser.shohoud" <Click here to reveal e-mail address>
wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

| [aspngwebservices] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebservices.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.Web.Services.Protocols.SoapExtension
System.Xml.XmlReader
System.Xml.XmlTextReader




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com