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
JegdishJegdish 

Calling webservice method from java client

Hi All,
    I have created a new class (apex code) in salesforce with one webservice method in it. This method takes two arguments and creates new contact in sf.
   I want to call this method from java client. Is it possible?
   Please help to explain me asap.
 
Thanks,
Jegdish
SuperfellSuperfell
Download the WSDL for the class, run WSDL2Java (or your soap stacks equivilient) and go from there, just like calling the regular API.
jchanowitzjchanowitz
Don't you need to get a valid sessionId first?  I've been having the same problem trying to call an Apex class from Flex.
mtbclimbermtbclimber
Simon was referring to how to utilize the method in your java client. Sure to invoke anything will require a valid session id be that from a java client, flex client, etc.   You also need the endpoint, do you have that?

Message Edited by mtbclimber on 09-20-2007 07:56 AM

jchanowitzjchanowitz
Like I said, I was trying this from a Flex client.  I did since get it working after stumbling upon the "execute" method in the FlexToolkit.  It had to be modified a bit to change the "package" namespace & endpoint to "class", and then it worked.
 
I'm really enjoying this Oracle on Demand platform SalesForce has built.