TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chriz L
NA
220
50.8k
How to save SOAP Request in a file while receiving it
Apr 30 2020 2:19 AM
Hello,
I need to log the SOAP Requests sent from a web service. How can I get a SOAP Request saved in an xml file for error handling? Here's the following example:
using
System.Web.Services;
namespace
TestWebService
{
[WebService(Namespace =
"http://tempuri.org/"
)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(
false
)]
public
class
Test : System.Web.Services.WebService
{
[WebMethod]
public
string
HelloWorld(
int
a,
int
b)
{
int
c = a + b;
return
"The result is: "
+c;
}
}
}
Request (needs to be saved to file):
<soapenv:Envelope xmlns:soapenv=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem=
"http://tempuri.org/"
>
<soapenv:Header/>
<soapenv:Body>
<tem:HelloWorld>
<tem:a>5</tem:a>
<tem:b>3</tem:b>
</tem:HelloWorld>
</soapenv:Body>
</soapenv:Envelope>
Any kind of help would be appreciated, thank you!
Reply
Answers (
3
)
RedirectPermanent
How to implement BoDetect Captcha in .net core 3.1 mvc ?