|
Создание web ссылки | ☑ | ||
---|---|---|---|---|
0
svchernova
11.08.11
✎
14:47
|
Привет всем.
Создала ws ссылку. Как теперь увидеть возвращаемые значения, что нужно сделать? Причем не могу понять, почему не работает код: СервисАмадеус=WSСсылки.Амадеус.СоздатьWSПрокси("http://test.amadeus.kz/ali-web-services/policy?wsdl", "PolicyService", "PolicyServicePort" ); А этот код создает ws ссылку без проблем, но ответ сервера даёт ошибку МойТип = СервисАмадеус.ФабрикаXDTO.Тип(URIПространстваИменСервиса,"AuthenticationSoapHeader"); МойТип = СервисАмадеус.ФабрикаXDTO.Тип(URIПространстваИменСервиса,"getRegisteredAgencies"); МойПараметр = СервисАмадеус.ФабрикаXDTO.Создать(МойТип ); МойПараметр.offset = 1; МойПараметр.limit = 1; ОтветСервера = СервисАмадеус.getRegisteredAgencies(МойПараметр); Ошибка SOAP сервера: SOAP header 'AuthenticationSoapHeader' was not found Кто чем может помочь? |
|||
1
Alex_MA
11.08.11
✎
14:48
|
СоздатьОпределение по "http://test.amadeus.kz/ali-web-services/policy?wsdl", а затем его "впихнуть" в функцию
WSСсылки.Амадеус.СоздатьWSПрокси(Определение Вроде так |
|||
2
Alex_MA
11.08.11
✎
14:50
|
СоздатьWSПрокси(<URIПространстваИменСервиса>, <ИмяСервиса>, <ИмяПорта>)
а ты передаешь ссылку на web сервис |
|||
3
svchernova
11.08.11
✎
14:50
|
(1) Немножко подробнее скажи, пожалуйста
|
|||
4
svchernova
11.08.11
✎
14:52
|
СервисАмадеус=WSСсылки.Амадеус.СоздатьWSПрокси("http://test.amadeus.kz/ali-web-services/policy?wsdl", "PolicyService", "PolicyServicePort" );
Что тут неправильно? |
|||
5
Alex_MA
11.08.11
✎
14:52
|
(4)"http://test.amadeus.kz/ali-web-services/policy?wsdl", замени на URI web сервиса
|
|||
6
Alex_MA
11.08.11
✎
14:54
|
ты передаешь URL источника, а надо URI web сервиса
http://gyazo.com/698287ceb461ebeb4889cd948d701143.png |
|||
7
svchernova
11.08.11
✎
14:55
|
(5) судорожно пытаюсь сообразить, где взять этот URI. Не встречаась с этими понятиями никогда
|
|||
8
svchernova
11.08.11
✎
14:56
|
сейчас посмотрю, подожди минутку пож
|
|||
9
Alex_MA
11.08.11
✎
14:56
|
||||
10
svchernova
11.08.11
✎
14:59
|
http://webservices.ali.softlets.com/2010/10 - это может быть URI?
|
|||
11
svchernova
11.08.11
✎
15:01
|
получилось!!!!!!!!!!!!!!!!!!!!!
|
|||
12
svchernova
11.08.11
✎
15:01
|
Слушай, здорово.. А как теперь данные из этого сервиса выцарапать? Что нужно сделать?
|
|||
13
svchernova
11.08.11
✎
15:02
|
Спасибо :))
|
|||
14
Alex_MA
11.08.11
✎
15:04
|
Дальше вызывай процедуру web сервиса, если она в нем описана конечно
|
|||
15
svchernova
11.08.11
✎
15:05
|
(9) Я вот смотрю твою первую картинку.. тут нужно создать какой-то файл публикации, URI пространства имён,пакет ХДТО
|
|||
16
svchernova
11.08.11
✎
15:05
|
то есть нужно ещё и web сервис создать?
|
|||
17
svchernova
11.08.11
✎
15:06
|
Ты мне уже помогал, я помню тебя.
|
|||
18
Alex_MA
11.08.11
✎
15:13
|
(16)нет, нужно смотреть описание web сервиса, что он вообще предоставляет
|
|||
19
svchernova
11.08.11
✎
15:16
|
а у тебя ведь создан web сервис, как я понимаю?
|
|||
20
svchernova
11.08.11
✎
15:16
|
судя по картинке..
|
|||
21
Alex_MA
11.08.11
✎
15:17
|
да, я создавал
|
|||
22
svchernova
11.08.11
✎
15:20
|
Саша, ты мне просто носом ткни, что дальше делать..
|
|||
23
svchernova
11.08.11
✎
15:20
|
у меня пустая конфигурация. Я только начинаю всё это изучать.
|
|||
24
svchernova
11.08.11
✎
15:23
|
у меня есть описание web-сервиса, а я на него смотрю, как баран на новые ворота
|
|||
25
Alex_MA
11.08.11
✎
15:27
|
ну создай у web сервиса какую нибудь процедуру, которая будет что то делать. дальше опубликуй web сервис.
Дальше из другой БД как то так: Прокси = WSСсылки.vscРаботаСОбъектами.СоздатьWSПрокси("http://localhost/webcl_ws/pub/", "vscРаботаСОбъектами", "vscРаботаСОбъектамиSoap"); Прокси.Пользователь = "sa"; Прокси.Пароль = ""; ДатаXDTO = ФабрикаXDTO.Тип("http://www.w3.org/2001/XMLSchema", "dateTime"); ЗначениеДатаНачалаXDTO = ФабрикаXDTO.Создать(ДатаXDTO, НачалоДня(ДатаНачала)); ЗначениеДатаОкончанияXDTO = ФабрикаXDTO.Создать(ДатаXDTO, КонецДня(ДатаОкончания)); Ответ = Прокси.РаботаСОбъектами(ЗначениеДатаНачалаXDTO, ЗначениеДатаОкончанияXDTO); РаботаСОбъектами - это "Операция" web сервиса: http://imagepost.ru/images/s/cm/scmftaleavdlgrxpkikvqrrezprcci.png Вообще, все это очень хорошо описано в книге от 8.0 к 8.1, с примерами |
|||
26
Asmody
11.08.11
✎
15:28
|
я же написал уже в v8: Создать WS ссылку в v8.2 — не будет 1Ска с этим сервисом работать. Во-первых, используется AuthenticationSoapHeader, во-вторых, сервис на java — будут ошибки преобразования типов XDTO
|
|||
27
Alex_MA
11.08.11
✎
15:31
|
(26)что за web сервис такой ?
|
|||
28
Asmody
11.08.11
✎
15:31
|
(27) адрес wsld в (0)
|
|||
29
svchernova
11.08.11
✎
15:32
|
(26) вот сервис:
<?xml version="1.0" encoding="UTF-8" ?> - <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. --> - <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. --> - <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservices.ali.softlets.com/2010/10" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservices.ali.softlets.com/2010/10" name="PolicyService"> - <types> - <xsd:schema> <xsd:import namespace="http://webservices.ali.softlets.com/2010/10" schemaLocation="http://ali.amadeus.kz:80/ali-web-services/policy?xsd=1" /> </xsd:schema> </types> - <message name="getPoliciesCount"> <part name="parameters" element="tns:getPoliciesCount" /> </message> - <message name="getPoliciesCountResponse"> <part name="parameters" element="tns:getPoliciesCountResponse" /> </message> - <message name="ServiceExecutionException"> <part name="fault" element="tns:ServiceExecutionException" /> </message> - <message name="getCurrencyRateCollectionsCount"> <part name="parameters" element="tns:getCurrencyRateCollectionsCount" /> </message> - <message name="getCurrencyRateCollectionsCountResponse"> <part name="parameters" element="tns:getCurrencyRateCollectionsCountResponse" /> </message> - <message name="getCurrencyRateCollectionsInPeriod"> <part name="parameters" element="tns:getCurrencyRateCollectionsInPeriod" /> </message> - <message name="getCurrencyRateCollectionsInPeriodResponse"> <part name="parameters" element="tns:getCurrencyRateCollectionsInPeriodResponse" /> </message> - <message name="getCurrencyRateCollectionsInPeriodCount"> <part name="parameters" element="tns:getCurrencyRateCollectionsInPeriodCount" /> </message> - <message name="getCurrencyRateCollectionsInPeriodCountResponse"> <part name="parameters" element="tns:getCurrencyRateCollectionsInPeriodCountResponse" /> </message> - <message name="getCurrencyRateCollections"> <part name="parameters" element="tns:getCurrencyRateCollections" /> </message> - <message name="getCurrencyRateCollectionsResponse"> <part name="parameters" element="tns:getCurrencyRateCollectionsResponse" /> </message> - <message name="getCurrentDate"> <part name="parameters" element="tns:getCurrentDate" /> </message> - <message name="getCurrentDateResponse"> <part name="parameters" element="tns:getCurrentDateResponse" /> </message> - <message name="getRegisteredAgenciesCount"> <part name="parameters" element="tns:getRegisteredAgenciesCount" /> </message> - <message name="getRegisteredAgenciesCountResponse"> <part name="parameters" element="tns:getRegisteredAgenciesCountResponse" /> </message> - <message name="getRegisteredAgencies"> <part name="parameters" element="tns:getRegisteredAgencies" /> </message> - <message name="getRegisteredAgenciesResponse"> <part name="parameters" element="tns:getRegisteredAgenciesResponse" /> </message> - <message name="getPolicies"> <part name="parameters" element="tns:getPolicies" /> </message> - <message name="getPoliciesResponse"> <part name="parameters" element="tns:getPoliciesResponse" /> </message> - <portType name="PolicyService"> - <operation name="getPoliciesCount"> <input message="tns:getPoliciesCount" /> <output message="tns:getPoliciesCountResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getCurrencyRateCollectionsCount"> <input message="tns:getCurrencyRateCollectionsCount" /> <output message="tns:getCurrencyRateCollectionsCountResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getCurrencyRateCollectionsInPeriod"> <input message="tns:getCurrencyRateCollectionsInPeriod" /> <output message="tns:getCurrencyRateCollectionsInPeriodResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getCurrencyRateCollectionsInPeriodCount"> <input message="tns:getCurrencyRateCollectionsInPeriodCount" /> <output message="tns:getCurrencyRateCollectionsInPeriodCountResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getCurrencyRateCollections"> <input message="tns:getCurrencyRateCollections" /> <output message="tns:getCurrencyRateCollectionsResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getCurrentDate"> <input message="tns:getCurrentDate" /> <output message="tns:getCurrentDateResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getRegisteredAgenciesCount"> <input message="tns:getRegisteredAgenciesCount" /> <output message="tns:getRegisteredAgenciesCountResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getRegisteredAgencies"> <input message="tns:getRegisteredAgencies" /> <output message="tns:getRegisteredAgenciesResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> - <operation name="getPolicies"> <input message="tns:getPolicies" /> <output message="tns:getPoliciesResponse" /> <fault message="tns:ServiceExecutionException" name="ServiceExecutionException" /> </operation> </portType> - <binding name="PolicyServicePortBinding" type="tns:PolicyService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> - <operation name="getPoliciesCount"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getCurrencyRateCollectionsCount"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getCurrencyRateCollectionsInPeriod"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getCurrencyRateCollectionsInPeriodCount"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getCurrencyRateCollections"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getCurrentDate"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getRegisteredAgenciesCount"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getRegisteredAgencies"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> - <operation name="getPolicies"> <soap:operation soapAction="" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="ServiceExecutionException"> <soap:fault name="ServiceExecutionException" use="literal" /> </fault> </operation> </binding> - <service name="PolicyService"> - <port name="PolicyServicePort" binding="tns:PolicyServicePortBinding"> <soap:address location="http://ali.amadeus.kz:80/ali-web-services/policy" /> </port> </service> </definitions> |
|||
30
svchernova
11.08.11
✎
15:33
|
(27)Прокси создался:
СервисАмадеус=WSСсылки.Амадеус.СоздатьWSПрокси("http://webservices.ali.softlets.com/2010/10", "PolicyService", "PolicyServicePort" ); Теперь мука, что дальше делать |
|||
31
Alex_MA
11.08.11
✎
15:35
|
(28)а мне вот интересно, возможно ли в web сервис из 1С-ки передать значение System.DateTime, ну вообщем фрэймворковские типы ?
Вот к примеру http://www.cbr.ru/scripts/Root.asp?Prtid=DWS |
|||
32
svchernova
11.08.11
✎
15:36
|
Asmody, дело в том, что с этой же базой amadeus работает другая франя, и у них получилось законнектиться с базой средствами 1С, вытягивают оттуда данные
|
|||
33
Asmody
11.08.11
✎
15:38
|
(31) dateTime можно. только веб-сервис ЦБР возвращает DataSet'ы. А как 1Ске объяснить, что такое DataSet — хз
|
|||
34
Asmody
11.08.11
✎
15:39
|
(32) пусть расскажут, как они это делают. для начала — как обходят AuthenticationSoapHeader
|
|||
35
svchernova
11.08.11
✎
15:43
|
(34) Они не расскажут запросто так, а за денюшку только.
|
|||
36
svchernova
11.08.11
✎
15:46
|
(34) Мне один парень здешний то же самое толкует. Надо макрос писать на vb, а потом в 1С его вставлять.
|
|||
37
Serginio1
11.08.11
✎
17:06
|
(31) Можно смотри v8: Доступ к WEB-сервису из 1С 8.2 через https
|
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |