AJAX :: Display List Of Operations Exposed From WCF Service?
May 25, 2010Is there a way I can see the list of operations that are exposed by a WCF service same as we can with a asmx service?
View 1 RepliesIs there a way I can see the list of operations that are exposed by a WCF service same as we can with a asmx service?
View 1 RepliesI've created a simple WCF service hosted by ASP.NET web site:
[Code]....
I can add references to this service as to WCF service, as to WebService.WcfTestClient application successfully recognized service and its methods.
But "Web Service Studio" [URL] can't get a list of operations... Why? How to diagnose/resolve that?
P.S. I work under VS 2008 using .NET 3.5
I have one asp.net application, in which i am using "Calling WCF Service Operations in AJAX" method. I finished my work without the service hosting in IIS. I got the correct solution. But now, i have another requirement in which i am using the WCF service which is hosted on local host iis. But in clicking the button i got one javascript error like object expected. I don't know why this happened?
My code is shown below.
<fieldset style="width: 804px" align="center">
<legend>Consuming WCF Service using Client-Side AJAX</legend>
<div align="left" style="text-align: center">
<form id="form1" runat="server">
[Code]....
I have created a webservice which is publicly exposed. This publicly created webservice can be consumed in the application But my requirement is I have to create a webservice to expose the schema and cannot be consumed directly.How to consume the web service which is not exposed directly.
View 1 RepliesI am trying to use some page methods on an aspx page. I've done this several times before in other asp.net applications and never had issues until now. I believe that maybe the issue has something to do with the methods be exposed to POST but I'm not entirely sure. Everything on the page loads correctly then once it attempts to make an ajax call rather than hitting the "test" function, the page tries to reload and the page_load method is called again. I chacked the URL string on both cases when page_load is called and both are correct. I am suspicous that there is some need to do with the web.config but I'm not sure what. The application is close to 10 years old and has been grandfathered up all the way to ASP.net 3.5. On another note, I can hit asmx functions perfectly fine its only page methods that seem not to work.
Imports System.Web.Script.Services
Imports System.Web.Services
Partial Public Class CustomDataFilter[code].....
I found a write-up somewhere about the multi-handle slider control and in the post there were the following javascript lines:
slider.add_value(value);
slider.add_drag(value);
Slider, in this case, is my slider control... but how did the person know these two methods exists? Is there an API guide somewhere for the Ajax Control Toolkit?
slider.add_valueChanged(onValueChanged);
How can i generate dropdown lists based on what has been selected in the checckbox list. Below is an example of what i need. if the user selects the options day, lotID and waferID, then 3 cascading dropdown lists should be displayed. And then a gridview displays data based on what has been chosen in the dropdown lists.
Day
LotID
SlotID
WaferID
VendorID
ToolID
LocationDetected
ProcessStep
Stage
Precipe
WaferStartMaterial
WaferStartVendor
WaferStartLot
WaferDiameterCOA
WaferMapTitle
BreakPoint
BreakpointSide
BreakpointMeasurement
I am using ASP.Net 3.5. I have fiiled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
View 1 Repliesi want to create a web service which consists of CRUD operations Create, Retrieve, Update and Delete. creating web methods on insert and update operations.
View 2 RepliesI am using asp.net 3.5. I filled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
View 3 RepliesI have seen a sample from the Author of this BlogĀ URL....this works fine but how to apply CRUDE operations & Is it possible to set CommandName/ Command Argument using JQuery in asp.net using C#?
View 1 RepliesI have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:
public String SfTest()
{
return "SF Test";
}
No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:
public List<String> GetTest()
{
List<String> list = new List<string>();
String a = "a";
list.Add(a);
String b = "b";
list.Add(b);
return list;
}
I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.
I am using reorderlist for the first time and I am having trouble getting to display like the default look I see at ajax toolkit examples webpage. Also, when I try to click on it and move any row nothing happens. I have a MSSQL table that has the following 4 fields
ToDoId (primary key, int, identity, not null)
ToDoChar (char(1), null)
ToDoDescription (varchar(50), null)
ToDoPosition (int, null)
I have the following code
[Code]....
I am building a page with databound list control. For each row I want to display piece of info retrieved from web service call. This could be time demanding so I want to render page first and retrieved additional info asynchronously and in parallel later on. Anyone has some tips how to make it? Just to have a more detailed picture it is a product list in e-shop which I want to render so customers can use it (go to product detail/add goods to shopping cart...) but meantime there will be a placeholder displaying info that informations are retrieving which after completion of call will be replaced by result data.
View 2 RepliesI have to maintain an ASP.net application in VB.Net. There is a page with a FormView bound to a ObjectDataSource. I have to add some business logic on the ItemUpdating event of this FormView. Unfortunately, some the data that I need to add this business logic is not exposed on the FormView user-interface itself, so I can not use FindControl to get the values (I could add the controls, bind them to the fields I need and set their visible property to true, but that's ugly).
So, what I would need to do is to get access to the Data Row corresponding to the currently selected item in the FormView from the code behind as it has the data I need to add my business logic code. Unfortunately, I don't manage to get access to the row.
I couldn't think of a decent title, so let me first apologize for that. I have a WebService (call it A) written for my app so I can take advantage of ASP.NET 3.5 AJAX features. I use the generated JavaScript proxy to make AJAX calls.As a side effect, WebService A is exposed for anyone to add as a reference to another project, which is great, except I don't want certain WebMethods to be available to external applications (in the same domain, BTW).So I've got two questions:Is there a way to control the exposure of WebMethods in WebService A?
If there isn't, I'm thinking I'll just add a separate WebService (B) that exposes the WebMethods I need from WebService A. But then,How can I prevent other applications from referencing WebService A while still allowing the application it originates in to access it?If that's not possible, I'm not really worried about it. The apps are all intranet-only, I just don't want the WebServices to be abused.Also, there is a similar question here already without any good anwers. The asker describes almost the same situation I'm in: [URL]
I want to use the method:
Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr)
but I don't want to use Microsoft.Web.Mvc, is this call supported in asp.net mvc now?
I am using a strongly-typed view to display a list of products, where every li-element gets a unique id:
<ul id="product-list">
<% foreach (var item in Model.Products)
{ %>
<li <%= "id="product_" + item.Id + """ %> >
<div class="item">
<%= item.Name %>
</div>
</li>
<% } %>
</ul>
Now I want to attach to the click-event of every single li-element, so that if the user clicks on a div-element, detailed product-informationen should be loaded asynchronously into a details-pane. I know how I can use jQuery to invoke an action-method ajax-style and also how to display the json-result which contains the product-details, BUT I have no idea, how I could attach the onclick-event to every single div, so that I can use the productId to load the details.
I'm trying to display a list of images in the View. I have a list of URLs (List<string>) that I'm passing from the Controller using ViewData["imageURLs"], but nowI have no idea how to generate and display them?
View 2 RepliesWhy is it that I cannot declare List in my web service using asp.net just like what I got on a certain site.
Code:
List<string> responses = new List<string>();
How is it possible to return some kind of list from a wcf serivce, this the method in my wcf service
my interface:
[Code]....
and this how my GetRootLocations looks like, It returns IQueryable, I wounder if I can maybee return Iqueryable from my svc-service?
[Code]....
I want to list all the countries in my dropdown list. where can i get all the names? from service right? How to do this?
View 4 RepliesIn the web servce I say
public List<Customer> GetCustomers()
{
PR1Entities dc = new PR1Entities();
var q = (from x in dc.Customers
select x).ToList();
return q;
}
(customer is a entity object)
Then I generate the proxy when I add the service.. and in the reference.cd it say
public wcf1.ServiceReference1.Customer[] GetCustomers() {
return base.Channel.GetCustomers();
}
WHY IS IT AN ARRAY? I asked for a List.
I have an object that contains a list of Email addresses and EmailIDs.
Code:
public class DataObjects
{
public class UserEmails
{
private string _Email;
public string Email
[Code] ....
And I populate it like this:
Code:
protected void GetEmails()
{
DataAccess da = new DataAccess(); //this is a separate Data Access class with loads of methods to access the database
List<DataObjects.UserEmails> myUserEmailsList = new List<DataObjects.UserEmails>(); //create a list of UserEmails objects
myUserEmailsList = da.getUserEmails(1); //this passes in a UserID to the data access function that returns me a list of emails for this user
myPassedList(myUserEmailsList); //I pass the list to another function just to prove the data is there and can be retrieved.
}
The last line in GetEmails passes the list to myPassedList
Code:
protected void myPassedList(IList EmailsList)
{
foreach (DataObjects.UserEmails myUserEmails in EmailsList) //loop through the list to prove it is populated etc.
{
int EmailID = myUserEmails.EmailID;
string Email = myUserEmails.Email;
}
}
Everything above works fine. Here's the question. When I am at the point where I have populated the List of UserEmails - I need to pass it to a web service for someone else to access the data.
I pass my list to a function and I can loop through it by writing:
foreach (DataObjects.UserEmails myUserEmails in EmailsList)
which is fine, for me, because my application knows what DataObjects.UserEmails means ... the people receiving the list won't. They are just getting a list.
Can they loop through the list I pass them without knowing the structure of the object in the list and just extract the data?
I'm using a web service and I want to return a list to my client. I am nearly newby at web services and I can't return a List<String> object to my client. But when i call the method it says "Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String[]'" What should I do?
View 2 Replies