Return Tabular Structure From Web Service?
Jan 5, 2010
Whats the best way to return a tabular structure from an ASP.NET (2.0) web service?
It should be inter-operable with Java, Iphone App or any other platform.
EDIT: By inter-operable I mean the other technology/client should be able to consume it or deserialize it to their native types, instead of parsing response XML.
View 5 Replies
Similar Messages:
Mar 24, 2011
I have a problem to connect my ASP page with a Web Service.
I'm going to explain the situation:
VB: WEB SERVICE: service1.asmx.vb (http://localhost:1234/Service1.asmx)
[Code]....
FROM ASP page
I have not any problem to receive the string from the SECOND function
However, When I call the FIRST one I receive an error:
"Microsoft VBScript runtime error (0x800A01C2) the wrong number of arguments or invalid property value argument"
I use this object: recXML = CreateObject("Msxml2.DOMDocument")
View 2 Replies
Jul 2, 2010
I'm having a very hard time wrapping my head around this problem (it might be the heat from the summer finally arriving).
Problem:
I want the user to press a button client side which performs javascript data preparing and at last send a JSON structure to (currently a asmx webservice on) the server. The JSON structure is several levels deep.
Server side I create a PDF file which I want to send back to the user.
Goal:
The user feeling is that she presses a button and expects a PDF to return to her - either in a new window or as a download (preferrable).
Tools:
The system consists of (client side) HTML, JavaScript and ExtJS and (server side) ASP.NET.
Normally I would use an ashx handler to return a file to the client, but can I send a JSON structure to the handler and still be able to parse it correctly server side?
I am searching for the pattern to use.
View 1 Replies
Feb 3, 2010
we have console-hosted WCF Service and ASP.NET WEB Service (on IIS).
After some tough operation WCF Service must return some data(large data) to ASP.NET Web Service for next processing. I tested on small results - everything is ok.
But after testing on real data(serialized result object is near 4.5 mb) error occurs on ASP.NET Web Service (which is client in wcf-client-server communication).
Messages size are configured by next binding (on server and client):
NetTcpBinding netTcpBinding = new NetTcpBinding();
netTcpBinding.TransactionFlow = true;
netTcpBinding.SendTimeout = new TimeSpan(0, 4,0, 0);
netTcpBinding.Security.Mode = SecurityMode.None;
[code]...
View 1 Replies
Jun 10, 2010
I have a web service that originally returned a string containing text formatted as XML. I was contacted by the programmer who is going to be consuming the web service, and he asked if I could make it "just XML" and not a string. I converted the web service so that it returns an XMLDocument object, and it seems to be returning data properly. I would just like to erify, however, that the XMLDocument object is what the other programmer was referring to when he said "just XML," and that the XMLDocument can be universally consumed by any programmer, regardless of his or her programming environment.
View 4 Replies
Oct 13, 2010
I am new to web service... I have created a simple web service to add a record to sql server by passing a parameter and returns true or false once done. It the same time, I want to return the customer_account_number value created on the sql server.. so basically I want to return the true and false and one (or more) additional values.
View 5 Replies
Jul 26, 2010
I have a web service and its methods return a class which is name WSResult. WSResult has 2 properties. One of property's type is int and the other one's type is object. I want to return some different type with this second property.
[code]....
How can i pass an object which i retrieved from other web services or that i generated from my serializable classes inside M_ResultObject property ?
View 2 Replies
May 6, 2010
I want an asmx webservice with a method GetPeople() that returns the following XML (NOT a SOAP response):
<People>
<Person>
<FirstName>Sara</FirstName>
<LastName>Smith</LastName>
</Person>
<Person>
<FirstName>Bill</FirstName>
<LastName>Wilson</LastName>
</Person>
</People>
View 4 Replies
Dec 5, 2010
I have a web service method which i'd like to return multiple rows from a datatable.
I am familar with returning values from web service methods but not multiple rows from a datatable. What is the best way to go about doing this? Do I need to return an array or list<>?
My code method is setup like this.
[WebMethod]
public void UpdateBold(int count, float lat, float lng)
{
DataTable dt = new Gallery().DisplayNearestByLatLong(count, lat, lng);
// return code here
}
View 2 Replies
Mar 26, 2010
In 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.
View 4 Replies
Jun 24, 2010
i have 10 employee objects.I want to return these 10 object from a web method to web service client.
View 6 Replies
Feb 14, 2011
I have a web service that is declared like this.
[Code]....
Function inside the service simply returns string separated by some delimitor. This string is then used by JS function to assign to a jQuery datatable. Is there a maximum limit on size of this string? I have about 2000 rows with 6 columns each. I get an error (failed handle) when I return them all. But if I do only top 500, it works fine.Is there any size limitation?
[WebService(Namespace = "http://tempuri.org/")]
View 8 Replies
Sep 10, 2010
Just ramping up on JSON and JQuery and returning data to a ASP.NET web page from a web service using Ajax. The JQuery part is pretty straight-forward. However, when trying to return JSON formatted data instead of XML from a 2.0 web service, I'm stuck. The web service does have the System.Web.Script.Services.ScriptService attribute, so I can hit it via JavaScript; however, the web service always...always...returns data in XML format, no matter if I explicitly say I want JSON as the datatype in my JQuery code. So I don't know if this is an issue with the web service or the JQuery code. I posted this here, but realize that the category could be incorrect depending on where the issue is. Is there no way to return JSON data from a 2.0 web service? It's a production web service, so I can't change the code unfortunately.
View 3 Replies
Sep 28, 2010
I am consuming wcf Data service in client application following way, when i execute SP, some of the columns are repeating with same value,
DataServiceContext context1 = new DataServiceContext(new Uri(serviceURL));
string strparam = "emailid='" + paramemail + "'& LocalTitle='" + paramtitle + "'& ColorGrouping='" + paramcolor + "'";
string url = serviceURL + "GetSearchResult?" + strparam; [code]....
View 3 Replies
Aug 10, 2010
After much head scratching as to why my returned Json string is breaking JSON.parse, I have realized that it is the returned dates that it doesn't like.
.net property:-
[code]....
View 2 Replies
Feb 21, 2010
I have a webservice - called MyCompany.WebService1
I reference this using a web reference in my ASP.net web application.
Theres a method called "GetDeal" in this web service, that returns a "Deal" Object.
The deal object currently looks (for example) like this:
[code]....
This class is in a different assembly: MyCompany.Model
The web service references this assembly.
In my web app, I can call the GetDeal method. This returns Service1.Deal (service1 is just the name of the web reference)
I can access both properties above. I have now changed the Deal class, and added a couple more properties.
However, I can't see these new properties in my web application. I've updated the web service in the web application. I rebuilt the web service several times, tried removing the MyCompany.Model reference and re-addding it etc...
I can't figure out what has changed... This was working - I have changed the model before, and it's updated the reference correctly...
View 2 Replies
Feb 6, 2011
I have number of files stored in a folder.
I want to write a wcf service to ruturn a list of filenames based on the text typed in a text box.
The structure of the method i need is something like this :
[Code]....
The requirments is to return only the filenames that starts with the typed text. Only the file name part is required not the full path.
View 3 Replies
Apr 30, 2010
I have a webmethod that has three parameters:
public AuthenticationResult Authenticate(Enum type, string userName, string password) But the problem I had is that if a null/invalid enum is entered for the type variable it throws an error message.
So the obvious solution is to use a string/int instead but I am cannot do this as current users already use the existing webmethod.
So i was thinking:
public AuthenticationResult Authenticate(object type, string userName, string password) and handling the casting myself but the problem I had with this is that now my users do not have access to the Enum type.
So my question is can I publish the enum type without having it as a parameter/return value? Allow the client to access the Enum so they can pass it into the method. Would using a method that returned a type that was my enum work? Or is there a way to catch this custom error: (I dont think so as it appears to be on the client end when converting Enum to xml). The error is: (System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: Instance validation error: '45465' is not a valid value for Enum.)
View 1 Replies
Jun 2, 2010
I have site that I need to have a vendor send an Http Post to us, using querystring parameters, then I have to look up some data and return a few results and parameters back to them. Can this be done using CLASSIC ASP? I ask this because I am still in a learning phase with .NET and have limited resources available to set up a web service.
View 2 Replies
Jan 3, 2010
I just hit the following issue: I am calling a web service that returns a serialized JSON object let's say: __type, FirstName, LastName (.net object Person with properties FirstName and LastName). __type's value is Test.Person
I have created a JS object using Type.registerNameSpace/registerClass called Demo.Person and it is registered on the page using the ScriptManager. Everything is working fine; I am able to get data from the server on the call back.
Is it possible to make the returned object from the web service be an instance of the declared JavaScript Demo.Person class? The idea would be to call a method like result.getFullName() on the client side without having to copy all the properties. This is just a simple scenario for more complex objects.
View 3 Replies
Mar 17, 2010
I am using JavaScript to call a web service. The JS is correctly receiving and passing the web service information.
At the moment, the web service returns a country name as a string to a JavaScript alert pop up box as follows:
[Code]....
I want to change this so that web service returns the country name to a label inside an insert item template of a form view.
Is there a way to pass in the label variable to the OnComplete function signature and still account for the variable args?, such as:
[Code]....
View 10 Replies
Mar 3, 2011
How to implement multisorting on tabular data?
View 1 Replies
Apr 21, 2010
Just another day i found myself writing code to show data on the UI. I am again using DataGrid/GridView (ASP.NET), User Id as link button (clickable) to redirect user to another page. User having hard time to find where to click(Though the link has underline and hand pointer as usual on hover) just another common table like structure Following are the columns for example, User ID (Link button), User Name, First Name, Last Name, Date Of Birth Now i would like to make it better form the usability point of view. Can someone suggest a good link, example or suggestions to make it better.
View 1 Replies
Sep 21, 2010
I'm working on a small standalone .NET app needs to refer to some tabular data and its only just selects and at most these tables have 250 records. Previously developers have used a SQL server database. Would I get a performance advantage if I simply convert the table data to XML and read from that? Also is there any kind of performance advantage over keeping database files in the App_Data folder for ASP.NET and attaching them dynamically as opposed to managing them separately? And this is probably a silly question, but if I do it that way does it mean that I don't have to install SQL server separately on the client's computer?
View 2 Replies
May 18, 2010
Does anyone have a Tabular create and details MVC 2 Template that i can pop into my project and use, instead of the ugly linear templates that come out of the box in MVC?
Are there free MVC view templates anywhere on the internet?
View 3 Replies