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
mh1974mh1974 

C# webservice call

I've written my own Apex web service and downloaded the WSDL file from the site.  My C# app logs into Sf successfully and I have a web reference to my nwely created web service.

 

Seems like I have everything I need,but,  I have no idea how to call the method I wrote.  I've included a Using stsement at the top of my class,  but,  I just can't see the method or how I'm supposed to associate my current session with the new web service (is that right?)

 

Basically,  I'm in all kinds of trouble here and would like a little help please!

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
By importing the WSDL for the apex service, you should of gotten a new service object, like the SforceService object. You use it like the regular api, create an instance of the service object, set the sessionHeader, call the methods on it.

All Answers

SuperfellSuperfell
By importing the WSDL for the apex service, you should of gotten a new service object, like the SforceService object. You use it like the regular api, create an instance of the service object, set the sessionHeader, call the methods on it.
This was selected as the best answer
mh1974mh1974
Any chance of some demo code?
BDouglasBDouglas

Did you get this figured out?  I'm looking for a code sample.

 

Thanks