Post a Job  |   Ask a Question?   |   Already registered? login or register
Munendra Kumar
05/02/2016 12:56 PM

Overloaded Method in Jax-WS,RI Implementation

i getting error while running wsgen tool , "Request wrapper bean names must be unique and must not clash with other generated classes". any one tried overloading using Contract Last Approch
Spam    4 Comments

05/02/2016 14:22:24
Hi Munendra, Good question Jax-ws ri implementation doesn't support method overloading. To better clarity refer specification they strictly restricted to perform method overloading We can do by adding one more jar but it is not complaint to ri implementation. ..

05/02/2016 14:28:36
Brother, Add 2 more annotations on top of one of the overloaded method 1) @RequestWrapper(classname="com.ibw.service.jaxws.YOUR_OVERLOADED_METHOD_NAME_APPENDED_WITH_ANY_ADDITIONAL_CHAR OR NEW_NAME") 2) @ResponseWrapper(className="...") For Example, @RequestWrapper(className="com.ibw.service.jaxws.Withdrawl_1") @ResponseWrapper(className="com.ibw.service.jaxws.Withdrawl_1Response")

06/02/2016 13:03:56
Sorry but it's not working,it gives "two classes have the same xml type name" and same error i am getting when, i am going to change name of the method but in annotation, operation name will be same like :- @WebMethod(operationName = "genBill", action = "") public Receipt genBill(xyz,abc){} @WebMethod(operationName = "genBill", action = "") public Receipt genBill_online(xyz,abc,bcd){} as you can see operation names are same but method name is different

06/02/2016 13:05:28
but in both cases binding classes are generated.

Languages :