开发者

Questions regarding web service (or WCF) metadata

These may appear silly questions but still i would like to get these things cleared:

  1. What do web service metadata comprise and why is metadata necessary?
  2. 开发者_C百科
  3. Does it contain something other/different than the operations a web service expose?
  4. Where do we define/mention the metadata of the web service while creating the web service
  5. Does WSDL generated out of the Web Service contains web service metadata?
  6. If there is an option to hide metadata from clients, then does it mean that it's something which is not mandatory to have?


Web Service metadata describes the service, e.g. it allows other machines (or users) to find out

  • what kind of methods the service offers, what their names and parameters are
  • what kind of data structures are being used to call a service method, and what kind of data they return

Yes, metadata is optional - if you "hide" it or don't expose it, then a third-party cannot "discover" and use your service - you would have to provide some other means for them to use your service (you could send them printed documentation, you could send the generated WSDL/XSD as file attachments in an e-mail or whatever).

In WCF, you can quite easily control what kind of metadata is exposed (if any) - you can enable/disable service metadata alltogether, you can define that clients are able to use just the native WCF Metadata Exchange (MEX) protocol, or you can also expose your WSDL (either dynamically generated from your running service, or an external, static file) to interested callers.

I never did much work in ASMX web services, and I don't know other systems, so I cannot really tell you all that much about those. I do know from experience that some service offerings do expose their WSDL as a mean to discover and use the service, while others are pretty paranoid about it and you need to call them / e-mail them to get the WSDL/XSD via e-mail - you cannot discover and use their services directly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜