Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

jquery ajax

Posted on 2015-01-22
3
Medium Priority
?
275 Views
Last Modified: 2015-01-30
http://clientaccesstest.abc.com/wcf/orders/Service.svc?wsdl

I have service like above.  It is working and I can see GetData web service name.

1. However, when I type below, it is not working now?

http://clientaccesstest.abc.com/wcf/orders/Service.svc/GetData

2. For some reasons, I can't see the source codes from the service but I do want to return default value, no matter what it is. Can you show me sample codes in jquery/ajax how to do that?

Thanks
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 44

Expert Comment

by:Rainer Jeschor
ID: 40566295
Hi,
that depends a lot on how the WCF service is implemented.
Normally your jQuery AJAX call is a post (and not a get which is the behaviour when opening the service in the browser).
An good example can be found at the C# Corner site - this handles both sides (service and client):
http://www.c-sharpcorner.com/UploadFile/rohatash/calling-wcf-services-using-jquery/

So are you developing the service? If yes, can you post / attach your source code?

HTH
Rainer
0
 
LVL 34

Expert Comment

by:Slick812
ID: 40567007
Greetings   ITsolutionWizard, , From the web addresses I have used in server side coding , , IF the addy ends in -
         wsdl
then this is a "Web Services Description Language" definition in an XML format, that describes the NameSpaces and the access points (variables, methods) for a sever dispensed SOAP, two-way connection, communication., Since the SOAP transport connection is a very specialized and finicky code method exchange , you almost always need to get EXAMPLE code from the Service providers developers API documentation.
0
 
LVL 22

Accepted Solution

by:
ambience earned 2000 total points
ID: 40567026
You haven't explained the nature of errors, but still WSDL means this webservice is SOAP-based and that means regular HTTP/REST/JSON clients would simply not work.

See this jQuery plugin for making SOAP calls to webservices: https://github.com/doedje/jquery.soap

$.soap({
    url: 'http://clientaccesstest.abc.com/wcf/orders/Service.svc',
    method: 'GetData',

...
});

Open in new window


Also keep in mind issues like cross-domain scripting if this service exists in a different domain. Extra work might be needed to enable Cross-domain calls if needed.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

609 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