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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:50:24+00:00 2026-06-17T08:50:24+00:00

have defined a Java Interface with the annotation @WebService Compiled the code which went

  • 0

have defined a Java Interface with the annotation @WebService
Compiled the code which went fine

Example:

@WebService
public interface HelloWorldIfc{

Now I tried to define an endpointinterface as

 @WebService (endpointInterface = "com.ws.HelloWorldIfc")
    public interface HelloWorldIfc{

This compiled fine too

So – should I be defining the endpoint interface on the interface or on implementing class ?
is this attribute of any use – what is its purpose ?
what happens if I dont define it – what do I lose ?
Thanks,
satish

  • 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-06-17T08:50:25+00:00Added an answer on June 17, 2026 at 8:50 am

    The JAX-WS Specification makes this cleas in section 3.3, page 30:

    You can use the endpointInterface attribute to separate between the implementing class and the interface. Basically, this determines what will be mapped to your wsdl:portType when you deploy the service and the wsdl:definition is generated.

    If you do not define the endpointInterface all public methods of the annotated class will be mapped to wsdl:operation (as long as you do not influence this behaviour with @WebMethod annotations).

    If you do define the endpointInterface, it has to point to some type which the annotated class implements (or, well, itself as demonstrated in your question). Then, the public methods of this type are used for mapping the wsdl:portType, instead of the methods of the annotated class.

    To sum up: The definition of endpointInterface only makes sense if you use the @WebService on an implementing class and want your WSDL to be generated based on the interface it implements. In your current setting where you use the annotation on the interface com.ws.HelloWorldIfc, there really isn’t any difference. So you lose nothing by just skipping it. The annotation is useful if you want your implementation class to provide public methods that should not go into the generated WSDL.

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

Sidebar

Related Questions

I'm using Java 1.6.0_25. I have an annotation defined: @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Resource
I have a test code for an ADT of LinkedList, which implements interface NumList.java,
I have the following code, partly in Java, partly in Scala: Java: public interface
As you know, in a java interface, all methods have to be defined as
In Java I have a defined a string named year: String year=year(now())-1 Now I
I have defined the following Unit-Test: [TestMethod] //@Test for the Java crowd public void
Lets say we have a program which contains such classes: public interface AbstractItem {
I have the following Java object hierarchy: public interface Function { public void calculate(long
I have a Java program consisting of several class. Now, I made the interface
I have three java types as defined below: Main.java: import java.util.Arrays; import java.util.List; public

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.