Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6322033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:15:23+00:00 2026-05-24T16:15:23+00:00

I have a SOAP application created with delphi. Input comes to server correct. But

  • 0

I have a SOAP application created with delphi.

Input comes to server correct. But output is always empty. r object (response) created, but length(r.notes) always 0. If I do application without arrays, it also works correct. Where is the problem? 3 days of googling and trying different combinatios did not help.

Interface:

////////////// INPUT ///////////////////////
type TClientInformationStructure= class(TRemotable)
  private
    fClientApplicationName:string;
    fClientApplicationPassword:string;
    fRequestIdentifier:string;
    fStartSequenceNumber:integer;
    fNumberOfNotes:integer;
  published
    property ClientApplicationName:string read fClientApplicationName  write fClientApplicationName;   //Name of calling application
    property ClientApplicationPassword:string read fClientApplicationPassword write fClientApplicationPassword;          //Password that calling application must use to call the service
    property RequestIdentifier:string read fRequestIdentifier write fRequestIdentifier;//Transaktionsid from calling system that is stamped in all loggings for service,
                                                                                       //so that later it is easy to compare client and server logs. May be null.
    property StartSequenceNumber:integer read fStartSequenceNumber write fStartSequenceNumber;
    property NumberOfNotes:integer read fNumberOfNotes write fNumberOfNotes;
end;

///////////// OUTPUT ////////////////////////////
Type TNote=class(tremotable)
  private
    fNotetId:string;
    fSequenceNumber:integer;
    fDeleteMark:boolean;
    fAuthorRole:string;
    fAuthorUserName:string;
    fAuthor:string;
    fAcceptTime:tdateTime;
    fOrganizationalUnit:string;
    fLocationStartTime:tdateTime;
    fLocationEndTime:TdateTime;
    fBeadWard:string;
    fPersonCivilRegistrationIdentifier:string;
    fNoteType:string;
    fNoteText:string;
    fMoreNotesAvailable:boolean;
  public
    property NotetId:string read fNotetId  write fNotetId;
    property SequenceNumber:integer read fSequenceNumber write fSequenceNumber;
    property DeleteMark:boolean read fDeleteMark write fDeleteMark;
    property AuthorRole:string read fAuthorRole write fAuthorRole;
    property AuthorUserName:string read fAuthorUserName write fAuthorUserName;
    property Author:string read fAuthor write fAuthor;
    property AcceptTime:tdateTime read fAcceptTime write fAcceptTime;
    property OrganizationalUnit:string read fOrganizationalUnit write fOrganizationalUnit;
    property LocationStartTime:tdateTime read fLocationStartTime write fLocationStartTime;
    property LocationEndTime:TdateTime read fLocationEndTime write fLocationEndTime;
    property BeadWard:string read fBeadWard write fBeadWard;
    property PersonCivilRegistrationIdentifier:string read fPersonCivilRegistrationIdentifier write fPersonCivilRegistrationIdentifier;
    property NoteType:string read fNoteType write fNoteType;
    property NoteText:string read fNoteText write fNoteText;
    property MoreNotesAvailable:boolean read fMoreNotesAvailable write fMoreNotesAvailable;
end;

type TnoteStructure = array of TNote;

type tNoteCollection=class(tremotable)
  private
    fnotes:TnoteStructure;
  public
    property notes:TnoteStructure read fnotes write fnotes;
end;

type
  ibla = interface(IInvokable)
   ['{FFD831EC-56B1-4C0E-9CCE-8D9C7ECEE656}']
    function GetNotes(ClientInformationStructure:TClientInformationStructure)
              : tNoteCollection; stdcall;
  end;

implementation

initialization
  RemClassRegistry.RegisterXSClass(TClientInformationStructure);
  RemClassRegistry.RegisterXSClass(Tnote);
  RemClassRegistry.RegisterXSClass(tNoteCollection);
  RemClassRegistry.RegisterXSInfo(TypeInfo(TnoteStructure));
  InvRegistry.RegisterInterface(TypeInfo(ibla));

finalization
  RemClassRegistry.UnRegisterXSClass(TClientInformationStructure);
  RemClassRegistry.unRegisterXSClass(Tnote);
  RemClassRegistry.unRegisterXSClass(tNoteCollection);
  RemClassRegistry.unRegisterXSInfo(TypeInfo(TnoteStructure));
  InvRegistry.UnRegisterInterface(TypeInfo(ibla));
end.

Implementation:

type
  Tbla = class(TInvokableClass, ibla)
  public
    function GetNotes(ClientInformationStructure:TClientInformationStructure)
              : TNotecollection; stdcall;
  end;

implementation

function Tbla.GetNotes(ClientInformationStructure:TClientInformationStructure)
              : TNotecollection;
var n:tNoteStructure;
begin
  try
    result:=TNotecollection.Create;
    setlength(n,1);
    n[0]:=tnote.create;
    n[0].NotetId:=inttostr(random(100));
    n[0].AuthorUserName:='!1!'+ClientInformationStructure.ClientApplicationName;
    n[0].SequenceNumber:=999;
    result.notes:=copy(n);
  except
    on e:exception do addtolog(e.Message)
  end;
end;

initialization
  InvRegistry.RegisterInvokableClass(Tbla)

finalization
  InvRegistry.unRegisterInvokableClass(Tbla)

Client side:

  c:=tclientinformationstructure.Create;
  try
    c.ClientApplicationName:=labelededit1.Text;
    c.ClientApplicationPassword:=labelededit2.Text;
    c.RequestIdentifier:=labelededit3.Text;
    c.StartSequenceNumber:=strtointdef(labelededit4.Text,0);
    c.NumberOfNotes:=strtointdef(labelededit5.Text,0);
    r:=(HTTPRIO1 as ibla).GetNotes(c);
    if assigned(r) then
      if length(r.notes)>0 then
        if assigned(r.notes[0]) then showmessage(r.notes[0].AuthorUserName);
  finally
    freeandnil(c);
    if assigned (r.notes[0]) then freeandnil(r.notes[0]);
    if assigned(r) then freeandnil(r);
  end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:15:24+00:00Added an answer on May 24, 2026 at 4:15 pm

    Thanks to all.
    All works fine with this code:

    Server

    Interface part:

    interface
    
    const
      IS_OPTN = $0001;
      IS_UNBD = $0002;
    
    type tNoteCollection=class(tremotable)
      private
        fnotes:TnoteStructure;
        procedure Setnotes(Index: Integer; const anotes: TnoteStructure);
      published
        property notes:TnoteStructure index(IS_OPTN or IS_UNBD)  read fnotes write setnotes;
        procedure setlen(count:byte);
        function getlen:integer;
    end;
    
    implementation
    
    procedure tNoteCollection.setlen(count:byte);
    begin
       setlength(fnotes,count);
    end;
    
    function tNoteCollection.getlen:integer;
    begin
       result:=length(fnotes);
    end;
    
    procedure tNoteCollection.Setnotes(Index: Integer; const anotes: TnoteStructure);
    begin
      fnotes:=anotes;
    end;
    

    Implementation part:

    function Tcis2opus.GetNotes(ClientInformationStructure:TClientInformationStructure)
                  : tNoteCollection;
    begin
      try
        result:=tNoteCollection.Create;
        result.setlen(1);
        result.notes[0]:=tnote.create;
        result.notes[0].NotetId:=inttostr(random(100));
        result.notes[0].AuthorUserName:='!1!'+ClientInformationStructure.ClientApplicationName;
        result.notes[0].SequenceNumber:=999;
      except
        on e:exception do addtolog(e.Message)
      end;
    end;
    

    Client

    procedure TForm1.BitBtn1Click(Sender: TObject);
    var c:tclientinformationstructure;
        r:tNoteCollection;
    begin
      c:=tclientinformationstructure.Create;
      try
        c.ClientApplicationName:=labelededit1.Text;
        c.ClientApplicationPassword:=labelededit2.Text;
        c.RequestIdentifier:=labelededit3.Text;
        c.StartSequenceNumber:=strtointdef(labelededit4.Text,0);
        c.NumberOfNotes:=strtointdef(labelededit5.Text,0);
        r:=nil;
        r:=(HTTPRIO1 as iCIS2Opus).GetNotes(c);
          if r.getlen>0 then
            if assigned(r.notes[0]) then showmessage(r.notes[0].AuthorUserName);
      finally
        if assigned(c) then freeandnil(c);
        if assigned(r) then freeandnil(r);
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have built a web application that accepts SOAP messages, does some processing, calls
I have an incoming soap message wich form is TStream (Delphi7), server that send
I have a PHP5 Soap Server running and I'd like to catch type mismatches
I have an application that is using the HTTPUrlConnection to POST soap envelopes to
I have created small application on iOS and have worked on web-services in .Net.
hello is there a way to create soap service with rails3 application. I have
I have created a Silverlight Application project using the Bing Maps Silverlight Control and
I'm trying to create a SOAP Server application that is a stand alone application
We have SOAP web services in production that are relying on SOAP Headers (containing
I have a SOAP client in Ruby that I'm trying to get working with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.