• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using @WebMethod to override the web service operation name

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use @WebMethod(operationName="some_method_name") to override the default web service method name in WSDL.
But its showing the same method name in generated WSDL as inherited by the SEI
Below is the code
SEI


SIB



WSDL

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is because your SIB is annotated with @WebService (endpointinterface="....")
Try to take away the endpointinterface and see the difference.
 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Himai, it was due to endpointInterface property. I just removed the endpointInterface property from the SIB and WebMethod annotation worked.
So does it means we can not rename or customize the web service opeartion name If we use endpointInterface property.
 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When you declare endpointinterface attribute in @WebService, the WSDL is generated based on the name of the methods defined in that interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic