function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

call apex class from .NET


Is it possible to run an apex class from .NET code?


You can call apex via a Webservice call. For this your apex class must be a webservice and you have to include the WSDL of that class in your .Net code as a reference.
Hi micwa.

Thanks for your reply, apex class is a webservice
"webservice static Id createInv(Id regId, Integer invoiceType)"
Then I download get WSDL file from "Generate WSDL" button and add this wsdl to my web reference in .NET

I get following error:
Following error occured after call createInvoice {"No operation available for request {} createInvoice"}

Parts of wsdl file download:
 <soap:address location=""/>

 <definitions targetNamespace="" xmlns:xsd="" xmlns="" xmlns:soap="" xmlns:tns="">

Is this error with WSDL file or apex class?


The error is in your .NET code, the request is going to the wrong URL.