PRB: Run-Time Error When You Use Custom Type Mapper on SoapClient (297985)



The information in this article applies to:

  • Microsoft SOAP Toolkit 2.0

This article was previously published under Q297985

SYMPTOMS

If you use a custom type mapper on the client, when you specify the Web Services Meta Language (WSML) file in the mssoapinit call to initialize the SoapClient object, you may receive an error message similar to the following:
Run-time error '-21472214005 (800401f3)':

WSDLReader:Analyzing the WSML file failed HRESULT=0x800401F3 - WSDLReader:Initializing the service SoapEmployee failed HRESULT=0x800401F3 - WSDLService:The PROGID EmpServer.clsEmpServer is invalid HRESULT=0x800401F3
where the PROGID EmpServer.clsEmpServer is the PROGID of the Component Object Model (COM) object that you are exposing through SOAP Toolkit 2.0.

CAUSE

When you use a custom type mapper on the client, you must specify a WSML file in the msssoapinit call to initialize the SoapClient object. The WSML file provides the PROGID of the custom type mapper component, which is used to create an instance of the custom type mapper. If the WSML file also includes information about the COM object that the Simple Object Access Protocol (SOAP) service is exposing, you receive the above-mentioned error message. This assumes that the COM object that the SOAP service is exposing is not installed on the client computer.

RESOLUTION

To resolve this problem, use a separate WSML file for client initialization that only includes information about the custom type mapper. For an example of how to use a separate WSML file for client initialization, see the ADOTM sample that is included with the SOAP Toolkit 2.0 samples.

MORE INFORMATION

Custom type mapper is a COM object that implements the ISoapTypeMapper interface. A custom type mapper provides a mechanism to easily deal with complex types in your SOAP application. The purpose of a custom type mapper is to turn the Extensible Markup Language (XML) representation of the complex type into a valid VARIANT COM type with which your application can work. In addition, a custom type mapper takes the VARIANT COM type and turns it into a valid XML representation to be sent in a SOAP message.

REFERENCES

For more information see the "Sending Complex Types Using a Custom Type Mapper" topic in the SOAP Toolkit 2.0 documentation.

Modification Type:MajorLast Reviewed:5/17/2002
Keywords:kbDSupport kbprb KB297985