powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / [игнор отключен] [закрыт для гостей] / 1с 8.1. Веб-сервис
3 сообщений из 3, страница 1 из 1
1с 8.1. Веб-сервис
    #37547832
andrejev2006
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
О себе:
версия 1с: 8.1.15.14
IIS: 7.5
Windows: 7 x64
С 1с не знаком вообще!

Необходимо: Организовать работу с 1с через Web-сервисы

Что уже сделано:
1) создан web-сервис "WebСервисAndreev" в URI пространство имен "kkk";
2) добавлена операция "OperationOne" с параметром "UserName" (входной-выходной):
Код: plaintext
1.
2.
3.
4.
Функция OperationOne(UserName = Неопределено)
	UserName = "TestUserName";
	Возврат "Привет!";
КонецФункции
;
3) настроен IIS;
4) Опубликован web-сервер на "C:\inetpub\wwwroot\1C";

Результат:
при переходе в браузере(IE или Firefox) по адресу http://localhost/1C/ws1.1cws?wsdl получаю следующее:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:tns="kkk"
		xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
		xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		xmlns:xsd1="kkk"
		xmlns="http://schemas.xmlsoap.org/wsdl/"
		name="WebСервисAndreev"
		targetNamespace="kkk">
	<types>
		<xsd:schema xmlns:xs1="kkk"
				elementFormDefault="qualified"
				targetNamespace="kkk">
			<xsd:element name="OperationOne">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="UserName"
								type="xsd:string"/>
					</xsd:sequence>
				</xsd:complexType>

			</xsd:element>
			<xsd:element name="OperationOneResponse">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="return"
								type="xsd:string"/>
						<xsd:element name="UserName"
								type="xsd:string"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>

		</xsd:schema>
	</types>
	<message name="OperationOneRequestMessage">
		<part name="parameters"
				element="tns:OperationOne"/>
	</message>
	<message name="OperationOneResponseMessage">
		<part name="parameters"
				element="tns:OperationOneResponse"/>
	</message>
	<portType name="WebСервисAndreevPortType">

		<operation name="OperationOne">
			<input message="tns:OperationOneRequestMessage"/>
			<output message="tns:OperationOneResponseMessage"/>
		</operation>
	</portType>
	<binding name="WebСервисAndreevSoapBinding"
			type="tns:WebСервисAndreevPortType">
		<soapbind:binding style="document"
				transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="OperationOne">
			<soapbind:operation style="document"/>

			<input>
				<soapbind:body use="literal"/>
			</input>
			<output>
				<soapbind:body use="literal"/>
			</output>
		</operation>
	</binding>
	<binding name="WebСервисAndreevSoap12Binding"
			type="tns:WebСервисAndreevPortType">

		<soap12bind:binding style="document"
				transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="OperationOne">
			<soap12bind:operation style="document"/>
			<input>
				<soap12bind:body use="literal"/>
			</input>
			<output>
				<soap12bind:body use="literal"/>
			</output>

		</operation>
	</binding>
	<service name="WebСервисAndreev">
		<port name="WebСервисAndreevSoap"
				binding="tns:WebСервисAndreevSoapBinding">
			<documentation> 
				<wsi:Claim xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
						conformsTo="http://ws-i.org/profiles/basic/1.1"/>
			</documentation>
			<soapbind:address location="http://localhost/1C/ws1.1cws"/>
		</port>

		<port name="WebСервисAndreevSoap12"
				binding="tns:WebСервисAndreevSoap12Binding">
			<soap12bind:address location="http://localhost/1C/ws1.1cws"/>
		</port>
	</service>
</definitions>

Что нужно:
Необходимо, чтобы результат запроса содержал возвращаемое значение или значение переменной.
...
Рейтинг: 0 / 0
1с 8.1. Веб-сервис
    #37547959
DmitriyZ
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Запрос то откуда делать будете?
...
Рейтинг: 0 / 0
1с 8.1. Веб-сервис
    #37548054
andrejev2006
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
DmitriyZ, из приложения написанного на C#
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / [игнор отключен] [закрыт для гостей] / 1с 8.1. Веб-сервис
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]