Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Exposing WebService method issues

 
Greenhorn
Posts: 13
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand why I have web service methods exposed which shouldn't be the case according to JAX-WS specification (as I understand it).

I've created a simple test web service with implicit SEI:



The goal is to make helloTest() not be exposed in WebService and helloTest2() be exposed in WebService. I then implement this SIB:

I spicifically omit endpointInterface parameter to make this implicit SEI. My understanding is that with implicit SEI, in order to expose web service, I must use @WebMethod annotation, any methods that are not annoted with @WebMethod in implicit SEI shouldn't be exposed in WebService?

Hence:



When I publish the WebService:



Nonetheless, I see all methods exposed in operation WebService:



No matter what I try, I always have all methods showing in the WebService, but according to JAX-WS specs methods get exposed only under specific circumstances which I am trying to avoid and yet they get exposed anyways. I am trying to follow specification and hide certain methods but they keep showing.

Could somebody kindly explain why I keep having helloTest() exposed when it shouldn't?

Thanks.

ADDED: Sorry, I just realized this message should be in Web Services Certification (OCEJWSD) section. I am currently studying for this exam.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the @WebMethod annotation, there is an "exclude" flag. What's the default value I expect it's false.



Now the question is if the interface is annotated with @WebService, what happens to those methods that AREN'T annotated with @WebMethod? Does the implicitly include @WebMethod hence you see them when published, ignored/excluded, something else?
 
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Victor Skvorzkoff,

you are preparing to pass Java EE 6 Web Services Developer Certified Expert (1Z0-897)?

I also want to pass it and I am preparing for it.  Have you already taken the test?

Are you interested in learning together (discussing via email etc.) ?

Best regards,

Uwe
 
Victor Skvorzkoff
Greenhorn
Posts: 13
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Uwe Lindenberg wrote:Hi Victor Skvorzkoff,

you are preparing to pass Java EE 6 Web Services Developer Certified Expert (1Z0-897)?

I also want to pass it and I am preparing for it.  Have you already taken the test?

Are you interested in learning together (discussing via email etc.) ?

Best regards,

Uwe



Hi Uwe,

Sorry for late reply.  Yes, I am studying for WSDCE exam.  It's a great idea to study together for this exam.  Please feel free to contact me via email: victorsk3.14@gmail.com to discuss how we can arrange our study sessions.  I'd also suggest anybody else who'd like to join to see if we can arrange a study session.

Thanks,
Victor.

 
reply
    Bookmark Topic Watch Topic
  • New Topic