0

I have no idea of the URL to use for a call to WCF service method using jQuery. I'm new to WCF.

url:'http://localhost:8732/Design_Time_Addresses/RnDServiceLibrary/Service1/mex/SetJSON',

The above is not working.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Darshana
  • 2,462
  • 6
  • 28
  • 54
  • what error are you getting can you post that using firebug console or developer tools error console is it 404 error – Devjosh Mar 21 '12 at 07:42
  • "NetworkError: 400 Bad Request - http://localhost:8732/Design_Time_Addresses/RnDServiceLibrary/Service1/mex/SetJSON?undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined&undefined=undefined" – Darshana Mar 21 '12 at 07:44
  • @ Darshana check this post and see selected answer http://stackoverflow.com/questions/323551/http-bad-request-error-when-requesting-a-wcf-service-contract and also try browsing your wcf service in browser directly using this path and check if it's there – Devjosh Mar 21 '12 at 07:47

2 Answers2

2

Use service url/method where method is used in service. Url="http://localhost:52136/Service1.svc/GetCustomer"; where GetCustomer is method that is created you in you wcf service.

Please Check this link also Wcf Service Jquery

Rony SP
  • 2,618
  • 15
  • 16
0

I first host the wcf service in localhost and then I use this url http://localhost:81/Test/Service.svc/MethodName?parameterName=" + "{ \"pl\":" + mylist + " }"

Darshana
  • 2,462
  • 6
  • 28
  • 54