472,989 Members | 2,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

log contents of request

Hi All,

Is there a way to get the contents of a web service request? Preferably
including the HTTP headers too.

I tried saving Context.Request.InputStream to a stream, but it always
appears to be 0 length. Is that because it's only used in a regular Page
request and not for web services?

May 15 '06 #1
3 1162
yes there is way , we call it SOAP Extensions. By using soap extensions you
can intercept soap stream at the various stages of web service request. For
creating soap extension you have to dervice class from soap extensions. I am
giving you buzz word and you can study about SOAP extensions and can use it.
For futher help feel free to write.

"Jacob" wrote:
Hi All,

Is there a way to get the contents of a web service request? Preferably
including the HTTP headers too.

I tried saving Context.Request.InputStream to a stream, but it always
appears to be 0 length. Is that because it's only used in a regular Page
request and not for web services?

May 15 '06 #2
Jacob wrote:
Hi All,

Is there a way to get the contents of a web service request?
Preferably including the HTTP headers too.

I tried saving Context.Request.InputStream to a stream, but it always
appears to be 0 length. Is that because it's only used in a regular
Page request and not for web services?


Check out:

http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemwebservicesprotocolssoapextensionclasst opic.asp

(URL Wraps. Or use http://tinyurl.com/empf)

Just dress your method with a [Trace( FileName="<enter filename
here">)] attribute and the request + response will be saved to the
file. But this applies only to the XML.

You can save the headers manually in the method itself.

--
Deepak Shenoy
http://shenoyatwork.blogspot.com
May 16 '06 #3
I have something like this in my HttpApplication subclass for tracing SOAP
calls:

protected void Application_AuthenticateRequest(Object sender, EventArgs e) {

#if DEBUG
//trace the request
HttpRequest Request = HttpContext.Current.Request;
Debug.WriteLine(Request.Headers["SOAPAction"]);
byte[] bytes = new byte[Request.ContentLength];
Request.InputStream.Read(bytes, 0, bytes.Length);
Request.InputStream.Position = 0;
UTF8Encoding encoding = new UTF8Encoding();
Debug.WriteLine(encoding.GetString(bytes));

#endif
}

May 16 '06 #4

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

Similar topics

1
by: Bart Plessers \(artabel\) | last post by:
Hello, Currently developping a site, where I use some session variables. The site is located at my home computer. Because I have a dynamic IP adress, I use no-ip (www.no-ip.org) to have my...
2
by: aarthy | last post by:
Hi, Hi, > > I have a problem in the display of the ASP screen actually i am > retrieving and displaying the data from a database when the view button > is hit.The contents for display is so...
1
by: aarthy | last post by:
Hi, I have a problem in the display of the ASP screen actually i am retrieving and displaying the data from a database when the view button is hit.The contents for display is so long so i want...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
1
by: Dexter | last post by:
I have an <imgtag like <img alt=none src=http://somesite.com/mypage.aspx> embedded into an email message. The request returns a gif image to the browser. What I am unable to do is to access the...
2
by: Jim S | last post by:
I have a need to read the contents of an html table on a remote web page into a variable. I guess this is called screen scraping but not sure. I'm not sure where to start or what the best...
4
by: Kuldeep | last post by:
Hi All, I am trying to read the contents of a page through its URL. My code snippet is as follows: public void mtdGetPageDataHWR() { HttpWebRequest objRequ =...
9
by: mevryck | last post by:
Greetings I have a huge Javascript with inclusion of external scripts and all. I got this by doing a XSLT . Now I have the contents in a Javascript variable, but I'm not able to update the...
2
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.