Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: tzafrir on July 14, 2016, 03:51:17 am

Title: Using web service in EA
Post by: tzafrir on July 14, 2016, 03:51:17 am
Hi,
I have created a webservice, tested it (in visual studio) and saw that it is working properly.
I am now trying to make it work from AddIn.
I have added the ServiceReference Service.wsmx file to my references.

I have then added the using declaration:
using MyAddIn.MyServiceReference;

as needed for the webservice to be recognize.
Now I compiled and opened EA, EA loaded my AddIn and everything was OK.

When I added the line:
private MyServiceSoapClient client = new MyServiceSoapClient(); (which compiles ok)
But when opening EA and looking in the Manage AddIns, I am getting Error missing 0x80040154, and AddIn is not loaded.

As anyone encountered in such behavior, or know what is missing? because the error is not informative...

Tzafrir




Title: Re: Using web service in EA
Post by: qwerty on July 14, 2016, 04:37:46 am
I have absolutely no idea about that, so just guessing. EA needs a user to run. And in the configuration you explain it rather looks as it runs as a service. And that will not work.

q.
Title: Re: Using web service in EA
Post by: tzafrir on July 14, 2016, 05:49:58 am
Maybe let me rephrase my question,
I inserted the line:
SimulatorServiceSoapClient client = new SimulatorServiceSoapClient();
inside a method and it EA did recognize the AddIn.

Now it throws an exception when passing throw this line:
An exception of type 'System.InvalidOperationException' occurred in System.ServiceModel.dll but was not handled in user code

Additional information: Could not find default endpoint element that references contract 'MyServiceReference.MyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Does anybody have an example (or steps) how to configure a working web service inside EA AddIn?
Title: Re: Using web service in EA
Post by: qwerty on July 14, 2016, 08:03:28 am
Oh, I see that it's vice versa and you're just trying to make a service call inside EA. Probably you're better off asking that on SO.

q.
Title: Re: Using web service in EA
Post by: tzafrir on July 14, 2016, 08:10:38 pm
what is SO?
Title: Re: Using web service in EA
Post by: DanielB on July 14, 2016, 08:15:44 pm
@tzafrir: I'm guessing that SO stands for stackoverflow.com
Title: Re: Using web service in EA
Post by: qwerty on July 14, 2016, 09:04:32 pm
Oops. Yes. SO=StackOverflow  :)

q.