Доброго дня!
Университетская лаба: нужно написать ENDPOINT, предоставляющий доступ к хранимой процедуре и пользовательской функции и отобразить его в браузере. Вот написанный мной код:
| Код | Alter ENDPOINT test_Http_Endpoint STATE = STARTED --Speify that HTTP protocol that used by endpoint AS HTTP( --Specify the Virtual Path that used to get your method PATH = '/sql', /*Specify the authentication mode used to login through Http endpoint*/ AUTHENTICATION = (INTEGRATED) , /*specfy that port used http protocol if you want to use https change CLEAR to SSL*/ PORTS = ( CLEAR ), --Specify the port number used by endPoint CLEAR_PORT = 2000, /*Specify servername that host endpoint */ SITE = 'localhost' ) /*Use simple object access protocol SOAP to interoperability*/ FOR SOAP( /*specify the logical name used by client to call specific stored procedure */ WEBMETHOD 'UpdatePrice' ( --Specify the actual stored procedure name in database name='Автомобили.dbo.PriceChanges' ), WEBMETHOD 'TheMostExpensive' ( --Specify the actual stored procedure name in database name='Автомобили.dbo.MostExpensive' ), /* Make WSDL return to Client to know the Request/Response Mdoel Stored Procedure and used to Create Proxy Class in .NET application */ WSDL = DEFAULT, --include Schema in soap response to client SCHEMA = STANDARD, /* Specifies the database in the context of which the requested operation is executed */ DATABASE = 'Автомобили', --Specifies the namespace for the endpoint NAMESPACE = 'http://tempUri.org/' ); GO
|
Enpoint успешно создан, он есть в результатах запроса:
| Код | SELECT * FROM sys.endpoints;
|
в браузере набираю:http://localhost:2000/sql?WSDL. Просит логин, без логина ошибка SOAP LOGIN FAILURE. Пытался вводить TMD-41PA84K8MYI (имя сервера), TMD-41PA84K8MYI\Yurii, Yurii. Не помогает. Тупая ситуация, не пойму что надо ввести, help! |