5

I am starting to play with WebApi and Rest services. Till now I was always developing SOAP APIs.

My Question is there something parallel to proxy in MVC4 WebApi or it's only SOAP world concept. If not how the clients know the full description of the Web functions that I expose to them.

Thanks

2 Answers 2

4

I suppose you mean the WSDL service description, which does not exist in WebAPI as such. Now I see you also added the tag REST to the question and I would like to stress that the WebAPI does not enforce REST practices.

REST is in the middle of some discussion lately, but I would think everyone agrees it does not define any wsdl-like service.

It does however require you to make your documents self-describing and encourages publishing possible state transfers and links to related documents more info here: http://en.wikipedia.org/wiki/HATEOAS

REST is a very different beast than SOAP because it actually does not want you to send commands to and from the server other than the basic ones needed to get/update/.. resources, but a full description of this is beyond the scope of this post :-)

That being said, the webAPI technology in itself does not have any reservations in that regard and it would be perfectly possible to put full-blown services and a related wsdl like structure in place.

Sign up to request clarification or add additional context in comments.

5 Comments

I suspect Night Walker is less interested in WSDL and more interested in how to create a proxy class in a consuming application. The WSDL is used by tools to auto-generate a proxy. I realize it has no published definition, but does WebAPI include developer tools to auto-generate proxy classes that code could call?
not at this moment AFAIK, although there is no reason why it couldn't be added in some way. But with my answer I also wanted to indicate that a "clean" REST API should not need these proxy classes, because the only "methods" are the HTTP verbs. You need domain knowledge to understand the REST resources and states, but the API responses should be self describing and should indicate the further options available for each of the resources you encounter.
REST is not an in-place substitution for SOAP! it requires a different way of thinking about the way you publish your information and functionality.
Since this is from march - did something change meanwhile?
@TGlatzer - i have added another answer with another option
0

I can recommend this project, I have used it for several projects, and it works well.

PS: I am a collaborator on the project, although I havent committed any code yet.

https://github.com/RestCode/WebApiProxy

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.