Which is the best and convenient way to send/retrun custom types to/from Web
Service? Serialization?
The web service is not to be public accessible, it's a part of n-tier
application.
TIA 20 1230
Nikolay,
In my opinion it is just using it, most serialization is done for you by
VSNet. When not as with an arraylist you have to decide what you do, however
it will always be serialized by VSNet to XML.
Just my thought,
Cor
"Nikolay Petrov" Which is the best and convenient way to send/retrun custom types to/from Web Service? Serialization?
The web service is not to be public accessible, it's a part of n-tier application.
TIA
Cor Ligthert wrote: Nikolay,
In my opinion it is just using it, most serialization is done for you by VSNet. When not as with an arraylist you have to decide what you do, however it will always be serialized by VSNet to XML.
Just my thought,
Cor
I have tried returning some custom type from a webservice. Some data
did get through, but in a *generated* class that only has *some* resemblance
to the original type. Do you know if there is some way to have the calling
side use the same type (apart from creating that "by hand" and copying
all values)?
Hans Kesting
"Nikolay Petrov"
Which is the best and convenient way to send/retrun custom types to/from Web Service? Serialization?
The web service is not to be public accessible, it's a part of n-tier application.
TIA
What I need mostly is to return data with different types as strings,
integers an so, currently I don't need to return classes or something like
them.
Is it appropriate to use hash tables?
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl... Cor Ligthert wrote: Nikolay,
In my opinion it is just using it, most serialization is done for you by VSNet. When not as with an arraylist you have to decide what you do, however it will always be serialized by VSNet to XML.
Just my thought,
Cor
I have tried returning some custom type from a webservice. Some data did get through, but in a *generated* class that only has *some* resemblance to the original type. Do you know if there is some way to have the calling side use the same type (apart from creating that "by hand" and copying all values)?
Hans Kesting
"Nikolay Petrov"
Which is the best and convenient way to send/retrun custom types to/from Web Service? Serialization?
The web service is not to be public accessible, it's a part of n-tier application.
TIA
Nikolay Petrov wrote: What I need mostly is to return data with different types as strings, integers an so, currently I don't need to return classes or something like them.
Is it appropriate to use hash tables?
Do you mean you want to have a webservice method that returns an int
(and another that returns a string)? That is easy, just declare the method in
the asmx as returning an int. When you call this you will get an integer back.
For these basic types serialization issues are handled automatically by the
system, you don't need to do anything special.
Hans Kesting
Hans,
Did you made those classes <serializable >?
Cor
Nikolay,
When you need a table, than in my opinion is the most easy one to use the
dataset.
Everything is than done for you.
I hope this helps,
Cor
"Nikolay Petrov" What I need mostly is to return data with different types as strings, integers an so, currently I don't need to return classes or something like them.
Is it appropriate to use hash tables?
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message news:Oj******** ******@TK2MSFTN GP12.phx.gbl... Cor Ligthert wrote: Nikolay,
In my opinion it is just using it, most serialization is done for you by VSNet. When not as with an arraylist you have to decide what you do, however it will always be serialized by VSNet to XML.
Just my thought,
Cor
I have tried returning some custom type from a webservice. Some data did get through, but in a *generated* class that only has *some* resemblance to the original type. Do you know if there is some way to have the calling side use the same type (apart from creating that "by hand" and copying all values)?
Hans Kesting
"Nikolay Petrov"
Which is the best and convenient way to send/retrun custom types to/from Web Service? Serialization?
The web service is not to be public accessible, it's a part of n-tier application.
TIA
No I need to return both in one call.
As you would declare structure
Structure Type
Dim Digit as Integer
Dim Text as String
End Structure
I want to return something similar, no need to be structure just I need to
return strings, integers, booleans as a whole.
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Nikolay Petrov wrote: What I need mostly is to return data with different types as strings, integers an so, currently I don't need to return classes or something like them.
Is it appropriate to use hash tables?
Do you mean you want to have a webservice method that returns an int (and another that returns a string)? That is easy, just declare the method in the asmx as returning an int. When you call this you will get an integer back. For these basic types serialization issues are handled automatically by the system, you don't need to do anything special.
Hans Kesting
Nikolay Petrov wrote: No I need to return both in one call.
As you would declare structure
Structure Type Dim Digit as Integer Dim Text as String End Structure
I want to return something similar, no need to be structure just I need to return strings, integers, booleans as a whole.
So you want to return a single value, but you can't declare as (for ex.) "string"
because it also can be int, bool, ...
Would it work to just declare it as "object"? The receiving side should
then check the type ("is bool", "is int", .. (in C# syntax) ) to handle it further.
Hans Kesting
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Nikolay Petrov wrote: What I need mostly is to return data with different types as strings, integers an so, currently I don't need to return classes or something like them.
Is it appropriate to use hash tables?
Do you mean you want to have a webservice method that returns an int (and another that returns a string)? That is easy, just declare the method in the asmx as returning an int. When you call this you will get an integer back. For these basic types serialization issues are handled automatically by the system, you don't need to do anything special.
Hans Kesting
Nikolay,
As advice do not use a structure for this just a serializable class.
<Serializable() > Public Class Myfields
Public fielda As Integer
Public fieldb As String
End Class
In this message is a sample I made some months ago http://groups-beta.google.com/group/...4488e73599d6fa
I hope this helps?
Cor
"Nikolay Petrov" <jo************ **@mail.bg>
.. No I need to return both in one call.
As you would declare structure
Structure Type Dim Digit as Integer Dim Text as String End Structure
I want to return something similar, no need to be structure just I need to return strings, integers, booleans as a whole.
"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Nikolay Petrov wrote: What I need mostly is to return data with different types as strings, integers an so, currently I don't need to return classes or something like them.
Is it appropriate to use hash tables?
Do you mean you want to have a webservice method that returns an int (and another that returns a string)? That is easy, just declare the method in the asmx as returning an int. When you call this you will get an integer back. For these basic types serialization issues are handled automatically by the system, you don't need to do anything special.
Hans Kesting
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: CrispinH |
last post by:
I'm building an application generator and within it a user can create a new
property (for the class they are building). I'd like then to offer a list of
Types - built-in and custom - for this new property to be shown in a combo
box ie similar to Intellisense.
How do you enumerate the Types available? Are their mechanisms for filtering
the list to show only (say) primitive types or custom types or reference
types?
TIA
|
by: mtv |
last post by:
Hi all,
I have the following code:
================================
Webservice side:
public class MyWS: WebService
{
private myLib.DataObject curDataObject;
|
by: kbs |
last post by:
Hi,
I'm looking for some good examples that illustrate how to code a web service
that exposes a custom collection so that the properties of the collection are
accessible on the client without having to do a httpwebreqeust call.
|
by: Kris |
last post by:
I read a column on sharing types between web services at
http://msdn.microsoft.com/library/en-us/dnservice/html/service07162002.asp
Sharing types can be acheived, similar to what described here in this
article but little defferently, by defining these custom types in a seperate
assembly and importing that assembly at the top of the proxy generated and
then manullay deleting the redefined custom types in each proxy class.
But still this...
|
by: Noel |
last post by:
Hello,
I'm currently developing a web service that retrieves data from an employee
table. I would like to send and retrieve a custom employee class to/from the
webservice. I have currently coded the custom employee class and have built
it as a separate library (employee.dll). This employee.dll is being
referenced by both the web service and the windows application.
I face the following problem when I send this class to the webservice.
| |
by: John Grandy |
last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled
with instances of a custom class.
The custom class is defined in a Class Library that is included in the
web-service project.
The same class lib is included in the ASP.NET Web Application that calls the
web-method
I can successfully call the web-method with
|
by: gbanister |
last post by:
I'd like to repost a message that I found in this group almost one year
ago, because it's the exact problem I'm in and there was no solution
offered to this post last year. (note: I was not the original author
of the below post)
I have similar issue sharing types between the web services, and also
the
client consuming those web services. I have all my custom types defined
in a
seperate assembly and I am using those types as parameter/...
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I have worked with application settings in VS2005 and C# for awhile, but
usually with standard types. I have been trying to store a custom
container/class/type in an application setting and I have seen erratic
results. I am aware of one known defect where user classes do not show up in
the list of types on the Property/Settings page in the visual designer and I
am wondering if I am encountering some other peculiar issue, or if there are...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |