Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: working in CLIwith Two CS Systems
Topic Summary:
Created On: 3-Sep-2006 15:25
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 3-Sep-2006 15:25
User is offline View Users Profile Print this message


Ronen Ben-Chamo

Posts: 84
Joined: 1-Dec-2005

Hi,

I have a problem when I try to work with two CS Systems in a script

If I open the first connection and run somthing , it is OK, if I open a second connection, I can't use the first connection
I have an error "The fault code: 1
The fault string: Could not identify user"


see example below


#Include the ChangeSynergy csapi module.
   use ChangeSynergy::csapi;
   
# define variables
   
   $User=$ARGV[0];
   $Password=$ARGV[1];
   
   #Create a new instance of the csapi object.
   #my $csapi = new ChangeSynergy::csapi();
   my $csapi_Internal = new ChangeSynergy::csapi();
   my $csapi_External = new ChangeSynergy::csapi();

   my $requestedAttrs = "problem_number|crstatus|severity|problem_description|problem_synopsis|product_name|submitter|request_type|product_version";



     
   #Eval block is used for error handling.
   eval
   {
     
      #Setup the connection parameters for connecting to the ChangeSynergy Server.
      #Note however that no connection to the server is made at this point.
      print "======= Set up connection to http://cm2il01cm:8600/cs...\n";
      $csapi_External->setUpConnection("http", "cm2il01cm", 8600 );
      #Login to the ChangeSynegy server. (user, password, role, database);     
      my $aUserExt = $csapi_External->Login($User, $Password, "User", "\\\\cm2il01cm\\ccmdb\\comccw");
     
     
     
      print "======= Set up connection to http://cmtest:8600/cs...\n";
      $csapi_Internal->setUpConnection("http", "cmtest", 8600 );
      #Login to the ChangeSynegy server. (user, password, role, database);
      my $aUserInt = $csapi_Internal->Login($User, $Password, "User", "\\\\cmtest\\ccmdb\\comsys2_130806");
     
      my $OpenCRResultsExternal = $csapi_External->ReportData($aUserExt, "EGG", $requestedAttrs);
      $NumOpenCR=$OpenCRResultsExternal->getDataSize();
      print "\nTotal number of CR's related to the query is = " . $OpenCRResultsExternal->getDataSize() . "\n\n";
      
      
   
   };


Thanks
Ronen


-------------------------
Ronen Ben-Chamo
Configuration Managment
Report this to a Moderator Report this to a Moderator
 25-Sep-2006 16:37
User is offline View Users Profile Print this message


Juergen Kreileder

Posts: 1
Joined: 21-Aug-2006

I consider that a bug in ChangeSynergy::csapi. Protocol, host, and port are stored in global variables. You can work around the problem by calling setUpConnection() with the appropriate parameters each time you switch between $csapi_Internal and $csapi_External.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.