Integrate > Service Manager integration methods and tools > Web Services > SOAP API > Consuming a Service Manager Web Service > Example: Retrieving Service Manager Release Management changes into a text file using Connect-It

Example: Retrieving Service Manager Release Management changes into a text file using Connect-It

  1. Create the Service Manager Web Services Connector with the following connection parameter settings. (All other settings remain the defaults.)
  2. Server name: <server>:<httpPort (use a dedicated port, not the loadBalancer port)>

    Context Path: sc62server/PWS

    Service name: Change Management

    • Enter the SysAdmin userID and password

  3. Click Test to verify that the connection works.
  4. Click Finish to save the changes made to the new connector.
  5. In our example, the Web Service simply fills information into a delimited text field. The settings for that connector are as follows:
  6. Name: Changes

    Processing Mode: write

    Connection protocol: Local / network files

    • Enter a folder name and decide whether to create a separate file for each record retrieved or write all records into one file (recommended).

    • On the next screen, decide whether to append to the same file (recommended) or overwrite with each run, or how many files to keep.

    • Enter the path to the descriptor file (see below) or create a new descriptor file.

  7. Click Finish to create and save the connector.
  8. To create a description file for the text output file (comma delimited text in our example), the following code is a sample .dsc file that can be used for retrieving change information:

    { TextFileFormat SMChange
    	Extension=
    	FormatType=Delimited
    	EscapeChar="\\"
    	Quote="\""
    	Extracolumn=1
    	WriteColumn=1
    	Delimiter=,
    	{ String "Change Number"
    		UserType=Default
    	}
    	{ String "Category"
    		UserType=Default
    	}
    	{ String "Status"
    		UserType= Default
    	}
    	{ String "Approval Status"
    		UserType=Default
    	}
    	{ String "Requested By"
    		UserType=Default
    	}
    	{ String "Assigned To"
    		UserType= Default
    	}
    	{ String "Coordinator"
    		UserType=Default
    	}
    	{ String "Coordinator Phone"
    		UserType=Default
    	}
    	{ TimeStamp "Planned Start Date"
    		UserType=TimeStamp
    	}
    	{ TimeStamp "Planned End Date"
    		UserType=TimeStamp
    	}
    	{ String "Reason"
    		UserType=Default
    	}
    	{ String "Current Phase"
    		UserType= Default
    	}
    	{ String "Risk Assessment"
    		UserType=Default
    	}
    }
  9. Finally the source (Web Services) data and the target data (Delimited Text file) must be mapped, in this case based on the matching names.
  10. Because Web Services need to be prompted to produce output, another text file connector must be created that helps create the request sent to the Web service. This text file connector is defined as follows:
  11. Processing Mode: read

    Connection Protocol: Local/Network files

    Location: Read files, file name: <path and filename>

    • Upon successful processing, leave the file in the folder.

    Use this .dsc file. Enter <path and filename> and click Find (magnifying glass) to create or modify a description file.

  12. Select a document type. Click the down arrow and enter SMChange.
  13. Click Next.
  14. Select a file for the preview. Accept the default <path and filename from step 6> and click Next.
  15. Select the appropriate delimiter.
  16. Enter the information on the screen:
    • Write the column headers: checked
    • Do not generate errors if a line contains... : checked
    • Number of skipped lines: 0
    • Quote character: "
    • Start of the comment line: //
    • Escape character: /
  17. Click Next.
  18. Enter the column names and type: for example, Change Number - text
  19. Click Finish to create and save the connector.
  20. Now create a mapping between this text file and the Service Manager Web Service by connecting the two.
  21. Click the first text connector and click Produce Now (the F5 button) to fill information from the cm3r file in Service Manager into a delimited text file via Web Services.