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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:03:38+00:00 2026-05-15T21:03:38+00:00

given a url that references an asmx how would i go about displaying all

  • 0

given a url that references an asmx how would i go about displaying all of their method names?
if assembly=”http://…/something/something.asmx” and i was trying to display the method names of that service what should i do now that i have gotten myself this far? i cant seem to find a solution among the hundreds of examples ive looked at

   public TestReflection(string assembly)
    {
        Assembly testAssembly = Assembly.LoadFrom(assembly);
        Type sType = testAssembly.GetType();

        MethodInfo[] methodInfos = typeof(Object).GetMethods();
        foreach (MethodInfo methodInfo in methodInfos)
        {
            Console.WriteLine(methodInfo.Name);
        }
    }
  • 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-15T21:03:39+00:00Added an answer on May 15, 2026 at 9:03 pm

    so i figured out how to get what i wanted it goes something like this

    [SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
    internal static void LoadWebService(string webServiceAsmxUrl)
    {
        ParseUrl(webServiceAsmxUrl);
        System.Net.WebClient client = new System.Net.WebClient();
        // Connect To the web service
        System.IO.Stream stream = client.OpenRead(webServiceAsmxUrl + "?wsdl");
        // Now read the WSDL file describing a service.
        ServiceDescription description = ServiceDescription.Read(stream);
        ///// LOAD THE DOM /////////
        // Initialize a service description importer.
        ServiceDescriptionImporter importer = new ServiceDescriptionImporter();
        importer.ProtocolName = "Soap12"; // Use SOAP 1.2.
        importer.AddServiceDescription(description, null, null);
        // Generate a proxy client.
        importer.Style = ServiceDescriptionImportStyle.Client;
        // Generate properties to represent primitive values.
        importer.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties;
        // Initialize a Code-DOM tree into which we will import the service.
        CodeNamespace nmspace = new CodeNamespace();
        CodeCompileUnit unit1 = new CodeCompileUnit();
        unit1.Namespaces.Add(nmspace);
        // Import the service into the Code-DOM tree. This creates proxy code that uses the service.
        ServiceDescriptionImportWarnings warning = importer.Import(nmspace, unit1);
        if (warning == 0) // If zero then we are good to go
        {
            // Generate the proxy code
            CodeDomProvider provider1 = CodeDomProvider.CreateProvider("CSharp");
            // Compile the assembly proxy with the appropriate references
            string[] assemblyReferences = new string[5] { "System.dll", "System.Web.Services.dll", "System.Web.dll", "System.Xml.dll", "System.Data.dll" };
            CompilerParameters parms = new CompilerParameters(assemblyReferences);
            CompilerResults results = provider1.CompileAssemblyFromDom(parms, unit1);
            // Check For Errors
            if (results.Errors.Count > 0)
            {
                foreach (CompilerError oops in results.Errors)
                {
                    System.Diagnostics.Debug.WriteLine("========Compiler error============");
                    System.Diagnostics.Debug.WriteLine(oops.ErrorText);
                }
                Console.WriteLine("Compile Error Occured calling webservice. Check Debug ouput window.");
            }
            // Finally, add the web service method to our list of methods to test
            //--------------------------------------------------------------------------------------------
            object service = results.CompiledAssembly.CreateInstance(serviceName);
            Type types = service.GetType();
            List<MethodInfo> listMethods = types.GetMethods().ToList();
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a list of urls, I would like to check that each url: Returns
Given: Url - http://www.contoso.com/search.php?q= {param} returns: -html- --body- {...} ---div id='foo'- ----div id='page1'/- ----div
i am using asynctask to fetch images from given url.these images are displaying in
Given the URL (single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using
I wrote a little Java servlet that would dynamically generate an image button given
Given: Multiple clients with a Service.asmx page that has some web methods that I
I need to download one file from an url that i give from an
What is the best way to check if a given url points to a
I'ld like to analyze the certificate of a given url and get some details
I want to pop a browser with a given url from within a windows

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.