SQLXML 3.0 Service Pack 3
SoapMethod Object

The SoapMethod object is obtained by calling the Item method (or, if you are creating a new method mapping, by calling the AddStoredProcMethod method or AddTemplateMethod method) on the SoapMethods collection object.

The SoapMethod object supports the following properties:

Name

Is the name of the method mapping.

Type

Is the method mapping type. You can specify one of the following values.

Value Description
1 Stored procedure (or user-defined function) mapping
2 Template mapping

SPName

Is the name of the stored procedure or user-defined function (UDF) that is mapped to the WSDL operation in this mapping. This property is only valid for stored procedure (or for UDF) mappings.

TemplateLocation

Is the template name with the full path to the template location that is mapped to the WSDL operation in this mapping. This property is only valid for template mappings.

ReturnFaults

Specifies whether runtime errors should be returned as SOAP faults.

NestedMode

Is a Boolean property that specifies whether the results are to be formatted by using NESTED mode. This property is valid only for stored procedure (or for UDF) mappings.

Output

Specifies how the output is to be returned. This property is valid only for stored procedure (or for UDF) mappings. You can specify one of the following values.

Value Description
1 Return results as an array of XMLElement objects.
2 Return results as an array of DataSet objects.
3 Return results as a single DataSet object.

Examples

The following example establishes a connection to the first Web site on a server that is running Microsoft® Internet Information Services (IIS). The example creates a virtual directory (soapvdir) and virtual name of soap type. In the virtual name of soap type, a template is added in the configuration file and then the template location is changed.

Set ObjXML = CreateObject("SQLVDir.SQLVDirControl.3.0")
ObjXML.Connect "IISServer", "1"
Set ObjVDirs = ObjXML.SQLVDirs
Set objVDir = objVDirs.AddVirtualDirectory("soapvdir")
objVDir.PhysicalPath = "C:\Inetpub\wwwroot\soap"
objVDir.UserName = "username"
objVDir.Password = "SomePassword"
objVDir.ServerName = "MySQLServer"
objVDir.DatabaseName = "Northwind"
objVDir.AllowFlags = objVDir.AllowFlags & 128
set objVNames = objVDir.virtualNames
set objVName = objVNames.AddVirtualName("soap", 8, "c:\inetpub\wwwroot\soap", "sqlxmlsoap", "www.domain.com")

set objMethods = objVName.SoapMethods
set objMethod = objMethods.AddTemplateMethod("GetCustomerByName", "c:\inetpub\wwwroot\soap\MyTemplate.xml", true)
' Change the template location (for illustration purposes)
objMethod.TemplateLocation = "MyTemplate.xml"
' Generate config and WSDL
objMethods.GenerateConfig false, false
objMethods.GenerateWSDL  
...
ObjXML.Disconnect

 
Page view tracker