|
Could not find default endpoint element that references contract ...
|
|||
---|---|---|---|
#18+
Добрый день! В Windows Forms Application на C# необходимо подключиться к некому стороннему (чужому) SOAP сервису http://isms.center/soap и вызвать один из его методов. Делаю так: В Solution Explorer у проекта по правой кнопке мыши на Service References выбираю "Add Service Reference", указываю в появившемся диалоге http://isms.center/soap, жму "GO" - все нормально, сервис виден, методы видны, называю Namespace "ServiceReference1", жму OK. ServiceReference1.SendSMSService service = new ServiceReference1.SendSMSServiceClient(); SendMessageRequest r = new SendMessageRequest(Login, Password, sms_kaz); SendMessageResponse res = service.SendMessage(r); и вот тут выдает: Could not find default endpoint element that references contract 'ServiceReference1.SendSMSService' 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. app.config проекта таков: <?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <system.serviceModel> ... <bindings> <basicHttpBinding> <binding name="SendSMSServiceBinding" /> </basicHttpBinding> ... </bindings> <client> ... <endpoint address=" http://isms.center/ru/soap/server" binding="basicHttpBinding" bindingConfiguration="SendSMSServiceBinding" contract="ServiceReference1.SendSMSService" name="SendSMSServicePort" /> </client> </system.serviceModel> </configuration> Пробовал удалить из этого конфига строку "<endpoint address=" http://isms.center/ru/soap/server ... " ... /> Ничего не меняется, из чего делаю вывод, что программа просто не видит прописанный автоматом endpoint. Но почему? Может contract странно указан? ... |
|||
:
Нравится:
Не нравится:
|
|||
20.02.2018, 12:49 |
|
|
start [/forum/topic.php?fid=19&fpage=2&tid=1396697]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
67ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
34ms |
get tp. blocked users: |
2ms |
others: | 271ms |
total: | 424ms |
0 / 0 |