Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Initialization in .NET

Initialization in .NET

The client application must perform an initialization step before it makes calls to Metadata web services and Data Integration web services.
To perform initialization, complete the following steps:
  1. Instantiate a MetadaService class object (MWSProxy):
    MWSProxy= new MetadaService();
    If the Metadata service endpoint URL in the Metadata.wsdl does not have the correct URL, you can set the URL with the following code:
    MWSProxy.Url = MWS_URL;
    MWS_URL is a variable containing the endpoint URL for the Metadata web services.
    Use the MWSProxy object to call Metadata web service operations.
  2. Instantiate a DataIntegrationService class object (DIWSProxy):
    DIWSProxy= new DataIntegrationService ();
    If the Data Integration service endpoint URL in the DataIntegration.wsdl does not have the correct URL, you can set the URL with the following code:
    DIWSProxy.Url = DIWS_URL;
    DIWS_URL is a string containing the Data Integration web service endpoint URL.
    Use the DIWSProxy object to call the Data Integration web service operations.
  3. Call the Login operation using the MWSProxy object to create a session ID for the client application user account. The Login operation takes a domain, repository, user name, and password, wrapped in an object LoginRequest and returns a session ID.
    LoginRequest loginReq = new LoginRequest(); loginReq.RepositoryDomainName = REPO_DOMAIN_NAME; loginReq.RepositoryName = REPO_NAME; loginReq.UserName = USER_NAME; loginReq.Password = PASSWORD; String sessID = MWSProxy.Login(loginReq);
    REPO_DOMAIN_NAME is a string containing a PowerCenter domain name, REPO_NAME is a string containing the name of a repository in the domain, USER_NAME is a string containing a user name valid for the repository, and PASSWORD is a string containing the password for the user to log in to the repository.
  4. Associate the MWSProxy and DIWSProxy object with the repository and user name in the session ID. All subsequent requests made to the batch web services using the MWSProxy or DIWSProxy object use the repository and user name in the session ID.
    MWSProxy.Context.SessionId = sessID; DIWSProxy.Context.SessionId = sessID;

0 COMMENTS

We’d like to hear from you!