This is a migrated thread and some comments may be shown as answers.

Binding to an external web service

1 Answer 62 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Fraser Tustian
Top achievements
Rank 1
Fraser Tustian asked on 05 Nov 2013, 03:58 AM
Greetings!

I'm having trouble binding the RadAutoCompleteBox to an external web service (ie one residing on a different domain).

I notice that when the AutoCompleteBox calls a local web service, it uses POST. But it seems to change that to a GET when the web service is on a different domain, which means that the call is being rejected when I try it to both an .asmx and a .svc.

I've tested this repeatedly and note that when I change from http://localdomain.com/service.asmx to http://otherdomain.com/service.asmx then Chrome's Developer Tools are reporting that the service call changes from POST to GET.

I've tried experimenting with getting the .asmx and .svc methods to support GET, but that's causing other problems, so my first approach is to see if it's possible to force a POST, which seems to work.

My questions are:

  1. Is it possible to support POST for external web service calls, or would that require JSONP (which I gather is not supported)?
  2. If not (or perhaps, either way), is there any way to connect to an external web service .asmx (for example) and - if so - could you post a small demo of it? When I try connecting to an external .asmx via GET, I'm getting an error 500 because the ASMX isn't liking the URL sent by the RadAutoCompleteBox (Request format is unrecognized for URL unexpectedly ending in '/GetResourcePickerAutoCompleteSearchResults'.)

Please note that by "external web service", I do control that web service and can set it up any way required.

Thanks!

FRASER TUSTIAN

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 07 Nov 2013, 03:27 PM
Hello Fraser,

I am afraid that the RadAutoCompleteBox can only be bound to local web services (in the same domain) using the HTTP POST method. Therefore, I would suggest you to implement the Web Service in the same domain as explained above.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
AutoCompleteBox
Asked by
Fraser Tustian
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or