Salesforce 无法访问使用Apex在force.com平台上构建的RESTful服务

Salesforce 无法访问使用Apex在force.com平台上构建的RESTful服务,salesforce,apex-code,visualforce,force.com,Salesforce,Apex Code,Visualforce,Force.com,我已经使用Apex在Force.com上创建了一个RESTful服务,下面是我的代码 @RestResource(urlMapping='/helloWorld/*') global with sharing class RestWebservice { @HttpGet global static String helloWorld(){ return 'HelloWorld'; } } 我正在尝试使用以下url访问我的RESTful服务: 作为回应,我得到: HT

我已经使用Apex在Force.com上创建了一个RESTful服务,下面是我的代码

@RestResource(urlMapping='/helloWorld/*')
global with sharing class RestWebservice {

  @HttpGet
  global static String helloWorld(){
    return 'HelloWorld';
  }

}
我正在尝试使用以下url访问我的RESTful服务:

作为回应,我得到:

HTTP/1.1 404 Not Found
Date:Thu, 18 Jul 2013 07:35:44 GMT
Content-Length:96
Content-Type:application/json;charset=UTF-8

[
  {
    "message": "Could not find a match for URL /helloWorld/",
    "errorCode": "NOT_FOUND"
  }
]
下面是我的班级快照:

我如何解决这个问题?非常感谢您的帮助。

当您在末尾添加*(星号)时,您需要编写一个Id或其他内容,而不是本文所述的内容。 我想你想要完成的事情更像这样

 @RestResource(urlMapping='/helloWorld')
然后打这个电话

curl -H "Authorization: Bearer sessionId"  "https://instance.salesforce.com/services/apexrest/helloWorld"

我尝试了这个iam,得到了与“找不到URL/helloWorld的匹配项”相同的错误。如果在helloWorld/后加上最后一个斜杠,请注意。仔细检查拼写,注意字符大小写。确保该类已编译并存在于Salesforce中(请尝试从web界面访问它以确保)。最后,它应该工作,似乎你做的每件事都是正确的。如果仍然没有通过,请重新发布你的新代码。我有一个类似的问题。我也无法让hello world应用程序运行。