Author Topic: Java API documentation for automation interface  (Read 3168 times)

Steve Wartik

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
  • Why aren't I outside?
    • View Profile
Java API documentation for automation interface
« on: March 22, 2008, 12:47:48 am »
Does Sparx Systems make available documentation for the Java version of the automation interface in the usual Java format? The material in the "Extend Enterprise Architect - Software Developers Kit" is a good start, but it would help me if I could see the APIs described in terms of the Java methods in eaapi.jar.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7296
  • Karma: +84/-12
    • View Profile
Re: Java API documentation for automation interfac
« Reply #1 on: March 25, 2008, 08:21:30 am »
The classes and methods are identical in the eaapi.jar to what is described.
Eve

support@sparxsystems.com

Steve Wartik

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
  • Why aren't I outside?
    • View Profile
Re: Java API documentation for automation interfac
« Reply #2 on: March 25, 2008, 09:03:28 am »
Simon,

Okay, let me ask a more specific question. I'm getting an exception when I call the AddNew() method. The message of the exception is "I". Other exceptions have been equally cryptic. Is there any documentation that explains them further and gives hints on how to debug?

Thanks,

Steve Wartik

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7296
  • Karma: +84/-12
    • View Profile
Re: Java API documentation for automation interfac
« Reply #3 on: March 25, 2008, 09:32:03 am »
That's an issue where somewhere in the wrapper it's not handling unicode strings properly.  We'll correct that, but in the mean time I suggest that the error would be "Invalid Argument".  How to resolve that would depend on what arguments you're passing and to what collection.
Eve

support@sparxsystems.com

ovsttun

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Java API documentation for automation interfac
« Reply #4 on: April 02, 2008, 06:50:38 am »
The reported issue in version 7.1 is for me now a showstopper for usage of the Java API.

Replication of the issue :

1)
Create a default project by File->New Project... called test.eap
Include only Class Model
You now have a dummy eap file

2)
Run the following Java program
(I have used Java JDK version 1.6.0_02)

import org.sparx.Package;
import org.sparx.Repository;
import org.sparx.Collection;

public class Test2 {

    public static void main(String[] args) {
        Repository rep = new Repository();
        rep.OpenFile("test.eap");
        Collection<Package> packs = rep.GetModels();
    }
}

The following Exception is generated  
Exception in thread "main" java.lang.Exception: I
      at org.sparx.Repository.comGetModels(Native Method)
      at org.sparx.Repository.GetModels(Repository.java:590)
      at Test2.main(Test2.java:10)

I have used the eaapi.jar and SSJavaCOM.dll distributed with the EA 7.1. 828 running under on Win XP SP2

Does anyone else have a similar problem with the 7.1 Java API ?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Java API documentation for automation interfac
« Reply #5 on: April 02, 2008, 08:51:18 am »
Have you included this in a 'formal' bug report directly to Sparx?

If not, please fill out the bug report form. You can find the correct form by clicking the Bug Report link below the Support link near the bottom of any forum page. If you are a registered user you should then click the appropriate link above the form you'll see, which will take you to a slightly different form. With the registered bug report you can attach a compressed file if need be, and it is a little bit quicker to fill out. Otherwise the forms are the same.

Filling the form out will help prioritize the issue, which should speed the resolution.

David
No, you can't have it!

helmerhausen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Java API documentation for automation interfac
« Reply #6 on: June 02, 2008, 10:38:50 pm »
I tried to access EA via java, too. In your case i do not get this exception, but the collection "packs" is null.
I am not able to access any model or something else.

Does anybody have a solution.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7296
  • Karma: +84/-12
    • View Profile
Re: Java API documentation for automation interfac
« Reply #7 on: June 03, 2008, 08:05:20 am »
Quote
I tried to access EA via java, too. In your case i do not get this exception, but the collection "packs" is null.
I am not able to access any model or something else.

Does anybody have a solution.
Upgrade to the latest build.  There was a problem with the Java API of early 7.1 builds.
Eve

support@sparxsystems.com

helmerhausen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Java API documentation for automation interfac
« Reply #8 on: June 03, 2008, 05:01:00 pm »
Quote
Quote
I tried to access EA via java, too. In your case i do not get this exception, but the collection "packs" is null.
I am not able to access any model or something else.

Does anybody have a solution.
Upgrade to the latest build.  There was a problem with the Java API of early 7.1 builds.

Thank you. It works real fine!!!