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

How to get the SOAP Request XML

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.

May 4 '06 #1
0 1051

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

Similar topics

0
by: Doug Farrell | last post by:
Hi everyone, I'm trying to build a program to interface to a SOAP/XML interface provided by one of our vendors. This interface is built with MS SOAP Toolkit 3.0, so I'm guessig they are running...
1
by: Dr. Frankenchurn | last post by:
I have a question regarding SOAP. A basic "Hello World" web service was written then requested from an IIS server via TELNET. When a malformed request was sent, a SOAP exception was returned,...
0
by: Michael Jackson | last post by:
I have attempted to mark up a service and it's methods so that it doesn't require the SOAPAction HTTP header to resolve the methods being called, this is done from first element in <SOAP-ENV:Body>...
0
by: Matt Wood | last post by:
Hi, I have written a Web Service for a customer which expects a SOAP message with Document/Literal encoding, and uses RoutingStyle=SoapServiceRoutingStyle.RequestElement to route the SOAP body...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
1
by: Ron Eggler | last post by:
> Hi, > > I'm supposed to send following request as a html-request(from a html-link) > is it possible? how do i do that? do i use the '<a href'-tag as well? > Thank you! > > > <xs:request...
1
by: E11 | last post by:
Hi all, I am composing a SOAP request message from a WSDL definition, and it seems that my concept of namespaces is wrong. The "types" section of the WSDL definition is as follows: ...
3
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works...
3
by: Siva | last post by:
Hi all, I want to Convert a WSDL to a SOAP message. Is there any way to do this. I am using .NET 2.0 Thanks in Advance Siva
6
by: John | last post by:
I'm trying to call a Webservice (Non-.NET) That requires the insertion of security credentials into the SOAP header. Up until know I've been creating Dynamic proxy classes to call web services and...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.