How to update a datasource password from a SoapUI client?

How to update a datasource password from a SoapUI client?

book

Article ID: KB0076169

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0 and higher

Description

Scenario:

A password for a datasource connection needs to be programmatically updated by making a soap call to the TIBCO Data Virtualization (TDV) service, without using the TDV Studio UI tool.  Typically a call would be made to the TDV admin api web service operations seen under /services/webservices/system/admin



 

Issue/Introduction

This concerns the use of a TIBCO Data Virtualization admin api.

Resolution

For example, by using a SoapUI client tool, this would be a soap request made to TDV, that would then update the password for the 'ds_orders' datasource that is provided under /shared/examples in the Studio resources tree. 
Optionally, this soap envelope also updates the datasource's annotation to become "this is my new annotation", to serve as a helpful visual cue that the datasource was actually updated.
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://www.compositesw.com/services/system/admin/resource" xmlns:com="http://www.compositesw.com/services/system/util/common">
   <soapenv:Header/>
   <soapenv:Body>
      <resource:updateDataSource xmlns:resource="http://www.compositesw.com/services/system/admin/resource" xmlns:common="http://www.compositesw.com/services/system/util/common">
  <resource:path>/shared/examples/ds_orders</resource:path>
<resource:detail>SIMPLE</resource:detail>
  <resource:annotation>this is my new anotation</resource:annotation>
  <resource:attributes>
    <common:attribute>
      <common:name>password</common:name>
      <common:type>PASSWORD_STRING</common:type>
      <common:value>tutorial</common:value>
    </common:attribute>
  </resource:attributes>
</resource:updateDataSource>
   </soapenv:Body>
</soapenv:Envelope>