You need to sign in to do that
Don't have an account?
Simba
Urgent !! Sample Code to make a call to Apex Web Service from Java
I have created an APEX Web Service and would like to call it from outside. Can you please give me the steps to access APEX Web Service from outside.
I have the document calling SF APIs from outside, this does not talk about making calls to APEX Web Service.
1. Do I need to get an handle to describeGlobal ?
2. Do I need to have some kind of SF jar files to get APIs for SF objects (like DescribeGlobalResult;, SforceServiceLocator() );
Thanks
Regards
I have the document calling SF APIs from outside, this does not talk about making calls to APEX Web Service.
1. Do I need to get an handle to describeGlobal ?
2. Do I need to have some kind of SF jar files to get APIs for SF objects (like DescribeGlobalResult;, SforceServiceLocator() );
Thanks
Regards
if you have webservices exposed via apex code you can generate wsdl files for these similar to the other wsdl files.
These contain everything necessary to create the java files to access your webservice methods.
You can generate your apex wsdl files via the Apex detail page: Setup->Develop->Apex Classes , click on the name of the apex class, then click on Generate WSDL.
After that it's basically the same as with standard salesforce functionality and can be used like described in the documentation.
regards,
Andreas
Message Edited by wintamute on 04-01-2008 04:33 PM
So would you need both the Enterprise WSDL as well as the WSDL for the Apex class? Is there a small sample that walks through this? Also, in the Apex Language Reference guide it only lists Triggers, AnonymousExecute and AJAX as ways to invoke Apex code
Thanks
Once you have the session Id, you can save this either at the application level and then keep using this again and again till it's expired. Using this session Id you would make a call to your Apex WebService, like you would make a call to any other WebService
I don't have the sample code handy with me right now, but I had found one with .Net example somewhere on the Wiki. May be you can try searching there.