Exporting web service request to text file Options

R

rbr

Hello,

I am connecting to a webservice and creating a web reference in my
vb.net 1.1 app. When I create the request object I would like to
create an XML document to log the request and, susequently, the
response object to my local machine. Below is my code (Dummified of
course):


Dim WS As New WebService
Dim Req As New WebService.Request
Dim Resp As New
WebService.Response
WS.Timeout = 1000
Req.addressLine1 = address1
Req.addressLine2 = address2
Req.city = City
Req.firstName = FirstName
Req.lastName = LastName
Req.homePhoneNo = Phone
Req.state = State
Req.zipCode = Zip
'This is where I would like to write the request
(Req) to an XML document on the local machine
Resp = WS(Req)
'This is where I would like to write the response
(Resp) to an XML document on the local machine


Do you have any suggestions on how to achieve my desired end result?


Thanks in advance.


rbr
 
P

Phill W.

rbr said:
I am connecting to a webservice and creating a web reference in my
vb.net 1.1 app. When I create the request object I would like to
create an XML document to log the request and, susequently, the
response object to my local machine.

If the Request and Response are Serializable (and I think they ought to
be), create a SoapFormatter and Serialize each object to a disk file.
OK, it won't be the nicest thing to /look/ at (being an image of the
data that gets thrown across The Web to the WebService) but it's a start.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top