Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while accessing SharePoint wsdl #330

Closed
babajul15 opened this issue Nov 23, 2012 · 3 comments
Closed

Error while accessing SharePoint wsdl #330

babajul15 opened this issue Nov 23, 2012 · 3 comments

Comments

@babajul15
Copy link

Hello everyone,
I'm using savon to integrate with sharepoint, Below is my code

require 'rubygems'
require 'savon'
require "httpi/request"
require "savon/soap/xml"
require "savon/soap/request"
require "savon/soap/response"
require "savon/soap/request_builder"

client = Savon::Client.new do |wsdl, http|
  http.auth.ssl.verify_mode = :none
  wsdl.document = "http://SharePointSite/_vti_bin/authentication.asmx?wsdl"
end
response = client.request :soap, :login do
  soap.body = {:username => "UserName", :password => "password"}
end
newclient.http.headers["Cookie"] = response_from_login_soapaction.http.headers["Set-Cookie"]

But i am getting following issues/error,

W, [2012-11-23T14:15:15.312759 #7544]  WARN -- : HTTPI executes HTTP GET using the httpclient adapter
C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/resolver.rb:31:in `from_remote': #<HTTPI::Response:0x346b3d8> (Wasabi::Resolver::HTTPError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/resolver.rb:21:in `xml'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/document.rb:113:in `xml'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/document.rb:131:in `parse'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/document.rb:118:in `parser'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/wasabi-2.5.1/lib/wasabi/document.rb:34:in `endpoint'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:170:in `configure_dependencies'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:51:in `request'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:86:in `request'
        from D:/Ruby for Jam/RubyApplication1/lib/main.rb:74:in `<main>'

I am totally new to ruby, can anyone please help me out of this with running code or erro in above code.

Thanks,
Baba

@zacharydanger
Copy link

I've run into this same issue. It seems that Wasabi doesn't follow redirects and instead throws an error. You might try opening the URL to the Sharepoint WSDL and see if your browser redirects you elsewhere and then use the new URL in your script.

@babajul15
Copy link
Author

i have fixed this in my code, Please let me know if you are still facing it.

@rubiii
Copy link
Contributor

rubiii commented Dec 10, 2012

see savonrb/wasabi#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants