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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:11:14+00:00 2026-05-13T19:11:14+00:00

When debugging some web-service client code today (in Java, with jax-ws) I ran across

  • 0

When debugging some web-service client code today (in Java, with jax-ws) I ran across a web-service method with the mind-blowing amount of 97 parameters!

I had to create a test case that calls this method, and I noticed several things:

  • code assist/hover doesn’t scale well. I am using Eclipse, and the tooltip over the method is as wide as the screen and spans several lines.
  • I had to copy parameters values from a previous xml capture, and it was practically impossible to remember “where am I” – when I had the cursor located after a comma and before typing some value, I often got the data type wrong – I typed an Integer instead of a String and vice versa.
  • Even after I wrote all the parameters, I still had some errors and the signature didn’t match. Unfortunately Eclipse marks the whole line in red as having an error, so finding where the mistake was took even more time 🙁

So this got me thinking, what do you think is the maximum sane number of parameters for a method? And if you could change this web-service signature, how do you think it can be improved?

  • 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-13T19:11:15+00:00Added an answer on May 13, 2026 at 7:11 pm

    There is no clear limit, but I am uncomfortable with more than 3-4 parameters. AFAIR Uncle Bob Martin in Clean Code recommends max 3.

    There are several refactorings to reduce the number of method parameters (see Working Effectively with Legacy Code, by Michael Feathers for details). These come to my mind:

    • encapsulate many related parameters into a single object (e.g. instead of String surName, String firstName, String streetAddress, String phoneNumber pass a Person object containing these as fields)
    • pass parameters in the constructor or other method calls prior to the invocation of this method
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 510k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It looks like you're having a misunderstanding of the error… May 16, 2026 at 4:50 pm
  • Editorial Team
    Editorial Team added an answer Yes, it is possible, at least with version 2.5.2_01 Just… May 16, 2026 at 4:50 pm
  • Editorial Team
    Editorial Team added an answer AnyEdit is an eclipse-plugin that allows you to easily convert… May 16, 2026 at 4:50 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've been creating a an application with C# using W2k8+IIS7/SQLExpress 2008/Web Service/Windows Client. I'll
I have a web service with a method that has two string parameters. When
I have a web service in which I am manipulating POST and GET methods
Using a web service is often an excellent architectural approach. And, with the advent
I've got a Silverlight app that talks to an HTTPS web service. On most
I modify web.config when I HAVE TO :-) Debugging setting, session state setting, etc.
Continuing some helpful StackOverflow debugging , I have a zombie I need to track
I have a wierd problem with threading in an ASP.NET application. For some reason,
I have a VS 2008 solution that includes a web site and a web
I know this topic is bit old, but i did surf the web and

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.