Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Sending SOAP headers using Ruby
There's not a whole lot of information out there for those of us consuming NetSuite web services with Ruby, so I'm posting this to help anyone who needs to send headers in their SOAP requests from Ruby.
This basic snippet is an example for sending search preferences in the SOAP header. The same concept can be applied to sending general preferences: just write a class called "PreferencesHeaderHandler" or something.
The general concept is to write a custom class that inherits from Ruby's built-in SOAP::Header::SimpleHandler class. Your custom class describes the namespace and other specific elements of the header.
This basic snippet is an example for sending search preferences in the SOAP header. The same concept can be applied to sending general preferences: just write a class called "PreferencesHeaderHandler" or something.
The general concept is to write a custom class that inherits from Ruby's built-in SOAP::Header::SimpleHandler class. Your custom class describes the namespace and other specific elements of the header.
0