Visual CSharp .NET - Referencia Web Services

 
Vista:

Referencia Web Services

Publicado por Claudia (3 intervenciones) el 15/03/2006 19:30:37
Hola!

Necesito consumir una serie de web services desde una aplicación de C# .Net, ya sé que se pueden agregar manualmente las referencias de cada web services en la opción Referencias > Agregar referencia web, pero lo que yo necesito es hacer esta referencia en forma dinámica por código, ya que obtengo la lista de web services a los que quiero acceder en tiempo de ejecución.

Alguien sabe como hacerlo o dónde puedo encontrar información al respecto ????

Gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Referencia Web Services

Publicado por Carlos Perez (2 intervenciones) el 04/04/2006 21:19:07
Puede usar la herramienta WSDL, WSDL.exe genera la clase proxy manualmente para un XML Web service.

Usted ejecuta el WSDL desde el command prompt así:

Wsdl [options] {URL??Path}

ejemplo:

Wsdl http://hostserver/MyApp/WebService.asmx?wsdl

Referencia.
--------------
/baseurl:baseurl
Specifies the base URL to use when calculating the URL fragment. The tool calculates the URL fragment by converting the relative URL from the baseurl argument to the URL in the WSDL document. You must specify the /appsettingurlkey option with this option.

/d[omain]:domain
Specifies the domain name to use when connecting to a server that requires authentication.

/l[anguage]:language
Specifies the language to use for the generated proxy class. You can specify CS (C#; default), VB (Visual Basic), or JS (JScript) as the language argument.

/n[amespace]:namespace
Specifies the namespace for the generated proxy or template. The default namespace is the global namespace.

/o[ut]:filename
Specifies the file in which to save the generated proxy code. The tool derives the default file name from the XML Web service name. The tool saves generated datasets in different files.

/protocol:protocol
Specifies the protocol to implement. You can specify SOAP (default), HttpGet, HttpPost, or a custom protocol specified in the configuration file.

/?
Displays command syntax and options for the tool.

/proxy:URL
Specifies the URL of the proxy server to use for HTTP requests. The default is to use the system proxy setting.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar