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

Problem trying to invoke APEX webservice from .NET

I've created a very very simple webservice using eclipse just to test to see how this works (exists only on the test environment sandbox right now)
global class testWebServiceClass 
 webService static Id generateEmptyQuoteTest( Id OpportunityId )
  Quote__c q = new Quote__c ( Opportunity__c = OpportunityId, Date_Sent__c = );
  insert q;

Now I've tried invoking this using s-control in the opportunity detail page button

var id = sforce.apex.execute( "testWebServiceClass","generateEmptyQuoteTest",{OpportunityId:"{!Opportunity.Id}"}); 


 and this works perfectly.
However, I'm also trying to see if I can invoke the webservice from a C# application (the project consumed the enterprise.wsdl generated from and the wsdl for the APEX class above, calling the web reference testWebService)
    protected void Button1_Click(object sender, EventArgs e)
        testWebService.testWebServiceClassService test = new testWebService.testWebServiceClassService();
        test.SessionHeaderValue = new testWebService.SessionHeader();
        test.SessionHeaderValue.sessionId = sfdc.SessionHeaderValue.sessionId;
        test.Url = sfdc.Url;
        String testResult = test.generateEmptyQuoteTest("006S0000002K6i0");

 where the sfdc object already has a valid login session header.
The part I bolded always runs into an exception:
"No operation available for request
So I was wondering if anyone can tell me where I'm going wrong? I tried reading through the documentation but I guess I either missed something or I don't understand this stuff to well... please help!!

dont change the Url property.
Thanks SimonF, that worked like a charm.