4

I am able to connect salesforce by using standard dotnet framework with web reference option. But, i am unable to connect SForceService by using dotnet core 3.1 framework as it is using system.web.services namespace which is not available in .net core 3.1, i have added parter wsdl file using Connected service option, the methods are not exposed to access.

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44
kayal
  • 123
  • 12

1 Answers1

1

I was able to get this to work and figure I should help out the community a bit here.

I was able to use the Metadata & Partner WSDL after generating a reference.cs file via WCF tools, you can achieve it either by using VisualStudio (https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide) or dotnet-svcutil (https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x) CLI.

If you're using CLI like me, make sure you have the folder structure created correctly and add reference to the .csproj file. Folder Structure should look like this:

Connected Services 
 Metadata Service
   ConnectedServcie.json 
   reference.cs
Partner Service
  ConnectedServcie.json 
  reference.cs

In the csproj: Add a new ItemGroup property under Project property:

<ItemGroup>
 <WCFMetadata Include="Connected Services" />
</ItemGroup>

Hope this help =)

Sheing
  • 36
  • 2