Interaction with the VMware web services using custom methods
I need to interact with the VMware VIM API outside of what is provided in the integrations (e.g. additions of RDMs to VMs, modification of DRS groups, etc.). I've imported the VIM WSDL and I'm trying to figure out how to use the methods created. I can login and retrieve the vcSessionCookie but I can't figure out how to pass it to subsequent methods. For example, I have built a flow that looks like this:
Login ReconfigVM_Task Logout
The Login method is successful and returns the Session Cookie but the ReconfigVM_Task and Logout methods fail with "The session is not authenticated" error message. In the default configuration the ReconfigVM_Task doesn't include an input for vcSessionCookie so I copied this method to a custom method and added it as a header in the SOAP XML. This didn't work. Next I tried using the standard HTTP POST RAW method and added the vcSessionHeader to the header inputs which didn't work, so I then tried to just add the entire XML text to the string input, and that didn't work either. Obviously HP has solved this as there are several integrations but I can't figure out how they are integrating the Login method to the other methods in the VMware integration pack.
Anyone have any ideas? TIA