locked
Tell me when require to generate dynamic proxy for web service RRS feed

  • Question

  • User88744855 posted

    whenever i consume any web service then the company who developed the service they always provide web service url or wsdl or proxy related classes. i just add reference of web service url or wsdl file then i have seen VS IDE always generate proxy related classes to invoke web service. i often hard and found that people try to know how to generate proxy of web service dynamically but i really do not know why one require to generate proxy dynamically.

    so please some one tell me the situation when one has to generate proxy for web service dynamically or progrramatically. also tell me what are the information the consumer must have to generate web service proxy dynamically. thanks

    Sunday, March 17, 2013 2:16 PM

Answers

  • User220959680 posted

    The DynamicProxy allows you to create the dynamic WCF client at runtime by specifying the WSDL URI of the service. The DynamicProxy does not depend on the precompiled proxy or configuration. The DynamicProxy uses the MetadataResolver to download the metadata from the service and WsdlImporter to create the contract and binding at runtime. The compiled dynamic proxy can be used to invoke the operations on the service using reflection.

    Ref: http://blogs.msdn.com/b/vipulmodi/archive/2006/11/16/dynamic-programming-with-wcf.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 17, 2013 2:56 PM
  • User220959680 posted
    when i should go for generating dynamic proxy?
    Contact the web service provider, not all services require dynamic proxy generation. Below are the basic functions of dynamic proxy.
    1. To parse a valid WSDL file
    2. Generate a proxy class for the Web service
    3. Return a list of Web methods supported by the Web service
    4. Enumerate the parameters for a Web method
    5. and finally allow the user to call the method on the Web service.

    Refer: http://msdn.microsoft.com/en-us/library/aa730835(VS.80).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 18, 2013 5:47 AM

All replies

  • User220959680 posted

    The DynamicProxy allows you to create the dynamic WCF client at runtime by specifying the WSDL URI of the service. The DynamicProxy does not depend on the precompiled proxy or configuration. The DynamicProxy uses the MetadataResolver to download the metadata from the service and WsdlImporter to create the contract and binding at runtime. The compiled dynamic proxy can be used to invoke the operations on the service using reflection.

    Ref: http://blogs.msdn.com/b/vipulmodi/archive/2006/11/16/dynamic-programming-with-wcf.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 17, 2013 2:56 PM
  • User88744855 posted

    the important one thing is missing. i just need to know when i should go for generating dynamic proxy?

    Monday, March 18, 2013 2:59 AM
  • User220959680 posted
    when i should go for generating dynamic proxy?
    Contact the web service provider, not all services require dynamic proxy generation. Below are the basic functions of dynamic proxy.
    1. To parse a valid WSDL file
    2. Generate a proxy class for the Web service
    3. Return a list of Web methods supported by the Web service
    4. Enumerate the parameters for a Web method
    5. and finally allow the user to call the method on the Web service.

    Refer: http://msdn.microsoft.com/en-us/library/aa730835(VS.80).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 18, 2013 5:47 AM
  • User88744855 posted

    very sorry u not saying the actual answer that is why one should go for dynamic proxy ?

    in what kind of situation one has to create proxy dynamically.

    Tuesday, March 19, 2013 3:02 AM