You need to sign in to do that
Don't have an account?

Apex class was generated from WSDL. what now?
I used the Generate from WSDL in Setup-> App Setup -> Develop -> Apex classes
It created a class from my webservice.
Now im confused about what the next step is. How can I call my webservice functions from custom button presses, for example?
I went through what you are doing now I know how you feel.
Here is what you do:
1. have your webservice convert into Apex class.
2. write a global class which calls you apex class(webservice).
ex:
global class whatever(){
@future (outcall=true)
public static void webserviceRun(put your parameters) {
webservice.ServiceSoap dns = new webservice.ServiceSoap();
dns.webservicefunction(put your parameters); }
3. to run it: whatever.webserviceRun();
All Answers
I went through what you are doing now I know how you feel.
Here is what you do:
1. have your webservice convert into Apex class.
2. write a global class which calls you apex class(webservice).
ex:
global class whatever(){
@future (outcall=true) public static void webserviceRun(put your parameters) {
webservice.ServiceSoap dns = new webservice.ServiceSoap();
dns.webservicefunction(put your parameters); }
3. to run it: whatever.webserviceRun();
I have to do the exact same thing this tutorial shows. (except with a different website)
Calling Web Services from Force.com
I went through what you are doing now I know how you feel.
Here is what you do:
1. have your webservice convert into Apex class.
2. write a global class which calls you apex class(webservice).
ex:
global class whatever(){
@future (outcall=true)
public static void webserviceRun(put your parameters) {
webservice.ServiceSoap dns = new webservice.ServiceSoap();
dns.webservicefunction(put your parameters); }
3. to run it: whatever.webserviceRun();
For starters, here is a great blog posting on how to call apex from a custom button.
Secondly, the Apex class(es) generated from the WSDL2Apex functionality, is just like any other Apex class. You need to instantiate the proper objects, set the proper variables or methods, then call the apex method that is your web service. Behind the scenes, Apex constructs the SOAP message and response and stores the data in the classes generated within that Apex class.
More info here and here.
Thanks for the quick replies.
That pointed me in the right direction