Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:43:04+00:00 2026-06-07T05:43:04+00:00

I have a RESTful webservice which i can successfully ping on the published server

  • 0

I have a RESTful webservice which i can successfully ping on the published server to return test as a demo. I Tried to then put some code in a method to call, but it seems to fail on the AJAX call. I dont know where the error is, as i dont the server running on localhost. I know the webservice is being called correctly as syntax is the same as test in design

I had a similar way i was doing it, but it wasnt RESTful, so i migrated all the data accordingly, so i know the code inside the method works correctly.

Below Is posted the AJAX call:

$.ajax({
            type: 'GET',
            url: WEBSERVICE_URL + 'getWebFormDesignFieldContents',
            data: JSON.stringify({
                'pr_id': LOGGED_IN_PR_ID,
                'fe_name': opts,
                '_count': 200,  //this might need to be adjusted slightly.  I may want to make it more OR less.
                '_also_search_fe_desc': true,
                'opts': opts
            }),
            contentType: 'application/json; charset=utf-8',
            dataType: 'jsonp',
            success: function (result) {
                //success
                var r = $(result.getWebFormDesignFieldContentsResult)[0];
                var div = $("<div class='modal'>").html(r.d);
                /*
                var d = document.createElement("div");
                d.className = "modal";
                d.appendChild(r[0]);
                */
                $("div.modal").replaceWith(div);
                $("div.modal #queryInput").val(opts);
                $("div.modal").css({
                    top: $(window).height() / 2 - $("div.modal").height() / 2,
                    left: $(window).width() / 2 - $("div.modal").width() / 2
                });
                $("div.modal").fadeIn();
            },
            error: function (result) {
                //error
                //alert("Error: "+result.statusText);
                alert(result.statusText);

                //$("div.modal").replaceWith($("<div class = 'modal'>").html(result.responseText));
                //$("div.modal").fadeIn();
                $("div.overlay").fadeOut();
            }
        });

Webservice Interface:

[OperationContract]
    [WebInvoke(Method = "POST",
        ResponseFormat = WebMessageFormat.Json,
        BodyStyle = WebMessageBodyStyle.Wrapped,
        UriTemplate = "getWebFormDesignFieldContents")]
    string getWebFormDesignFieldContents(WebFormFieldClass inputData);

Webservice Function

public string getWebFormDesignFieldContents(string pr_id, string fe_name, string _count, string _also_search_fe_desc, string opts)
    {
       int count = Convert.ToInt32(_count);
       bool also_search_fe_desc = Convert.ToBoolean(_also_search_fe_desc);
       ...
    }

 [DataContract]
public class WebFormFieldClass
{
    [DataMember]
    public string pr_id { get; set; }
    [DataMember]
    public string fe_name { get; set; }
    [DataMember]
    public int count { get; set; }
    [DataMember]
    public string also_search_fe_desc { get; set; }
    [DataMember]
    public string opts { get; set; }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:43:05+00:00Added an answer on June 7, 2026 at 5:43 am

    This issue is coming from the browser, or so it seems. All this information was correct, but the errors and issues i was getting are from IE and its hate for ajax. Another issue with this, is that we had to add a bunch of references to the the ASP to allow the program to handle information from the target successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a restful webservice which receives some structured data which is put straight
I have a restful web service which can deal with DTOs in json format
I have a RESTful web service which runs on Glassfish Application Server. When I
I have a RESTFULL type of web service which can return both xml and
I have a Restful web service. Reservation room can change. Which URI is better
I have a RESTful webservice which receives JSON and it deserialises it into a
I currently have a RESTful webservice which recognises a client via it's session. I
I have a ReSTful web service which needs to parse locale-sensitive data from the
I have created a RESTful PHP web service using Lithium which contains comments, each
I have a DESKTOP application which interacts with a web service through their RESTful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.