Solved

wcf jquery

Posted on 2014-11-11
3
131 Views
Last Modified: 2014-11-20
I want to call below service using jquery/ajax.
How can I do that? I am very new to this

Service at http://clientaccesstest.xxx.com/wcf/company/RestService/QuoteServiceJVC/GetDealerShiptoListJSon({COMPANYID},{CUSTOMERNO})
method: get
0
Comment
Question by:ITsolutionWizard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 40436974
Have you tried something like
            $.ajax({
                type: "GET", 
                datatype: "json", 
                url: "http://.....................",
                data: { 'COMPANYID':  '',  'CUSTOMERNO': ''},
                success: function(result) {
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    alert("Error(XHR): " + xhr.status + " - " + thrownError);
                }
            });

Open in new window

This will pass the parameters as regular Query string parameters. However, if you need the exact same URL (somehow) then you can construct the URL differently.
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 40437314
If the URL points to a domain other than the one your webpage is downloaded from then the responding server would need to support CORS - otherwise the request will be blocked.
0
 
LVL 4

Expert Comment

by:smeghammer
ID: 40445518
Also, if you have access to your server, then you can write a server-side proxy to call the remote service and call the proxy with your jquery code. This would also avoid cross-domain scripting problems.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question