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 7433921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:45:01+00:00 2026-05-29T09:45:01+00:00

Some time ago I’ve been thinking about how to hide from default page of

  • 0

Some time ago I’ve been thinking about how to hide from default page of the web service the IAppServer and IAppServerSOAP interfaces and that appear by default. I know that my Webservice interface, has these interfaces as ancestors, but I believe pointless “see” these interfaces on the default page, as the client programs do not use them directly.

Is there any way to hide these interfaces and just keep our interface and others that were created?

  • 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-29T09:45:02+00:00Added an answer on May 29, 2026 at 9:45 am

    Finally I got it!

    To do so, all I had to do was edit the WebModule2DefaultHandlerAction method, i.e., the OnAction event handler of the DefaultHandler WebActionItem.

    The final event handler looks like this now:

    procedure TWEBMWebService.WebModule2DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
    var
      Conteudo: String;
    begin
      WSHPWebService.ServiceInfo(Sender, Request, Response, Handled);
    
      Conteudo := Response.Content;
      try
        HideInterfaces(Conteudo,['IAppServer','IAppServerSOAP']);
      finally
        Response.Content := Conteudo;
      end;
    end;
    

    The HideInterfaces procedure follows:

    procedure HideInterfaces(var aContent: String; aInterfaces: array of string);
    var
      Intf: String;
      i: Integer;
    begin
      if Length(aInterfaces) = 0 then
        Exit;
    
      with TStringList.Create do
        try
          { Remove todos os enters }
          aContent := StringReplace(aContent,#13#10,' ',[rfreplaceAll]);
    
          { Separa tudo baseando-se nos TR }
          Text := StringReplace(aContent,'<tr>',#13#10'<tr>'#13#10,[rfreplaceAll,rfIgnoreCase]);
          Text := StringReplace(Text,'</tr>',#13#10'</tr>'#13#10,[rfreplaceAll,rfIgnoreCase]);
    
          { Neste ponto, cada linha do StringList contém ou <TR>, ou </TR>, ou o que
          houver entre os dois, então circulamos por cada interface que precisa ser
          ocultada }
          for Intf in aInterfaces do
          begin
            for i := 0 to Pred(Count) do
              if Pos(LowerCase(Intf),LowerCase(Strings[i])) > 0 then
                Break;
    
            { Se achou a interface, oculta a linha inteira de tabela, removendo do
            StringList i, i-1 e i+1 }
            if i < Count then
            begin
              Delete(i+1);
              Delete(i);
              Delete(i-1);
            end;
          end;
    
          aContent := Text;
        finally
          Free;
        end;
    end;
    

    The comments are in Portuguese, sorry, but it’s easy to understand the code. If you like it and use it, please let me know and give me some credits, right 😉

    I would like to thank you all for the valuable answers. Without your help I would never find the solution! Thank You All!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some time ago I wrote a little piece of code to ask about on
Some time ago I created this LAMP based web. At the time I wrote
Some time ago, I stumbled upon an excellent article about taking screenshots of specific
Some time ago i Wrote a service with a timer that make an action
Some time ago I posted a question about what questions should a good javascript
Some time ago I updated my app from Rails 1.2 to 2.3. The upgrade
I've read some time ago about the difference in 'Core JSF' but now I
Some time ago I heard about memory invasions, when some part of software A
Some time ago I asked a question about nested loops on SO and as
Some time ago I managed to get RoR working on Windows XP. I've been

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.