Book a Demo

Author Topic: Opening a cloud based repository with id and password credential  (Read 9179 times)

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
I have developed a command line tool which can open a local EA repository file (.EAP), make some operation on models and provide output on console with the following code:

Code: [Select]
Repository eaRepo = new Repository();
eaRepo.OpenFile(inputFilePath);

where inputFilePath points to a local repository file. Now I want to connect to a cloud repository, which is password protected. Is there any way to access the repo in cloud? I am using c# project.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Opening a cloud based repository with id and password credential
« Reply #1 on: January 04, 2022, 10:53:42 pm »
IIRC there's an OpenFile2 as well that accepts a username and password.

Geert

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #2 on: January 05, 2022, 03:24:49 am »
For the input file path, how should I specify the http path, port and the model name? Is there any specific format for that?

https://ibb.co/JBRdNFt

IIRC there's an OpenFile2 as well that accepts a username and password.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #3 on: January 05, 2022, 09:43:07 am »
I guess that you can pick the DSN from the Open menu when you select Edit Connection String from the context of the DB.

q.

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #4 on: January 05, 2022, 06:56:28 pm »
I have tried the following but didn't work, said file not exists:

Code: [Select]

eaRepo.OpenFile2("EAConnectString:Test-Architecture-CM --- ;Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;","abc","abc")


I can create a shortcut of the cloud EAP file with the connection string though:

Code: [Select]
"EAConnectString:Test-Architecture-CM --- ;Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;","abc","abc"

I guess that you can pick the DSN from the Open menu when you select Edit Connection String from the context of the DB.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Opening a cloud based repository with id and password credential
« Reply #5 on: January 05, 2022, 07:05:50 pm »
Try leaving the first part off:

Code: [Select]
eaRepo.OpenFile2("Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;","abc","abc")
This same principle works for database connections. I've not used it with a cloud connection before.

Geert

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #6 on: January 06, 2022, 03:43:30 am »
Tried, didn't work, says file doesn't exist. The solution only works if I create a shortcut from the connection string and rename it as a .eap file. It would have been great if direct connection to cloud can be established. Also I am facing another problem, SuppressSecurityDialog is not working, by default or explicitly setting it to true is not working. I am using EA version 13.5.

Code: [Select]
Repository eaRepo = new Repository();
eaRepo.OpenFile2("Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;", "abc", "abc");
eaRepo.SuppressSecurityDialog = true;

Try leaving the first part off:

Code: [Select]
eaRepo.OpenFile2("Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;","abc","abc")
This same principle works for database connections. I've not used it with a cloud connection before.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #7 on: January 06, 2022, 07:38:38 am »
You likely need to mail Sparx support unless one of the supporters picks on this one.

q.

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #8 on: January 06, 2022, 08:24:45 pm »
I have emailed the support about the problem. Also, I have tried to find a documentation regarding connecting to a cloud model, but so far no luck. Do you have any idea?

You likely need to mail Sparx support unless one of the supporters picks on this one.

q.

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #9 on: January 07, 2022, 10:26:08 pm »
Following is the working code:

Code: [Select]
eaRepo.OpenFile2("Test-Architecture-CM --- ;Connect=Cloud=protocol:http,address:apec.test.de,port:80;Data Source=Test-Architecture;DSN=Test-Architecture;","abc","abc")

You likely need to mail Sparx support unless one of the supporters picks on this one.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #10 on: January 07, 2022, 11:18:12 pm »
So it's the first part until the colon from the connection string that you have to omit?

q.

priombiswas89

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
Re: Opening a cloud based repository with id and password credential
« Reply #11 on: January 07, 2022, 11:30:23 pm »


yes
So it's the first part until the colon from the connection string that you have to omit?

q.