Web method signature modified.

R

Raj

Hi,
We have set of web service method already consumed by out client. Now we
require to add few input parameters (int/string type) to existing web method.

How does this will affect existing consumer of the service??
Please take this as urgent query.
Thanks in advance
-rajesh
 
R

Raj

Hi Gaurav,

I tried with a test application with old proxy after modifying a web method
to add a new parameter. It is still serving the request. It is not crashing.

However I wish to know if it approved by MS to do?
Moreover can we have overloaded web method?
Thanks in advance
-rajesh
 
R

Raj

HI Gaurav,
Thanks for your reply first of all.
See I haven't removed any parameter instead I have added one. Min occurance
is 1 for int and 0 for string param and both I have tried and found it
working.

Only concern is whether this is suggest approach, as you're saying no, which
is why I think the existing set of web methods should not get disturbed.

Thanks once again
-rajesh
 
R

Raj

Hi Gaurabh,
Thanks a lot for helping me out.
Only thing i didn't get out of mail is last statement.

You say "Infact, the recommended way is to be backward compatible. So, give
the
new method (method with new parameters) a new name -- in "operations"
section."

What do you mean my in "operations" section. can you pls explain in detail.
I ping you a lot for this. Just last help for now.
Thanks
-rajesh
 
S

Simon Hart

Hi Raj,

My advice would be to overload your existing Web Method by using the
MessageName property of the WebMethod attribute and refactor the other
original Web Method so you avoid duplicating code.

Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top