Exporting web service request to text file Options

3 views
Skip to first unread message

rbr

unread,
Apr 11, 2008, 3:53:10 PM4/11/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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


Andrew Badera

unread,
Apr 11, 2008, 4:00:55 PM4/11/08
to DotNetDe...@googlegroups.com
Use the Enterprise Library Logging Application Block. Use a flatfile listener and an XmlFormatter. (Though why you need XML, I just don't know.) Then just output the stream to your log entry.
--
--Andy Badera
http://andrew.badera.us/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

rbr

unread,
Apr 14, 2008, 1:13:55 PM4/14/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Thanks for the response Andrew. I am just trying to get the request
and response essentially as they are being transferred. The team
(seperated both departmentally and geographically from my team)
working on the web services I need to call request it this way.

I don't have experience using the Logging application block. However,
I will try muddling around with it.

Thanks again. It's very much appreciated.

rbr
> --Andy Baderahttp://andrew.badera.us/
> and...@badera.us
> (518) 641-1280
> Google me:http://www.google.com/search?q=andrew+badera- Hide quoted text -
>
> - Show quoted text -

Andrew Badera

unread,
Apr 14, 2008, 1:27:45 PM4/14/08
to DotNetDe...@googlegroups.com
With WCF, you can enable this sort of tracing, to an extent, through configuration. I'm not certain the same sort of functionality is available out of the box.

You might want to consider MSSOAPT -trace.

--
--Andy Badera
http://andrew.badera.us/ http://flipbitsnotburgers.blogspot.com/

rbr

unread,
Apr 14, 2008, 1:41:07 PM4/14/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Unfortunately, I'm stuck with 1.1 for the time being.

Thanks again for the valuable input.

rbr
> > > Google me:http://www.google.com/search?q=andrew+badera-Hide quoted text
> > -
>
> > > - Show quoted text -
>
> --
> --Andy Baderahttp://andrew.badera.us/http://flipbitsnotburgers.blogspot.com/
> and...@badera.us
> (518) 641-1280
Reply all
Reply to author
Forward
0 new messages