ruby /opt/local/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/bin/wsdl2ruby.rb --wsdl https://webservices.netsuite.com/wsdl/v2_5_0/netsuite.wsdl --type clientThe problem being that the wrapper adds the necessary "requires" for referencing the gem's code (correct results) and not the standard (incorrect results).
Using the correct wsdl2ruby the following test works without any modifications to the generated code:
require 'rubygems'
require_gem 'soap4r'
require 'defaultDriver'
driver = NetSuitePortType.new
driver.wiredump_dev = STDOUT
passport = Passport.new
passport.email = 'test'
passport.password = 'test'
passport.account ="test"
role = RecordRef.new
role.xmlattr_internalId = '123123123'
passport.role = role
response = driver.login(LoginRequest.new(passport))
pp "successful login: #{response.sessionResponse.status.xmlattr_isSuccess}"
No comments:
Post a Comment