473,387 Members | 1,942 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,387 software developers and data experts.

How to get the parameters passed to a SOAP webservice

I'd like to log the parameters that were passed to any of the functions

in my webservice. Is there an easier way to get the parameters from the

Request[]? I wrote this function and for simple functions it works:

XmlDocument GetRequestXml() {
XmlDocument doc = new XmlDocument();
doc.AppendChild(doc.CreateElement("request"));
foreach(string key in this.Context.Request.Form.AllKeys) {
XmlElement x = doc.CreateElement(key);
x.InnerXml =
Server.HtmlEncode(this.Context.Request.Form[key]);
doc.DocumentElement.AppendChild(x);
}
foreach(string key in this.Context.Request.QueryString.AllKeys)
{
XmlElement x = doc.CreateElement(key);
x.InnerXml =
Server.HtmlEncode(this.Context.Request.QueryString[key]);
doc.DocumentElement.AppendChild(x);
}
return doc;

}
However if I have a function like this:

[WebMethod]
public string Test1(string[] test) {
...

}
In this case GetRequestXml returns nothing (<request />). I have
methods with lots of parameters and all I want it to log the passed
parameters so I can figure out what happens if something crashed and
debug the service easier.

Jun 6 '06 #1
0 1029

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

Similar topics

4
by: Razzie | last post by:
Hey all, I have a SOAP envelope with which I try to communicate to a webservice. Everything is fine, but when I try to access a parameter of the webservice method, I get the Object reference not...
18
by: A.M | last post by:
Hi, Is there any way to call a WSS web service method by using browser and see the XML result in browser as well? I have been told that there is query string syntax for calling...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
0
by: Alexiel | last post by:
Hi, i have a problem, I have a Java Client and i call my webservice on ..NET. This run perfectly just except when i send parameters don't work fine. I send my code : This is my java...
0
by: Alexiel | last post by:
Hi, i have a problem, I have a Java Client and i call my webservice on ..NET. This run perfectly just except when i send parameters don't work fine. I send my code : This is my java...
3
by: =?Utf-8?B?UGllcnJl?= | last post by:
Hello, I have a .NET 2.0 web service that is consumed by a Delphi application. The Delphi application calls a method from the .NET web service with parameters. Theses parameters are in the...
3
by: magister pips | last post by:
Hello, I have encountered some strange behaviour when using the XMLHTTP Request object in Javascript to return xml from a C# Webservice Method. I create a SOAP envelope and send it off to the...
1
by: magister pips | last post by:
Hello, I have encountered some strange behaviour when using the XMLHTTP Request object in Javascript to return xml from a C# Webservice Method. I create a SOAP envelope and send it off to the...
0
by: magister pips | last post by:
Hello, I have encountered some strange behaviour when using the XMLHTTP Request object in Javascript to return xml from a C# Webservice Method. I create a SOAP envelope and send it off to the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.