473,805 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass data directly in stream on the WS calls

Bob
I'm trying to centralize some of the common Web User Controls used in all of
our web applications (like header, footer) and put them in a web service to
be called by all the other web applications. There are a couple of ways I
can think of that can probably accomplish what I need. I'm most interested
in rendering the control on the WS server end, and then stream the result to
the consuming clients (the other web applications). I think this is
definitely doable but just can't quite figure how this should work. The
following is what I have so far on the WS server end in the asmx class:

[WebMethod]
public void GetPageHeader() {
/*oad the user control */
UserControl uc = new UserControl();
UserControl header =
(UserControl)uc .LoadControl(@" ~\UI\HeaderNoMe nu.ascx");

/*render the user control into the HttpResponse stream */
TextWriter tw = new
StreamWriter(th is.Context.Resp onse.OutputStre am);
HtmlTextWriter htw = new HtmlTextWriter( tw);
header.RenderCo ntrol(htw);
}

This compiles ok and runs without error when invoked from a browse (it
doesn't show anything in the browser as expected). However, I'm not sure
how to get the stream from the client end as no stream is exposed anywhere.
A fragment of the proxy class generated is shown below.

[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]

[System.Web.Serv ices.WebService BindingAttribut e(Name="CommonU IElementsSoap",
Namespace="http ://tempuri.org/")]
public class CommonUIElement s :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {

[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://tempuri.o
rg/GetPageHeader", RequestNamespac e="http://tempuri.org/",
ResponseNamespa ce="http://tempuri.org/",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
public void GetPageHeader() {
this.Invoke("Ge tPageHeader", new object[0]);
}
Do I need to implement something myself in order to get the stream, like
maybe using SoapExtension class? Any suggestions would be helpful.
Nov 18 '05 #1
0 900

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

Similar topics

8
15613
by: TJ | last post by:
I need to be able to pass a pointer to a (managed code) Stream object to a COM method so it can serialize its data into the stream. I have a C# application that makes uses of Randolf Duke's MimeSniffer COM component (http://www.codeproject.com/internet/mimesniffer.asp). My application (pop3ImageGrabber) uses MimeSniffer to identify each image attachment in emails that have been collected from a POP3 mailbox. MimeSniffer gives the...
0
1419
by: Bob | last post by:
I'm trying to centralize some of the common Web User Controls used in all of our web applications (like header, footer) and put them in a web service to be called by all the other web applications. There are a couple of ways I can think of that can probably accomplish what I need. I'm most interested in rendering the control on the WS server end, and then stream the result to the consuming clients (the other web applications). I think...
0
1075
by: Michael B. Trausch | last post by:
I am attempting to piece together a Python client for Fotobilder, the picture management server on Livejournal. The protocol calls for binary data to be transmitted, and I cannot seem to be able to do it, because I get this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "scrapbook.py", line 181, in UploadSinglePicture {Request: pic_mem})
6
7008
by: Pat B | last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol using C#. I have implemented it using BeginReceive and EndReceive calls so as not to block when waiting for data from the supernode. Everything I have written works fine sending and receiving uncompressed data. But now I want to implement compression using the deflate algorithm as the Gnutella protocol accepts: Accept-Encoding: deflate Content-Encoding: deflate in the...
4
6415
by: rakesh.usenet | last post by:
For a particular application of mine - I need a simulation of byte array output stream. * write data onto a stream * getback the contiguous content as an array later for network transport. My code looks as follows. #include <iostream>
9
377
by: Bill E. | last post by:
I'm creating an MS Access application that connects to a SQL Server 2005 database using pass-through queries and ADO to call stored procedures. I ran a SQL trace and started clicking through various forms to look at how things were being handled on the database. I noticed an alarming number of connections were opened as if there was absolutely no connection pooling. After several clicks I had 20 new connections. It appeared that a new...
4
2517
by: Bill E. | last post by:
Lyle, Thanks for the information. I'm not using an ADP and I'm not using application roles, although I was considering it. I agree that it would be helpful if it were documented somewhere how Access is handling connections to SQL Server. I found something else that was strange. It appeared that pass- through queries were being called twice for some reason. That is to say that my trace was showing two calls in a row to the same...
10
5106
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area> <zone>BOXING</zone> <status>Running</status> <job>1000139233</job>
2
11315
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating a XBAP application and want it take some input from webpage dynamically? what is the best way? how to do it? Best Regards Steven -- ======================= Steven Tang SYWWUYU)
0
9716
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, 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...
0
10359
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 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...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
isladogs
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...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.