I'm searching a simple Webservice test on Salesforce. I created a simple WS

global class AccountPlan {

   webservice String area; 
   webservice String region; 

   //Define an object in apex that is exposed in apex web service
   global class Plan {
      webservice String name;
      webservice Integer planNumber;
      webservice Date planningPeriod;
      webservice string planId;

   webservice static Plan createAccountPlan(Plan vPlan) {

   //A plan maps to the Account object in salesforce.com. 
   //So need to map the Plan class object to Account standard object
   Account acct = new Account();
   acct.Name = vPlan.name;
   acct.AccountNumber = String.valueOf(vPlan.planNumber);
   insert acct;
   return vPlan;

And i'm searching to call it using SoapUI (4.6.0) making a Simple soap call.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acc="http://soap.sforce.com/schemas/class/AccountPlan">
            <acc:name>Klodjan Test</acc:name>

and I'm receiving the follow feedback

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <faultstring>No service available for class 'AccountPlan'</faultstring>

Any one can help me to understand why i'm geting such error... I'm running as system adinistrator...

  • what URL are you sending the request to?
    – superfell
    Commented Jul 5, 2014 at 17:36
  • Sorry what you mean whith what URL? I imported the WSDL of the WS in Soap UI and tried to send the soap message above. I suppose that the message is send to "soap.sforce.com/schemas/class/AccountPlan"
    – Klodj_Meta
    Commented Jul 5, 2014 at 18:10
  • its HTTP, so the request goes to a URL. You should be able to see it in Soap UI somewhere. Also did you give the user access to the apex class in their profile?
    – superfell
    Commented Jul 5, 2014 at 22:31
  • Yes the class is visible to the use profile, and also the profile has the api enabled... I'm actually using as request the XML above, i send it using soap UI. I have anything to change... That is the XML generated importing the WSDL I tried to call the WS also from another Salesforce sandbox, but I recieve the same error as using Soap Ui
    – Klodj_Meta
    Commented Jul 5, 2014 at 23:05
  • 1
    Actually I made the WS public adding the class to sites, and it works properly... so I'm understanding less than before...
    – Klodj_Meta
    Commented Jul 6, 2014 at 0:48

2 Answers 2


Your code works fine for me. This is the response I got:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
        <name>Klodjan Test</name>
        <planningPeriod xsi:nil="true"/>

I would ask, do you have a namespace defined in your org? If so, you would need to modify your endpoint to include the namespace as well. The only other thought would be if you have a proxy in place to access the internet, you need to have the proxy configured correctly in SOAPUI as well.

  • My money is on namespace.
    – metadaddy
    Commented Jul 10, 2014 at 2:16
  • Hi, boh I do not understand what happened. I had installed on sandbox just the MobilePack_jQuery package. I removed it, and now works fine. After that I installed again the package to understand if was that the problem, but now works also with the package installed! so I dont understand... mystery... @JimRae I'mgiving you the bounty because looks in someway to do with what you wrote... but for me is not still clear what happened. have any sense for you ? best regards, Klodjan
    – Klodj_Meta
    Commented Jul 11, 2014 at 23:59
  • Thank you. Again, my thought is that the package you had installed somehow impacted your code. Likely, related to the inclusion of a namespace.
    – JimRae
    Commented Jul 12, 2014 at 1:38

you can check this answer which has documentation reference on how to accomplish something similar but using REST, it involves slightly more coding but it's more beautiful:) (users authenticate via the oauth2 flow, which will have to be built)

Salesforce to Salesforce API - call apex methods

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .