Jump to content
ertank

SOAP response cannot be read

Recommended Posts

Hello,

 

There is that WSDL here: http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx?WSDL

 

I need to read data from method named "GetRestaurantList" actually that is my starting method. I hopefully will need to use other methods later.

 

I do not get exception on user level. But there is below error in Delphi while in debug run.

First chance exception at $767DC762. Exception class ESOAPDomConvertError with message 'Conversion from class TList<System.IInterface> to SOAP is not supported - SOAP classes must derive from TRemotable'. Process YemekSepeti_WebServis.exe (9024)

 

Here is the raw response from server:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <GetRestaurantListResponse xmlns="http://tempuri.org/">
         <GetRestaurantListResult>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="RestaurantList">
               <xs:element name="RestaurantList" msdata:IsDataSet="true" msdata:Locale="">
                  <xs:complexType>
                     <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="Restaurants">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element name="CatalogName" type="xs:string" minOccurs="0" />
                                 <xs:element name="CategoryName" type="xs:string" minOccurs="0" />
                                 <xs:element name="DisplayName" type="xs:string" minOccurs="0" />
                                 <xs:element name="ServiceTime" type="xs:int" minOccurs="0" />
                                 <xs:element name="Speed" type="xs:decimal" minOccurs="0" />
                                 <xs:element name="Serving" type="xs:decimal" minOccurs="0" />
                                 <xs:element name="Flavour" type="xs:decimal" minOccurs="0" />
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:choice>
                  </xs:complexType>
               </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
               <RestaurantList xmlns="">
                  <Restaurants diffgr:id="Restaurants1" msdata:rowOrder="0">
                     <CatalogName>testname</CatalogName>
                     <CategoryName>4f1cc1a8-bf2e-4eab-8dd5-34f37857911a</CategoryName>
                     <DisplayName>Pizza, Test</DisplayName>
                     <ServiceTime>45</ServiceTime>
                  </Restaurants>
               </RestaurantList>
            </diffgr:diffgram>
         </GetRestaurantListResult>
      </GetRestaurantListResponse>
   </soap:Body>
</soap:Envelope>

 

Honestly, this is the first time I am reading such a response myself.

 

Is there any way that I can consume that web service?

 

Any help is appreciated.

 

Thanks & regards,

Ertan

Share this post


Link to post

The exception is clear: 

 SOAP classes must derive from TRemotable

If you write SOAP code with using DELPHI, you must know, in SOAP interface methods, if the data type is a object, it must derive from TRemotable. If it is a TComponent, it can not using in SOAP method. Here I mean is that you design a SOAP server.

 

If there is a running SOAP server, you can using  "Component/import WSDL" menu in Delphi IDE menu, and Delphi will create some SOAP client code for you.

Share this post


Link to post
3 hours ago, pcplayer99 said:

If you write SOAP code with using DELPHI, you must know, in SOAP interface methods, if the data type is a object, it must derive from TRemotable. If it is a TComponent, it can not using in SOAP method. Here I mean is that you design a SOAP server.

I am not designing SOAP server side. It is a production server running for years. Very much likely that it is designed using Microsoft tools. I am to consume it using Delphi.

3 hours ago, pcplayer99 said:

If there is a running SOAP server, you can using  "Component/import WSDL" menu in Delphi IDE menu, and Delphi will create some SOAP client code for you.

I already did that. Using generated web service file, I am doing below request.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header>
      <NS1:AuthHeader xmlns:NS1="http://tempuri.org/">
         <UserName xmlns="http://tempuri.org/">myuser</UserName>
         <Password xmlns="http://tempuri.org/">mypassword</Password>
      </NS1:AuthHeader>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <GetRestaurantList xmlns="http://tempuri.org/" />
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response I get is already shared in my initial post. Web service consuming is not open to public. It has IP restrictions and so it will not help even if I share my login credentials to anybody for doing some tests.

 

Problem as to my understanding is that, Delphi cannot parse response from server. I cannot suppress raised exception and such an exception stops me doing anything like trying to manually parse the raw XML as I always get a dialog displayed on the screen.

 

That application I need to run headless and do web server requests in intervals automatically. An error message with a dialog stops me doing so.

Share this post


Link to post
Guest

When I import the WSDL then I get this code (the full code is at the end of this post)

  // ************************************************************************ //
  // XML       : GetRestaurantListResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetRestaurantListResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;

  IntegrationSoap = interface(IInvokable)
  ['{E74C1297-70FB-73D3-1D22-8D62F86569F6}']
    [...]

    // Header: AuthHeader:pIn
    function  GetRestaurantList: GetRestaurantListResult; stdcall;

    [...]
  end;

As you can see, the result type only contains the schema property and no collection.

 

When I import the WSDL into Visual Studio project I get this

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(WrapperName="GetRestaurantListResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
    public partial class GetRestaurantListResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
        public System.Data.DataSet GetRestaurantListResult;
        
        public GetRestaurantListResponse() {
        }
        
        public GetRestaurantListResponse(System.Data.DataSet GetRestaurantListResult) {
            this.GetRestaurantListResult = GetRestaurantListResult;
        }
    }

Now we can see the reason: The WSDL returns a DataSet and the Delphi WSDL importer did not know how to handle that.

 

Full code of the Delphi WSDL importer:

// ************************************************************************ //
// Die in dieser Datei deklarierten Typen wurden aus Daten der unten
// beschriebenen WSDL-Datei generiert:

// WSDL     : http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx?WSDL
//  >Import : http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx?WSDL>0
// Codierung : utf-8
// Codegen  : [wfCreateArrayElemTypeAlias+]
// Version: 1.0
// (30.07.2019 07:54:45 - - $Rev: 93209 $)
// ************************************************************************ //

unit integration;

interface

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

const
  IS_OPTN = $0001;
  IS_NLBL = $0004;
  IS_REF  = $0080;


type

  // ************************************************************************ //
  // Die folgenden Typen, auf die im WSDL-Dokument Bezug genommen wird, sind in dieser Datei
  // nicht repräsentiert. Sie sind entweder Aliase[@] anderer repräsentierter Typen oder auf sie wurde Bezug genommen,
  // aber sie sind in diesem Dokument nicht[!] deklariert. Die Typen aus letzterer Kategorie
  // sind in der Regel vordefinierten/bekannten XML- oder Embarcadero-Typen zugeordnet; sie könnten aber auf 
  // ein inkorrektes WSDL-Dokument hinweisen, das einen Schematyp nicht deklariert oder importiert hat.
  // ************************************************************************ //
  // !:boolean         - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:schema          - "http://www.w3.org/2001/XMLSchema"[GblElm]
  // !:decimal         - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:dateTime        - "http://www.w3.org/2001/XMLSchema"[Gbl]

  RestaurantStatusEntity = class;               { "http://tempuri.org/"[GblCplx] }
  AuthHeader2          = class;                 { "http://tempuri.org/"[Hdr][GblCplx] }
  GetRestaurantDeliveryAreasResult = class;     { "http://tempuri.org/"[Cplx] }
  GetPaymentTypesResult = class;                { "http://tempuri.org/"[Cplx] }
  GetRestaurantListResult = class;              { "http://tempuri.org/"[Cplx] }
  GetMenuResult        = class;                 { "http://tempuri.org/"[Cplx] }
  GetRestaurantPointsAndCommentsResult = class;   { "http://tempuri.org/"[Cplx] }
  AuthHeader           = class;                 { "http://tempuri.org/"[Hdr][GblElm] }
  GetRestaurantPromotionsResult = class;        { "http://tempuri.org/"[Cplx] }

  {$SCOPEDENUMS ON}
  { "http://tempuri.org/"[GblSmpl] }
  PrepareTimes = (Minutes_15, Minutes_20, Minutes_25);

  { "http://tempuri.org/"[GblSmpl] }
  RestaurantStates = (Open, Closed, HugeDemand);

  { "http://tempuri.org/"[GblSmpl] }
  OrderStates = (Accepted, Rejected, Cancelled, OnDelivery, Delivered, TechnicalRejected);

  {$SCOPEDENUMS OFF}



  // ************************************************************************ //
  // XML       : RestaurantStatusEntity, global, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  RestaurantStatusEntity = class(TRemotable)
  private
    FRestaurantName: string;
    FRestaurantName_Specified: boolean;
    FStatusName: string;
    FStatusName_Specified: boolean;
    FStatusDescription: string;
    FStatusDescription_Specified: boolean;
    FCanBeOpenedByRestaurant: Boolean;
    procedure SetRestaurantName(Index: Integer; const Astring: string);
    function  RestaurantName_Specified(Index: Integer): boolean;
    procedure SetStatusName(Index: Integer; const Astring: string);
    function  StatusName_Specified(Index: Integer): boolean;
    procedure SetStatusDescription(Index: Integer; const Astring: string);
    function  StatusDescription_Specified(Index: Integer): boolean;
  published
    property RestaurantName:          string   Index (IS_OPTN) read FRestaurantName write SetRestaurantName stored RestaurantName_Specified;
    property StatusName:              string   Index (IS_OPTN) read FStatusName write SetStatusName stored StatusName_Specified;
    property StatusDescription:       string   Index (IS_OPTN) read FStatusDescription write SetStatusDescription stored StatusDescription_Specified;
    property CanBeOpenedByRestaurant: Boolean  read FCanBeOpenedByRestaurant write FCanBeOpenedByRestaurant;
  end;



  // ************************************************************************ //
  // XML       : AuthHeader, global, <complexType>
  // Namespace : http://tempuri.org/
  // Info      : Header
  // ************************************************************************ //
  AuthHeader2 = class(TSOAPHeader)
  private
    FUserName: string;
    FUserName_Specified: boolean;
    FPassword: string;
    FPassword_Specified: boolean;
    procedure SetUserName(Index: Integer; const Astring: string);
    function  UserName_Specified(Index: Integer): boolean;
    procedure SetPassword(Index: Integer; const Astring: string);
    function  Password_Specified(Index: Integer): boolean;
  published
    property UserName: string  Index (IS_OPTN) read FUserName write SetUserName stored UserName_Specified;
    property Password: string  Index (IS_OPTN) read FPassword write SetPassword stored Password_Specified;
  end;



  // ************************************************************************ //
  // XML       : GetRestaurantDeliveryAreasResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetRestaurantDeliveryAreasResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;



  // ************************************************************************ //
  // XML       : GetPaymentTypesResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetPaymentTypesResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;



  // ************************************************************************ //
  // XML       : GetRestaurantListResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetRestaurantListResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;



  // ************************************************************************ //
  // XML       : GetMenuResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetMenuResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;



  // ************************************************************************ //
  // XML       : GetRestaurantPointsAndCommentsResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetRestaurantPointsAndCommentsResult = class(TRemotable)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : AuthHeader, global, <element>
  // Namespace : http://tempuri.org/
  // Info      : Header
  // ************************************************************************ //
  AuthHeader = class(AuthHeader2)
  private
  published
  end;



  // ************************************************************************ //
  // XML       : GetRestaurantPromotionsResult, <complexType>
  // Namespace : http://tempuri.org/
  // ************************************************************************ //
  GetRestaurantPromotionsResult = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;


  // ************************************************************************ //
  // Namespace : http://tempuri.org/
  // soapAction: http://tempuri.org/%operationName%
  // Transport : http://schemas.xmlsoap.org/soap/http
  // Stil     : document
  // Verwenden von       : literal
  // Bindung   : IntegrationSoap
  // Service   : Integration
  // Port      : IntegrationSoap
  // URL       : http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx
  // ************************************************************************ //
  IntegrationSoap = interface(IInvokable)
  ['{E74C1297-70FB-73D3-1D22-8D62F86569F6}']

    // Header: AuthHeader:pIn
    function  GetMessage: string; stdcall;

    // Header: AuthHeader:pIn
    function  GetMessageV2: string; stdcall;

    // Header: AuthHeader:pIn
    function  GetAllMessages: string; stdcall;

    // Header: AuthHeader:pIn
    function  GetAllMessagesV2: string; stdcall;

    // Header: AuthHeader:pIn
    function  GetTopMessages(const count: Integer): string; stdcall;

    // Header: AuthHeader:pIn
    function  GetTopMessagesV2(const count: Integer): string; stdcall;

    // Header: AuthHeader:pIn
    procedure MessageSuccessful(const messageId: Integer); stdcall;

    // Header: AuthHeader:pIn
    function  UpdateOrder(const orderId: TXSDecimal; const orderState: OrderStates; const reason: string): string; stdcall;

    // Header: AuthHeader:pIn
    function  UpdateValeOrder(const orderId: TXSDecimal; const orderState: OrderStates; const prepareTime: PrepareTimes; const reason: string): string; stdcall;

    // Header: AuthHeader:pIn
    function  SetRestaurantForOrder(const orderId: TXSDecimal; const categoryName: string): Boolean; stdcall;

    // Header: AuthHeader:pIn
    function  GetRestaurantList: GetRestaurantListResult; stdcall;

    // Header: AuthHeader:pIn
    function  UpdateRestaurantState(const catalogName: string; const categoryName: string; const restaurantState: RestaurantStates): string; stdcall;

    // Header: AuthHeader:pIn
    function  IsRestaurantOpen(const catalogName: string; const categoryName: string): Boolean; stdcall;

    // Header: AuthHeader:pIn
    function  GetRestaurantStatus(const catalogName: string; const categoryName: string): RestaurantStatusEntity; stdcall;

    // Header: AuthHeader:pIn
    function  SetRestaurantServiceTime(const catalogName: string; const categoryName: string; const serviceTime: Integer): Boolean; stdcall;

    // Header: AuthHeader:pIn
    function  GetMenu: GetMenuResult; stdcall;

    // Header: AuthHeader:pIn
    function  GetRestaurantPromotions: GetRestaurantPromotionsResult; stdcall;

    // Header: AuthHeader:pIn
    function  GetRestaurantPointsAndComments(const catalogName: string; const categoryName: string; const startDate: TXSDateTime; const endDate: TXSDateTime): GetRestaurantPointsAndCommentsResult; stdcall;

    // Header: AuthHeader:pIn
    function  GetPaymentTypes: GetPaymentTypesResult; stdcall;

    // Header: AuthHeader:pIn
    function  GetRestaurantDeliveryAreas(const catalogName: string; const categoryName: string): GetRestaurantDeliveryAreasResult; stdcall;

    // Header: AuthHeader:pIn
    function  UpdateRestaurantDeliveryAreaState(const catalogName: string; const categoryName: string; const areaId: string; const isOpen: Boolean): Boolean; stdcall;
    function  GetRestaurantOrderString(const eadres: string; const trackingNo: string; const password: string): string; stdcall;
  end;

function GetIntegrationSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): IntegrationSoap;


implementation
  uses System.SysUtils;

function GetIntegrationSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IntegrationSoap;
const
  defWSDL = 'http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx?WSDL';
  defURL  = 'http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx';
  defSvc  = 'Integration';
  defPrt  = 'IntegrationSoap';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as IntegrationSoap);
    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;


procedure RestaurantStatusEntity.SetRestaurantName(Index: Integer; const Astring: string);
begin
  FRestaurantName := Astring;
  FRestaurantName_Specified := True;
end;

function RestaurantStatusEntity.RestaurantName_Specified(Index: Integer): boolean;
begin
  Result := FRestaurantName_Specified;
end;

procedure RestaurantStatusEntity.SetStatusName(Index: Integer; const Astring: string);
begin
  FStatusName := Astring;
  FStatusName_Specified := True;
end;

function RestaurantStatusEntity.StatusName_Specified(Index: Integer): boolean;
begin
  Result := FStatusName_Specified;
end;

procedure RestaurantStatusEntity.SetStatusDescription(Index: Integer; const Astring: string);
begin
  FStatusDescription := Astring;
  FStatusDescription_Specified := True;
end;

function RestaurantStatusEntity.StatusDescription_Specified(Index: Integer): boolean;
begin
  Result := FStatusDescription_Specified;
end;

procedure AuthHeader2.SetUserName(Index: Integer; const Astring: string);
begin
  FUserName := Astring;
  FUserName_Specified := True;
end;

function AuthHeader2.UserName_Specified(Index: Integer): boolean;
begin
  Result := FUserName_Specified;
end;

procedure AuthHeader2.SetPassword(Index: Integer; const Astring: string);
begin
  FPassword := Astring;
  FPassword_Specified := True;
end;

function AuthHeader2.Password_Specified(Index: Integer): boolean;
begin
  Result := FPassword_Specified;
end;

destructor GetRestaurantDeliveryAreasResult.Destroy;
begin
  System.SysUtils.FreeAndNil(Fschema);
  inherited Destroy;
end;

destructor GetPaymentTypesResult.Destroy;
begin
  System.SysUtils.FreeAndNil(Fschema);
  inherited Destroy;
end;

destructor GetRestaurantListResult.Destroy;
begin
  System.SysUtils.FreeAndNil(Fschema);
  inherited Destroy;
end;

destructor GetMenuResult.Destroy;
begin
  System.SysUtils.FreeAndNil(Fschema);
  inherited Destroy;
end;

destructor GetRestaurantPromotionsResult.Destroy;
begin
  System.SysUtils.FreeAndNil(Fschema);
  inherited Destroy;
end;

initialization
  { IntegrationSoap }
  InvRegistry.RegisterInterface(TypeInfo(IntegrationSoap), 'http://tempuri.org/', 'utf-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IntegrationSoap), 'http://tempuri.org/%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(IntegrationSoap), ioDocument);
  { IntegrationSoap.GetMessage }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetMessage', '',
                                 '[ReturnName="GetMessageResult"]', IS_OPTN);
  InvRegistry.RegisterHeaderClass(TypeInfo(IntegrationSoap), AuthHeader, 'AuthHeader', 'http://tempuri.org/');
  { IntegrationSoap.GetMessageV2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetMessageV2', '',
                                 '[ReturnName="GetMessageV2Result"]', IS_OPTN);
  { IntegrationSoap.GetAllMessages }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetAllMessages', '',
                                 '[ReturnName="GetAllMessagesResult"]', IS_OPTN);
  { IntegrationSoap.GetAllMessagesV2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetAllMessagesV2', '',
                                 '[ReturnName="GetAllMessagesV2Result"]', IS_OPTN);
  { IntegrationSoap.GetTopMessages }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetTopMessages', '',
                                 '[ReturnName="GetTopMessagesResult"]', IS_OPTN);
  { IntegrationSoap.GetTopMessagesV2 }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetTopMessagesV2', '',
                                 '[ReturnName="GetTopMessagesV2Result"]', IS_OPTN);
  { IntegrationSoap.UpdateOrder }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'UpdateOrder', '',
                                 '[ReturnName="UpdateOrderResult"]', IS_OPTN);
  { IntegrationSoap.UpdateValeOrder }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'UpdateValeOrder', '',
                                 '[ReturnName="UpdateValeOrderResult"]', IS_OPTN);
  InvRegistry.RegisterParamInfo(TypeInfo(IntegrationSoap), 'UpdateValeOrder', 'prepareTime', '',
                                '', IS_NLBL);
  { IntegrationSoap.SetRestaurantForOrder }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'SetRestaurantForOrder', '',
                                 '[ReturnName="SetRestaurantForOrderResult"]');
  { IntegrationSoap.GetRestaurantList }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantList', '',
                                 '[ReturnName="GetRestaurantListResult"]', IS_OPTN);
  { IntegrationSoap.UpdateRestaurantState }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'UpdateRestaurantState', '',
                                 '[ReturnName="UpdateRestaurantStateResult"]', IS_OPTN);
  { IntegrationSoap.IsRestaurantOpen }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'IsRestaurantOpen', '',
                                 '[ReturnName="IsRestaurantOpenResult"]');
  { IntegrationSoap.GetRestaurantStatus }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantStatus', '',
                                 '[ReturnName="GetRestaurantStatusResult"]', IS_OPTN);
  { IntegrationSoap.SetRestaurantServiceTime }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'SetRestaurantServiceTime', '',
                                 '[ReturnName="SetRestaurantServiceTimeResult"]');
  { IntegrationSoap.GetMenu }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetMenu', '',
                                 '[ReturnName="GetMenuResult"]', IS_OPTN);
  { IntegrationSoap.GetRestaurantPromotions }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantPromotions', '',
                                 '[ReturnName="GetRestaurantPromotionsResult"]', IS_OPTN);
  { IntegrationSoap.GetRestaurantPointsAndComments }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantPointsAndComments', '',
                                 '[ReturnName="GetRestaurantPointsAndCommentsResult"]', IS_OPTN);
  { IntegrationSoap.GetPaymentTypes }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetPaymentTypes', '',
                                 '[ReturnName="GetPaymentTypesResult"]', IS_OPTN);
  { IntegrationSoap.GetRestaurantDeliveryAreas }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantDeliveryAreas', '',
                                 '[ReturnName="GetRestaurantDeliveryAreasResult"]', IS_OPTN);
  { IntegrationSoap.UpdateRestaurantDeliveryAreaState }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'UpdateRestaurantDeliveryAreaState', '',
                                 '[ReturnName="UpdateRestaurantDeliveryAreaStateResult"]');
  { IntegrationSoap.GetRestaurantOrderString }
  InvRegistry.RegisterMethodInfo(TypeInfo(IntegrationSoap), 'GetRestaurantOrderString', '',
                                 '[ReturnName="GetRestaurantOrderStringResult"]', IS_OPTN);
  RemClassRegistry.RegisterXSInfo(TypeInfo(PrepareTimes), 'http://tempuri.org/', 'PrepareTimes');
  RemClassRegistry.RegisterXSInfo(TypeInfo(RestaurantStates), 'http://tempuri.org/', 'RestaurantStates');
  RemClassRegistry.RegisterXSInfo(TypeInfo(OrderStates), 'http://tempuri.org/', 'OrderStates');
  RemClassRegistry.RegisterXSClass(RestaurantStatusEntity, 'http://tempuri.org/', 'RestaurantStatusEntity');
  RemClassRegistry.RegisterXSClass(AuthHeader2, 'http://tempuri.org/', 'AuthHeader2', 'AuthHeader');
  RemClassRegistry.RegisterXSClass(GetRestaurantDeliveryAreasResult, 'http://tempuri.org/', 'GetRestaurantDeliveryAreasResult');
  RemClassRegistry.RegisterXSClass(GetPaymentTypesResult, 'http://tempuri.org/', 'GetPaymentTypesResult');
  RemClassRegistry.RegisterXSClass(GetRestaurantListResult, 'http://tempuri.org/', 'GetRestaurantListResult');
  RemClassRegistry.RegisterXSClass(GetMenuResult, 'http://tempuri.org/', 'GetMenuResult');
  RemClassRegistry.RegisterXSClass(GetRestaurantPointsAndCommentsResult, 'http://tempuri.org/', 'GetRestaurantPointsAndCommentsResult');
  RemClassRegistry.RegisterXSClass(AuthHeader, 'http://tempuri.org/', 'AuthHeader');
  RemClassRegistry.RegisterXSClass(GetRestaurantPromotionsResult, 'http://tempuri.org/', 'GetRestaurantPromotionsResult');

end.

 

Share this post


Link to post

Maybe I know what issue it is. The reason is that server side use some .Net Object that Delphi can not handle.

 

for a example:

If I create SOAP server by Delphi, and I will create a client side by delphi, I can output TDataSetProvider from the server and my Delphi client can handle it but C# or Java can not. 

 

Here maybe your server write by C# and it useing some Object just by C# ?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×