Перейти к содержанию
Fire Monkey от А до Я
  • 0

WSDL ссылки 1С и разбор ответного XML


Андрей Посметухов

Вопрос

Приветствую всех уважаемые форумчане.

Я на форуме первый раз поэтому решил не гадить где попало и написать в эту ветку.

Подскажите ответ на такой вопрос. Никто не заморачивался с разработкой приложения для работы с 1С WSDL ссылками. На каких компонентах это можно реализовать и с чего начать работу?

В сети описание только под старье какое то вроде Delphi 6 :((

Ссылка на комментарий

Рекомендуемые сообщения

  • 0

У меня реализовано приложение которое обращается к WEB сервису 1С и "вытягивает" нужные мне данные. На самом деле всё просто : Меню Component -> Import WSDL . Далее все просто, думаю разберетесь (если WEB сервис уже поднят). 

Screenshot_1.png

Ссылка на комментарий
  • 0
  • Модераторы
В 29.04.2019 в 12:30, Андрей Посметухов сказал:

Приветствую всех уважаемые форумчане.

Я на форуме первый раз поэтому решил не гадить где попало и написать в эту ветку.

Подскажите ответ на такой вопрос. Никто не заморачивался с разработкой приложения для работы с 1С WSDL ссылками. На каких компонентах это можно реализовать и с чего начать работу?

В сети описание только под старье какое то вроде Delphi 6 :((

Самый простой способ это изначально оттестировать через SoapUI.

Что такое SOAP запрос? это обычный POST запрос, где body это xml, взять который можно в SoapUI.

Это конечно решение в лоб, есть в Делфи спец инструменты, но мне они не нравятся)

Ссылка на комментарий
  • 0
В 30.04.2019 в 20:23, Равиль Зарипов (ZuBy) сказал:

Самый простой способ это изначально оттестировать через SoapUI.

Что такое SOAP запрос? это обычный POST запрос, где body это xml, взять который можно в SoapUI.

Это конечно решение в лоб, есть в Делфи спец инструменты, но мне они не нравятся)

А о каких именно "штатных" инструментах идет речь?

Ссылка на комментарий
  • 0
В 30.04.2019 в 11:50, Сергей Сенин (COS-MIC) сказал:

У меня реализовано приложение которое обращается к WEB сервису 1С и "вытягивает" нужные мне данные. На самом деле всё просто : Меню Component -> Import WSDL . Далее все просто, думаю разберетесь (если WEB сервис уже поднят). 

Screenshot_1.png

Вы не могли бы мне дать кусок кода где у вас реализовано в взаимодействие.

Ссылка на комментарий
  • 0
В 08.05.2019 в 13:04, Андрей Посметухов сказал:

Вы не могли бы мне дать кусок кода где у вас реализовано в взаимодействие.

Создаётся такого рода файл: 

Спойлер

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl
//  >Import : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl>0
// Encoding : UTF-8
// Version  : 1.0
// (13.02.2019 12:16:33 - - $Rev: 90173 $)
// ************************************************************************ //

unit obmen;

interface

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

const
  IS_REF  = $0080;


type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]

  // ************************************************************************ //
  // Namespace : 192.168.2.15/Anka
  // soapAction: 192.168.2.15/Anka#Nomen:%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // use       : literal
  // binding   : NomenSoapBinding
  // service   : Nomen
  // port      : NomenSoap
  // URL       : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws
  // ************************************************************************ //
  NomenPortType = interface(IInvokable)
  ['{35717267-0572-1159-0BCA-74CD27EE3C69}']
    function  Ostatki(const KodNomen: string): string; stdcall;
    function  NameAgent(const NameNomen: string; const Zvet: string; const Artikul: string): string; stdcall;
    function  NameKatalogAgent(const KodNomen: string): string; stdcall;
    function  NameKatalogSalon(const KodNomen: string): string; stdcall;
    function  NameSalon(const NameNomen: string; const Zvet: string; const Artikul: string): string; stdcall;
    function  Name1(const NameNomen: string): string; stdcall;
    function  Name2(const NameNomen: string): string; stdcall;
    function  Zakaz(const Login: string): string; stdcall;
    function  TranspKompani(const Login: string): string; stdcall;
    function  Tovary(const Nomzak: string): string; stdcall;
    function  Zakazinfo(const Nomzak: string): string; stdcall;
    function  InfoNom(const Kodnom: string): string; stdcall;
    function  OstatkiAndroid(const KodNomen: string): string; stdcall;
    function  ZakTransp(const NomerTTN: string; const TranspKomp: string; const KodKontr: string): string; stdcall;
    function  Name3(const NameNomen: string): string; stdcall;
    function  OstatkiSklad(const KodNomen: string): string; stdcall;
    function  OstatkiSkladSer(const KodNomen: string; const KodSklad: string): string; stdcall;
    function  Klient1(const DateKlient: string): string; stdcall;
    function  Klient2(const DateKlient: string): string; stdcall;
    function  Reklamaziy(const DateRekl: string): string; stdcall;
    function  OstatkiAndroidSalon(const KodNomen: string): string; stdcall;
    function  Version(const Ver: string): string; stdcall;
    function  ChekLogPass(const Login: string; const Password: string): string; stdcall;
    function  Zakaz1(const Login: string): string; stdcall;
    function  PoiskKontragent(const NameKontr: string): string; stdcall;
    function  ZakazKontragent(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
    function  TovaryZakazData(const Nomzak: string; const DataZak: string): string; stdcall;
    function  ZakazSoglasov(const DataZak: string; const NomZak: string): string; stdcall;
    function  ZakazKorzina(const KlientData: string; const ZakazDate: string): string; stdcall;
    function  SalesReport(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
    function  SalesReportSumma(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
  end;

function GetNomenPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil; AdrDomen: string = 'droid.anka.com.ru'): NomenPortType;


implementation
  uses System.SysUtils;

function GetNomenPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO; AdrDomen: string): NomenPortType;
const
//  defWSDL = 'http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl';
//  defURL  = 'http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws';
  defSvc  = 'Nomen';
  defPrt  = 'NomenSoap';
var
  RIO: THTTPRIO;
  Username, Password: string;
  defWSDL: string;
  defURL: string;
begin

    defWSDL := 'http://' + AdrDomen + ':8080/Anka/WS/obmen.1cws?wsdl';
    defURL  := 'http://' + AdrDomen + ':8080/Anka/WS/obmen.1cws';


   Username:='user';
   PassWord:='12345';
  //-
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    Begin
    RIO := THTTPRIO.Create(nil);
        //  Присваиваем пользователя и пароль на подключение к WSDL
    RIO.HTTPWebNode.UserName := Username;
    RIO.HTTPWebNode.Password := PassWord;
    End
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as NomenPortType);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;

initialization
  { NomenPortType }
  InvRegistry.RegisterInterface(TypeInfo(NomenPortType), '192.168.2.15/Anka', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(NomenPortType), '192.168.2.15/Anka#Nomen:%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(NomenPortType), ioDocument);
  { NomenPortType.Ostatki }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Ostatki', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameAgent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameAgent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameKatalogAgent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameKatalogAgent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameKatalogSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameKatalogSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name2', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakaz }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakaz', '',
                                 '[ReturnName="return"]');
  { NomenPortType.TranspKompani }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'TranspKompani', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Tovary }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Tovary', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakazinfo }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakazinfo', '',
                                 '[ReturnName="return"]');
  { NomenPortType.InfoNom }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'InfoNom', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiAndroid }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiAndroid', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakTransp }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakTransp', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name3 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name3', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiSklad }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiSklad', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiSkladSer }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiSkladSer', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Klient1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Klient1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Klient2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Klient2', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Reklamaziy }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Reklamaziy', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiAndroidSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiAndroidSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Version }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Version', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ChekLogPass }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ChekLogPass', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakaz1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakaz1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.PoiskKontragent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'PoiskKontragent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazKontragent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazKontragent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.TovaryZakazData }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'TovaryZakazData', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazSoglasov }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazSoglasov', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazKorzina }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazKorzina', '',
                                 '[ReturnName="return"]');
  { NomenPortType.SalesReport }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'SalesReport', '',
                                 '[ReturnName="return"]');
  { NomenPortType.SalesReportSumma }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'SalesReportSumma', '',
                                 '[ReturnName="return"]');

end.

 

Ссылка на комментарий
  • 0
В 11.05.2019 в 15:30, Сергей Сенин (COS-MIC) сказал:

Создаётся такого рода файл: 

  Показать контент

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl
//  >Import : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl>0
// Encoding : UTF-8
// Version  : 1.0
// (13.02.2019 12:16:33 - - $Rev: 90173 $)
// ************************************************************************ //

unit obmen;

interface

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

const
  IS_REF  = $0080;


type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]

  // ************************************************************************ //
  // Namespace : 192.168.2.15/Anka
  // soapAction: 192.168.2.15/Anka#Nomen:%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // use       : literal
  // binding   : NomenSoapBinding
  // service   : Nomen
  // port      : NomenSoap
  // URL       : http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws
  // ************************************************************************ //
  NomenPortType = interface(IInvokable)
  ['{35717267-0572-1159-0BCA-74CD27EE3C69}']
    function  Ostatki(const KodNomen: string): string; stdcall;
    function  NameAgent(const NameNomen: string; const Zvet: string; const Artikul: string): string; stdcall;
    function  NameKatalogAgent(const KodNomen: string): string; stdcall;
    function  NameKatalogSalon(const KodNomen: string): string; stdcall;
    function  NameSalon(const NameNomen: string; const Zvet: string; const Artikul: string): string; stdcall;
    function  Name1(const NameNomen: string): string; stdcall;
    function  Name2(const NameNomen: string): string; stdcall;
    function  Zakaz(const Login: string): string; stdcall;
    function  TranspKompani(const Login: string): string; stdcall;
    function  Tovary(const Nomzak: string): string; stdcall;
    function  Zakazinfo(const Nomzak: string): string; stdcall;
    function  InfoNom(const Kodnom: string): string; stdcall;
    function  OstatkiAndroid(const KodNomen: string): string; stdcall;
    function  ZakTransp(const NomerTTN: string; const TranspKomp: string; const KodKontr: string): string; stdcall;
    function  Name3(const NameNomen: string): string; stdcall;
    function  OstatkiSklad(const KodNomen: string): string; stdcall;
    function  OstatkiSkladSer(const KodNomen: string; const KodSklad: string): string; stdcall;
    function  Klient1(const DateKlient: string): string; stdcall;
    function  Klient2(const DateKlient: string): string; stdcall;
    function  Reklamaziy(const DateRekl: string): string; stdcall;
    function  OstatkiAndroidSalon(const KodNomen: string): string; stdcall;
    function  Version(const Ver: string): string; stdcall;
    function  ChekLogPass(const Login: string; const Password: string): string; stdcall;
    function  Zakaz1(const Login: string): string; stdcall;
    function  PoiskKontragent(const NameKontr: string): string; stdcall;
    function  ZakazKontragent(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
    function  TovaryZakazData(const Nomzak: string; const DataZak: string): string; stdcall;
    function  ZakazSoglasov(const DataZak: string; const NomZak: string): string; stdcall;
    function  ZakazKorzina(const KlientData: string; const ZakazDate: string): string; stdcall;
    function  SalesReport(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
    function  SalesReportSumma(const KodKontr: string; const StartDate: string; const ExpDate: string): string; stdcall;
  end;

function GetNomenPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil; AdrDomen: string = 'droid.anka.com.ru'): NomenPortType;


implementation
  uses System.SysUtils;

function GetNomenPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO; AdrDomen: string): NomenPortType;
const
//  defWSDL = 'http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws?wsdl';
//  defURL  = 'http://droid.anka.com.ru:8080/Anka/WS/obmen.1cws';
  defSvc  = 'Nomen';
  defPrt  = 'NomenSoap';
var
  RIO: THTTPRIO;
  Username, Password: string;
  defWSDL: string;
  defURL: string;
begin

    defWSDL := 'http://' + AdrDomen + ':8080/Anka/WS/obmen.1cws?wsdl';
    defURL  := 'http://' + AdrDomen + ':8080/Anka/WS/obmen.1cws';


   Username:='user';
   PassWord:='12345';
  //-
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    Begin
    RIO := THTTPRIO.Create(nil);
        //  Присваиваем пользователя и пароль на подключение к WSDL
    RIO.HTTPWebNode.UserName := Username;
    RIO.HTTPWebNode.Password := PassWord;
    End
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as NomenPortType);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;

initialization
  { NomenPortType }
  InvRegistry.RegisterInterface(TypeInfo(NomenPortType), '192.168.2.15/Anka', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(NomenPortType), '192.168.2.15/Anka#Nomen:%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(NomenPortType), ioDocument);
  { NomenPortType.Ostatki }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Ostatki', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameAgent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameAgent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameKatalogAgent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameKatalogAgent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameKatalogSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameKatalogSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.NameSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'NameSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name2', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakaz }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakaz', '',
                                 '[ReturnName="return"]');
  { NomenPortType.TranspKompani }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'TranspKompani', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Tovary }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Tovary', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakazinfo }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakazinfo', '',
                                 '[ReturnName="return"]');
  { NomenPortType.InfoNom }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'InfoNom', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiAndroid }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiAndroid', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakTransp }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakTransp', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Name3 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Name3', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiSklad }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiSklad', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiSkladSer }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiSkladSer', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Klient1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Klient1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Klient2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Klient2', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Reklamaziy }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Reklamaziy', '',
                                 '[ReturnName="return"]');
  { NomenPortType.OstatkiAndroidSalon }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'OstatkiAndroidSalon', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Version }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Version', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ChekLogPass }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ChekLogPass', '',
                                 '[ReturnName="return"]');
  { NomenPortType.Zakaz1 }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'Zakaz1', '',
                                 '[ReturnName="return"]');
  { NomenPortType.PoiskKontragent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'PoiskKontragent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazKontragent }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazKontragent', '',
                                 '[ReturnName="return"]');
  { NomenPortType.TovaryZakazData }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'TovaryZakazData', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazSoglasov }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazSoglasov', '',
                                 '[ReturnName="return"]');
  { NomenPortType.ZakazKorzina }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'ZakazKorzina', '',
                                 '[ReturnName="return"]');
  { NomenPortType.SalesReport }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'SalesReport', '',
                                 '[ReturnName="return"]');
  { NomenPortType.SalesReportSumma }
  InvRegistry.RegisterMethodInfo(TypeInfo(NomenPortType), 'SalesReportSumma', '',
                                 '[ReturnName="return"]');

end.

 

Это у меня получилось без особых проблем. Не могу понять как с ним взаимодействовать далее.

Функции перечисленные выше вы поднимали на стороне клиента 1С?

Ссылка на комментарий
  • 0
1 час назад, Андрей Посметухов сказал:

Это у меня получилось без особых проблем. Не могу понять как с ним взаимодействовать далее.

Функции перечисленные выше вы поднимали на стороне клиента 1С?

Естественно, функции должны быть в 1С. Логика простая - в Delphi вызываете функцию 1С, Сервер 1С даёт Вам ответ.

 

Screenshot_2.png

Ссылка на комментарий
  • 0
1 час назад, Сергей Сенин (COS-MIC) сказал:

Естественно, функции должны быть в 1С. Логика простая - в Delphi вызываете функцию 1С, Сервер 1С даёт Вам ответ.

 

Screenshot_2.png

Я понимаю что я сейчас "обнаглел" но не могли бы вы мне дать еще кусок где вы вызываете любую из функций описанных выше и "разбираете" ответ.

Спасибо!

Ссылка на комментарий
  • 1
18 часов назад, Андрей Посметухов сказал:

Я понимаю что я сейчас "обнаглел" но не могли бы вы мне дать еще кусок где вы вызываете любую из функций описанных выше и "разбираете" ответ.

Спасибо!

Ну так примерно

var
  Fulltext: string;
  WS: NomenPortType;

Begin 

    WS := GetNomenPortType (False, '', nil, Domen);
    Fulltext := WS.InfoNom(KodVxod); // В переменную Fulltext присваивается ответ от сервера 1С. InfoNom - функция в 1С.

End;

 

 

Ссылка на комментарий

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить на вопрос...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

  • Последние посетители   0 пользователей онлайн

    • Ни одного зарегистрированного пользователя не просматривает данную страницу
×
×
  • Создать...