Author Topic: Using web service in EA  (Read 5097 times)

tzafrir

  • EA User
  • **
  • Posts: 127
  • Karma: +0/-0
    • View Profile
Using web service in EA
« 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





qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Using web service in EA
« Reply #1 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.

tzafrir

  • EA User
  • **
  • Posts: 127
  • Karma: +0/-0
    • View Profile
Re: Using web service in EA
« Reply #2 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?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Using web service in EA
« Reply #3 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.

tzafrir

  • EA User
  • **
  • Posts: 127
  • Karma: +0/-0
    • View Profile
Re: Using web service in EA
« Reply #4 on: July 14, 2016, 08:10:38 pm »
what is SO?

DanielB

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Using web service in EA
« Reply #5 on: July 14, 2016, 08:15:44 pm »
@tzafrir: I'm guessing that SO stands for stackoverflow.com

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Using web service in EA
« Reply #6 on: July 14, 2016, 09:04:32 pm »
Oops. Yes. SO=StackOverflow  :)

q.