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

  • Home
  • SEARCH
  • 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 978171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:01:06+00:00 2026-05-16T04:01:06+00:00

i am using Netbeans to create a Web Service and the code is written

  • 0

i am using Netbeans to create a Web Service and the code is written in java. My problems arises from creating 2 functions that will be accessible by a client. The functions look alike by name but their parameters are different.

When building the web service(int a war file) i get no complaints. However when deploying the war file onto a glassfish server renders errors that would make me conclude that glassfish somehow is getting confused about 2 functions of the same name without looking into the parameter list. Is this a common occurrence and is there a workaround?

For example:

@WebMethod()
public Long startMission(@WebParam(name=”session”) Session session, String name{
…..
}

@WebMethod()
public Long startMission(@WebParam(name=”session”) Session session, Long num{
…..
}

The error on the glassfish server comes back to me and tells me that the 2nd StartMission function does not contain an entry point for parameter @Long num – which tells me that it does not recognize 2 functions of the same name. Perhaps i am thinking about this the wrong way. Any help, options, suggestions would be appreciated. thanks!

  • 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-16T04:01:06+00:00Added an answer on May 16, 2026 at 4:01 am

    You can distinguish between the two methods by specifying the operation that they correspond to. This is done by specifying the operationName member value for the WebMethod annotation.

    For example,

    @WebMethod(operationName='startMissionWithName') public Long startMission(@WebParam(name="session") Session session, String name{ ..... }
    
    @WebMethod(operationName='startMissionWithId') public Long startMission(@WebParam(name="session") Session session, Long num{ ..... }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a simple XML web service using NetBeans 7's RESTful Web Services from
I'm using NetBeans to develop J2EE web service. NetBeans create a directory called nbproject
I have created a Web service using Netbeans', JEE6 and Jersey - Webservice from
I am using Netbeans 7.0.1 with a web project that I have imported from
I created a Java web service in Netbeans 7.1.2 and managed to create a
i have create a web service to add two numbers using netbeans...and i am
I've created a web service in Netbeans; creating the entities classes from my database.
I follow tutorial here on how to create web service using RESTful web service
I am unable to create a Web Service Client in my NetBeans Web Application
I am using Netbeans 6.8. I can see an option to create a web

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.