Soap4R how to set up user name?

N

nkb

Hi.

I am attempting to use soap to get some info via https.
My server require user name for authentication. I've the following codes
set up (via cut and paste from various examples). I would really
appreciate any help on where should I enter my user name and password
and if I am missing anything from my codes below?


#!usr/bin/env ruby

require 'soap/driver'
require 'http-access2'
require 'soap/rpc/driver'

# setup driver
NAMESPACE = 'urn:myhomepage.co.uk:webservices'
URL = 'https://secure.myhomepage.co.uk/mywebserv/Srvice.asmx'
SOAP_ACTION = 'getData'
HTTP_PROXY = nil

# create a SOAP::Driver object
driver = SOAP::Driver.new(nil, nil, NAMESPACE, URL, HTTP_PROXY, SOAP_ACTION)

driver.addMethod('getData', '1234')

# finally call the SOAP service
result = driver.getData(lang, input.read)

output.puts result
 
D

David Ross

You should check out the auth_header example in NaHi's
latest snapshots on his website for soap4r.

http://rrr.jin.gr.jp/download/

I place my auth in the headers that are sent once, and
then a session ID is sent from there on. You need a
backend manager to write. If you need help drop NaHi
or I an email. I have some experience with soap4r now
due to I had to use it for job taking forever. :)

--dross

--- nkb said:
Hi.

I am attempting to use soap to get some info via
https.
My server require user name for authentication. I've
the following codes
set up (via cut and paste from various examples). I
would really
appreciate any help on where should I enter my user
name and password
and if I am missing anything from my codes below?


#!usr/bin/env ruby

require 'soap/driver'
require 'http-access2'
require 'soap/rpc/driver'

# setup driver
NAMESPACE = 'urn:myhomepage.co.uk:webservices'
URL =
'https://secure.myhomepage.co.uk/mywebserv/Srvice.asmx'
SOAP_ACTION = 'getData'
HTTP_PROXY = nil

# create a SOAP::Driver object
driver = SOAP::Driver.new(nil, nil, NAMESPACE, URL,
HTTP_PROXY, SOAP_ACTION)

driver.addMethod('getData', '1234')

# finally call the SOAP service
result = driver.getData(lang, input.read)

output.puts result




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
 
N

NAKAMURA, Hiroshi

Hi,

I am attempting to use soap to get some info via https.
My server require user name for authentication. I've the following codes
set up (via cut and paste from various examples). I would really
appreciate any help on where should I enter my user name and password
and if I am missing anything from my codes below?

Here's a question from me about the authentication you must do.
http://groups-beta.google.com/group/soap4r/browse_thread/thread/123999039e18fc7a

What kind of authentication?

Regards,
// NaHi
 
N

nkb

basic authentication.
Is there any example on using soap4r with basic auth and do a POST via
https?
Thank you so much.

NAKAMURA, Hiroshi wrote on 2004/09/18 22:44:
 
N

NAKAMURA, Hiroshi

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

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,413
Latest member
ReeceDorri

Latest Threads

Top