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
pkurapkura 

Calling Custom Apex Webservice without using Axis!

I've a custom apex webservice that I would like to call. I generated the wsdl and the stubs using axis1.4 and was able to call the service. I would like to do the same with out using Axis. 1) Get the custom web service wsdl. 2) Generate stubs for custom webservice using wsdlc of wsc.jar. ConnectorConfig config = new ConnectorConfig(); config.setServiceEndpoint("https://test.salesforce.com/services/Soap/u/22.0"); config.setAuthEndpoint("https://test.salesforce.com/services/Soap/u/22.0"); config.setUserName("userName"); config.setPassword("password"); PartnerConnection connection = Connector.newConnection(config); config.setSessionId(connection.getSessionHeader().getSessionId()); System.out.println(config.getServiceEndpoint() + ":" + config.getSessionId()); ConnectorConfig soapConfig = new ConnectorConfig(); soapConfig.setSessionId(config.getSessionId()); soapConfig.setServiceEndpoint(config.getServiceEndpoint()); SoapConnection testConnection = new SoapConnection(soapConfig); testConnection.createAccount(accountData); I get the following error: com.sforce.ws.SoapFaultException: No operation available for request {http://soap.sforce.com/schemas/class/CreateAccount}createAccount at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:205) at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149) at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98) at com.sforce.soap.LeadCapture.SoapConnection.createLead(SoapConnection.java:1) at com.salesforce.test.TestLCWithOutAxis.main(TestLCWithOutAxis.java:43) Any input is greatly appreciated. 
cloudcodercloudcoder

One approach would be to use the pilot Apex REST Services. Make sure you sign up for the webinar on July 19th for more info.

 

http://www.developerforce.com/events/apex_rest_api_webinar/registration.php?d=70130000000G5wr