ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Fw: how to make SOAP4R read WSDL files?
@ 2002-04-08 10:44 Alexander Bokovoy
  0 siblings, 0 replies; only message in thread
From: Alexander Bokovoy @ 2002-04-08 10:44 UTC (permalink / raw)
  To: devel

О сколько нам открытий чудных готовит Google...

----- Forwarded message from Ian Macdonald <ian@google.com> -----

Date: Sat, 6 Apr 2002 09:22:25 +0900
From: Ian Macdonald <ian@google.com>
To: ruby-talk@ruby-lang.org (ruby-talk ML)
Subject: how to make SOAP4R read WSDL files?
Posted: Fri, 5 Apr 2002 16:22:16 -0800
Organization: Google, Inc.

Hi,

Here at Google, we're about to start offering an API to our search-engine,
so that people can programmatically use Google through a clean and clearly
defined interface, rather than have to resort to parsing HTML.

As a test, this seemed like a great opportunity to try out SOAP4R.

I'm not knowledgeable about SOAP at all (I've read a couple of O'Reillynet
articles about it), so I'm probably making mistakes in my basic
assumptions. The SOAP4R documentation is also pretty scant.

Anyway, the following short program works:

#!/usr/bin/ruby

require 'soap/driver'

endpoint = 'http://api-ab.google.com/search/beta2'
ns = 'urn:GoogleSearch'
key = 'xxxxxxxxxxxxxxx'
service = 'file:GoogleSearch.wsdl'
query = ARGV.shift || 'foo'

soap = SOAP::Driver.new(nil, nil, ns, endpoint)

# uncomment the next line to dump the traffic on the wire
#
#soap.setWireDumpDev(STDERR)

soap.addMethodWithSOAPAction('doGoogleSearch', ns, 'key', 'q', 'start',
			     'maxResults', 'filter', 'restrict',
			     'safeSearch', 'lr', 'ie', 'oe')
r = soap.doGoogleSearch(key, query, 0, 10, false, nil, false, nil,
			'latin1', 'latin1')

printf "Estimated number of results is %d.\n", r.estimatedTotalResultsCount
printf "Your query took %6f seconds.\n", r.searchTime
--

However, rather than have to spell all of this out in the program, I would
rather just have SOAP4R read Google's WSDL file. Unfortunately, nothing
I've tried so far will make this work. It's not even clear to me that this
is implemented.

So, does anyone know how I can reduce much of the detail in the code by
simply having SOAP4R pull it out of a WSDL file?

Ian
-- 
Ian Macdonald               | But since I knew now that I could hope for 
System Administrator        | nothing of greater value than  frivolous
Google, Inc.                | pleasures, what point was there in denying 
ian@google.com              | myself of them?     -- M. Proust 
650.330.0100 x1265          | 

----- End forwarded message -----

-- 
/ Alexander Bokovoy
Software architect and analyst             // SaM-Solutions Ltd.
---
This fortune is encrypted -- get your decoder rings ready!



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-08 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 10:44 [devel] Fw: how to make SOAP4R read WSDL files? Alexander Bokovoy

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git