Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webservice evolution - need to a parameter to an existing WebMethod.

peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont do a lot of webservice work so sorry for my novice understanding.

I have an existing web service that is used by lots of clients.

Foo[] methodA(@WebParam(name = "param1") Engine engine, @WebParam(name = "date") Date date);

In a specific client (flash web app) I need to pass an additional param.

Foo[] methodA(@WebParam(name = "param1") Engine engine, @WebParam(name = "date") Date date, @WebParam(name = "clientTimeZoneOffset"), Long clientTimeZoneOffset);

of course method A is called by a diverse variety of clients, only 1 needs to pass in the timezone offset.
In my study of webservices, I recollect some issue with parameters for methods exposed by webservices but cannot remember the full details. WHAT ARE THE RULES???

I am getting the following
main ]|2013-09-25 12:02:09,584|ERROR||| ContextLoader:307|Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processService': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: An operation with name [{}methodA] already exists in this service

I have found documentation that says I can methods where the type varies, but not the number of args. Can I???

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic