469,934 Members | 2,146 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Library of Congress Webservice

Is anyone familiar with connecting to the Library of Congress server
http://z3950.loc.gov:7090 to do a search directly via code bypassing the
search form? Based on what I have been able to find about doing this at
http://lcweb.loc.gov/z3950/lcserver.html and other links I can't remember,
it appears that the code below should work for a simple test of connecting
and sending a request. However, it produces a "Bad Request" server error
message. Any suggestions.

What I would really like is the availability of a webservice that would do
this, but reading at http://www.loc.gov/z3950/agency/zing/srw/, seems to
indicate that if you want one you will have to make your own based on their
specifications there. Any insight into how to do this would be appreciated.

Dim myWebClient As New System.Net.WebClient

Dim myNameValueCollection As New

myNameValueCollection.Add("protocolVersion", "Z39.50-1995")
'version 3
myNameValueCollection.Add("options", "present")
myNameValueCollection.Add("preferredMessageSize", "10000")
myNameValueCollection.Add("exceptionalRecordSize", "10000")

Dim uriString As String = ""

Dim responseArray As Byte() =
myWebClient.UploadValues(uriString, "Post", myNameValueCollection)
' Decode and display the response.
Dim S As String = "Response received was :" &
System.Text.Encoding.ASCII.GetString(responseArray )
Catch ex As Exception
End Try
Nov 20 '05 #1
0 897

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by E.D. | last post: by
reply views Thread by Thiva Charanasri | last post: by
reply views Thread by Thiva Charanasri | last post: by
5 posts views Thread by Simon Harris | last post: by
3 posts views Thread by Miguel Ferreira via .NET 247 | last post: by
5 posts views Thread by Preben Zacho | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.