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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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