Class DotNetWsdlGenerator

This class provides all the services for creating a .NET proxy assembly and FoxPro Proxy class from a WSDL based Web Service. You basically point at a WSDL service and call the ImportDotNetWebService method to import the Web service. The result creates a .NET assembly and FoxPro proxy class that can interact with the generated .NET assembly to call the Web Service.

The class works by setting the various properties to affect behavior.

*** Load libraries
Do DotNetwsdlGenerator

LOCAL loGen as DotnetWsdlGenerator
loGen = CREATEOBJECT("DotnetWsdlGenerator")
loGen.cClass = "WebStoreService"
loGen.cGeneratedClass = "WebStoreServiceProxy"
loGen.cOutputFile = "c:\temp\generated\WebStoreServiceProxy.prg"
loGen.cDotnetAssembly = "c:\temp\generated\WebStoreServiceProxy.dll"
loGen.cNamespace = "WebStoreService"

*** The WSDL URL to read service schema from
loGen.cWsdlUrl = "http://www.west-wind.com/wwstore/services/WebStoreConsumerService.asmx?WSDL"

*** If the WSDL requires authentication
* loGen.cUsername = "ricks"
* loGen.cPassword = GetSystemPassword()

loGen.lRegisterCom = .T.

IF !loGen.ImportDotNetWebService()
   ? loGen.cErrorMsg
   return
ENDIF

? "Done... "

loGen.Dispose
loGen = null
GoUrl

Class Members

MemberDescription

Dispose

Releases all the resources associated with this instance of the generator.

o.Dispose()

ImportDotNetWebService

High level function that imports a .NET service by creating a .NET Assembly from a CSharp import of the Web service. This method then also creates the FoxPro service proxy class.

o.ImportDotNetWebService()

ImportWsdl

Imports a WSDL file and creates a .NET assembly from it

o.ImportWsdl()

ParseDotNetClassToProxy

Parses the generated WSDL output .NET class into a FoxPro Proxy.

o.ParseDotNetClassToProxy()

RegisterCom

Registers a .NET assembly for COM interop.

o.RegisterCom()

cClass

Name of the class in the Web Service to retrieve

cDotNetAssembly

The full path to the .NET assembly that is to be generated.

cErrorMsg

Any error messsages when a method returns an error

cGeneratedClass

Name of hte class that is generated

cNamespace

Namespace used for the created service

cOutputFile

The full path to the PRG file that is generated as a proxy class.

cPassword

Optional password used to access the WSDL document

cProxy

Optional Proxy address if a proxy is required for access to the WSDL file.

cUsername

Username and password and proxy for HTTP connection

cWsdlUrl

The Web Service WSDL URL

lRegisterCom

Determines if the library is registered for COM locally

Requirements

Assembly: dotnetwsdlgenerator.prg

© West Wind Technologies, 2004-2020 • Updated: 09/29/15
Comment or report problem with topic