ERROR: The result of the method is type variant RESERVED20.

Good afternoon, I’m new to the forum and need urgent help …

I am working with Axapta 3.0 and I am calling a Web service through a COM, and I can not get the return value of the method call. My code is as follows:


COM service = new COM(’{630F005B-B908-3829-AA5C-848F01F5CB20}’);

COMDispFunction funcShow;

COMVariant vuelta;

(…) //define for each parameter of the method a COMVariant

;

funcShow = new COMDispFunction(
service,
“actualizarPeticion”,
COMDispContext::METHOD);

//The method that I call from the COM returns a long

vuelta = new COMVariant(
COMVariantInOut::Out_retVal,
COMVariantType::VT_I4);

//Call the method with all parameters that are of type COMVariant
//and add the parameter back to return in it the result.

funcShow.Call(idPeticionCOM,
app,
varFalse,
varFalse,
varFalse,
fecha,
fecha2,
remitente,
vacio,
vacio,
resumen,
resumen,
prioridad,
dniCOM,
vacio,
texto,
vuelta);


when I do the job run, the error is:

“The result of method ‘actualizarPeticion’ disagrees with the argument [retval] specified. The result of the method is type variant RESERVED20.”

Which does not understand because in my web service the parameter back is type “long”:


(…)
<wsdl:message name=“actualizarPeticionResponse”>
<wsdl:part name=“actualizarPeticionReturn” type=“xsd:long” />
</wsdl:message>
(…)

If you have another alternative for call a web service from Axapta 3.0 tell me, please, because I am novice in Axapta.

Many thanks and greetings.