Solved

jquery ajax

Posted on 2015-01-22
3
253 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 500 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
output in HTML in Powershell 5 55
CSS Formatting Getting Stripped 1 30
Why does my submit button remain disabled 3 30
Why is my select returning NaN 18 18
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

738 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