Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Delphi [игнор отключен] [закрыт для гостей] / Импорт WSDL / 4 сообщений из 4, страница 1 из 1
11.12.2018, 21:02
    #39746278
_Vasilisk_
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Импорт WSDL
Есть сторонний Web-сервис к которому нужно подключиться. Он публикует такую wsdl схему
Код: xml
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.
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="Measurements" targetNamespace="http://myuri.com/"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://myuri.com/"
  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
  xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
  xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
  xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
  xmlns:i0="http://myuri.com/Device"
  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
  xmlns:wsa10="http://www.w3.org/2005/08/addressing"
  xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
    
  <wsdl:import namespace="http://myuri.com/Device" location="devices.xsd"/>
  <wsdl:types/>
  <wsdl:binding name="BasicHttpBinding" type="i0:IMeasurements">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Register">
      <soap:operation
        soapAction="http://myuri.com/Device/IMeasurements/Register"
        style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  
  <wsdl:service name="Measurements">
    <wsdl:port name="BasicHttpBinding" binding="tns:BasicHttpBinding">
      <soap:address location="http://localhost/Device/Measurements/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Она корректна? При ее импорте импортируются только типы из devices.xsd а сам сервис игнорится.

Если убрать тег
Код: xml
1.
<wsdl:import namespace="http://myuri.com/Device" location="devices.xsd"/>

то при импорте получаю вообще пустой файл
Код: pascal
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : webservice-WSDL.xml
// Encoding : utf-8
// Version  : 1.0
// (11.12.2018 19:58:20 - - $Rev: 93209 $)
// ************************************************************************ //

unit webservice_WSDL;

interface

uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;

{ No supported Bindings found in document }

implementation
  uses System.SysUtils;

initialization

end.



С уважением, Vasilisk
...
Рейтинг: 0 / 0
11.12.2018, 23:24
    #39746329
X-Cite
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Импорт WSDL
А где?
Код: html
1.
<wsdl:portType name="IMeasurements">


И соответственно
Код: html
1.
<wsdl:message name="xxx">


из wsdl:portType
...
Рейтинг: 0 / 0
12.12.2018, 16:13
    #39746778
_Vasilisk_
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Импорт WSDL
X-CiteА где?Все, что есть.

Таки битая схема
...
Рейтинг: 0 / 0
12.12.2018, 16:55
    #39746807
_Vasilisk_
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Импорт WSDL
Ложная тревога. Проимпортировал по http - все методы появились
...
Рейтинг: 0 / 0
Форумы / Delphi [игнор отключен] [закрыт для гостей] / Импорт WSDL / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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