Click here to Skip to main content
15,914,323 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every body
i want to know how to consuming hosted iis web service(print pdf file method) in .net
if any one know post with example.
Thank U.
Posted

Normally, the notion "consuming a Web Service" means acting as a client/user of a Service, and it does not depend on how the Service is hosted or other detail. What does matter is the URI, the set of interfaces and a proxy used on the client side.

Basic steps of consuming a Web Service using .NET client include:

  • Obtain WSDL file(s) and documentation on how the Service(s) should be used.
    See http://en.wikipedia.org/wiki/WSDL[^]. The knowledge of WSDL language is not really required. A nice Web Server can provide downloading of the WSDL file(s) from the same site, but this is not required.
  • Run the .NET utility WSDL.EXE to generate a client proxy for a Web Service; if can be done using "Visual Studio Command Prompt" (http://msdn.microsoft.com/en-us/library/ms229859.aspx[^]).
    For description and command line parameters of this utility, see http://msdn.microsoft.com/en-us/library/7h3ystb6%28v=VS.100%29.aspx[^].
  • Parameters of WSDL.EXE include computer language to generate a proxy file, name space and output file name. When a source code proxy file with desired parameters is obtained, include it in your client project.
  • Instantiate the top-level object of a service using one of the constructors of the generated code. You may need to pass URI to the constructor or use the URL generated in the code of the proxy. In other cases, you may need to format a URI to set up authentication parameters (user name, password) to pass the parametrized URI to the constructor. This is a bad style, but some Services are like that.
  • Using your understanding of semantic of a particular Web Service taken from documentation and other sources, call the methods on the class instance(s) constructed on previous step.
  • PROFIT!
Good luck,
—SA
 
Share this answer
 
v5
Normally this is working fine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900