473,399 Members | 4,177 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,399 software developers and data experts.

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.

Thanks
Try
Dim myWebClient As New System.Net.WebClient

Dim myNameValueCollection As New
System.Collections.Specialized.NameValueCollection

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

Dim uriString As String = "http://140.147.249.38:7090"
'http://z3950.loc.gov:7090

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 )
MsgBox(S)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Nov 20 '05 #1
0 979

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

Similar topics

1
by: E.D. | last post by:
Hello, I have a small library (2000 books) that I would like to catalog. I heard there may be some open-source XML web applications that would allow me to do so, and even to import the appropriate...
0
by: Thiva Charanasri | last post by:
http://www.poweroflanguage.org Track: Computer Language 1st World Congress on the Power of Language: Theory, Practice and Performance Date: March 6 - 10, 2006 Bangkok, Thailand On this...
0
by: Thiva Charanasri | last post by:
http://www.poweroflanguage.org Track: Computer Language 1st World Congress on the Power of Language: Theory, Practice and Performance Date: March 6 - 10, 2006 Bangkok, Thailand On this...
5
by: Simon Harris | last post by:
Hi All, I've recently created a web service, which uses code within a class library I created. In my development environment, I have referenced the class library - This works fine. Problem...
3
by: Miguel Ferreira via .NET 247 | last post by:
Hi ! I have developed a class Library with several classes and methods. Its working fine with a windows forms test application, but now i need to create a webservice that will expose those...
5
by: Preben Zacho | last post by:
Anyone that has a link or description that simply as possible shows how to add a web reference to a class library in C# and consuming it? TIA PZ
1
by: Daniel | last post by:
Is there a patch for congress new 2007 daylight savings time change? http://geography.about.com/cs/daylightsavings/a/dst.htm This could have economic impact like y2k did. Is there a patch for...
0
by: tavares | last post by:
--------------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) Symposium...
0
by: tavares | last post by:
------------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) Symposium...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.