Has anyone been able to get the suds soap library to work with the NetSuite WSDL? I get this error when I try to create a client.
from suds.client import Cli
Yes, suds can connect to NetSuite, but it takes a long time to process the WSDL.
Here's some sample code:
# Open NetSuite Session
wsdlNetSuite = 'https://webservices.netsuite.com/wsdl/v2010_1_0/netsuite.wsdl'
client = Client(wsdlNetSuite)
# Login
passport = client.factory.create('ns4:Passport')
passport.email = 'username@web.com'
passport.password = 'ABC123'
passport.account = 123
loginResponse = client.service.login(passport)
print 'Login Response: '
print loginResponse.status
# Get a record
recordRef = client.factory.create('ns4:RecordRef')
recordRef._internalId = 127842
recordRef._type = 'invoice'
record = client.service.get(recordRef)
print record
You might also need to try various combinations of Python and SUDS versions. It's not a particularly reliable library.