Hi,
How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put
[Serializable] on imported classes?
For example, i fin your web service you use a class:
[Serializable]
class Data
{
}
and in your method you return this data, the automatically generated client
side proxy will not have the [Serializable]
attribute set. Is there anything that controls this behavior? 9 3801
no, I don't think so.
what is the problem you are trying to solve?
Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl... Hi,
How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put [Serializable] on imported classes? For example, i fin your web service you use a class: [Serializable] class Data { }
and in your method you return this data, the automatically generated
client side proxy will not have the [Serializable] attribute set. Is there anything that controls this behavior?
The problem is that these classes are not Serializable across AppDomains
(Although XmlSerializer can serialize them just fine). And creating a class
that derives from these classes doesn't help either. Because even if you
mark derived class to be [Serializable] remoting this type still fails
because base class is not [Serializable]. So, one is forced into creating
exact duplicate classes with same fields and then copying data.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl... no, I don't think so. what is the problem you are trying to solve? Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message news:e2**************@TK2MSFTNGP09.phx.gbl... Hi,
How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put [Serializable] on imported classes? For example, i fin your web service you use a class: [Serializable] class Data { }
and in your method you return this data, the automatically generated client side proxy will not have the [Serializable] attribute set. Is there anything that controls this behavior?
what is the problem you are trying to solve?
can you just modify the generated code to include the attribute you want?
-D
"Developer" <lf@nospam.nospam> wrote in message
news:eu***************@TK2MSFTNGP10.phx.gbl... The problem is that these classes are not Serializable across AppDomains (Although XmlSerializer can serialize them just fine). And creating a class that derives from these classes doesn't help either. Because even if you mark derived class to be [Serializable] remoting this type still fails because base class is not [Serializable]. So, one is forced into creating exact duplicate classes with same fields and then copying data.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:ea**************@TK2MSFTNGP12.phx.gbl... no, I don't think so. what is the problem you are trying to solve? Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message news:e2**************@TK2MSFTNGP09.phx.gbl... Hi,
How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put [Serializable] on imported classes? For example, i fin your web service you use a class: [Serializable] class Data { }
and in your method you return this data, the automatically generated client side proxy will not have the [Serializable] attribute set. Is there anything that controls this behavior?
> can you just modify the generated code to include the attribute you want?
Of course, but it will get reset with next update of the file. What's the
reason for proxy generators not to include [Serialzable] attribute or to
provide some control over it.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:O2**************@TK2MSFTNGP09.phx.gbl... what is the problem you are trying to solve?
can you just modify the generated code to include the attribute you want?
-D
"Developer" <lf@nospam.nospam> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl... The problem is that these classes are not Serializable across AppDomains (Although XmlSerializer can serialize them just fine). And creating a class that derives from these classes doesn't help either. Because even if you mark derived class to be [Serializable] remoting this type still fails because base class is not [Serializable]. So, one is forced into creating exact duplicate classes with same fields and then copying data.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:ea**************@TK2MSFTNGP12.phx.gbl... no, I don't think so. what is the problem you are trying to solve? Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message news:e2**************@TK2MSFTNGP09.phx.gbl... Hi,
How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put [Serializable] on imported classes? For example, i fin your web service you use a class: [Serializable] class Data { }
and in your method you return this data, the automatically generated client side proxy will not have the [Serializable] attribute set. Is there anything that controls this behavior?
I don't know the answer to those questions.
sorry.
"Developer" <lf@nospam.nospam> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl... can you just modify the generated code to include the attribute you want?
Of course, but it will get reset with next update of the file. What's the reason for proxy generators not to include [Serialzable] attribute or to provide some control over it.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:O2**************@TK2MSFTNGP09.phx.gbl... what is the problem you are trying to solve?
can you just modify the generated code to include the attribute you want?
-D
"Developer" <lf@nospam.nospam> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl... The problem is that these classes are not Serializable across AppDomains (Although XmlSerializer can serialize them just fine). And creating a class that derives from these classes doesn't help either. Because even if you mark derived class to be [Serializable] remoting this type still fails because base class is not [Serializable]. So, one is forced into creating exact duplicate classes with same fields and then copying data.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:ea**************@TK2MSFTNGP12.phx.gbl... no, I don't think so. what is the problem you are trying to solve? Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message news:e2**************@TK2MSFTNGP09.phx.gbl... > Hi, > > How can one tell wsdl.exe/VS.NET web service proxy generatioon to to > put > [Serializable] on imported classes? > For example, i fin your web service you use a class: > [Serializable] > class Data > { > } > > and in your method you return this data, the automatically generated client > side proxy will not have the [Serializable] > attribute set. Is there anything that controls this behavior? > > > >
Why don't you inherit from the proxy class and use attributes in this class?
"Developer" wrote: can you just modify the generated code to include the attribute you want?
Of course, but it will get reset with next update of the file. What's the reason for proxy generators not to include [Serialzable] attribute or to provide some control over it.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:O2**************@TK2MSFTNGP09.phx.gbl... what is the problem you are trying to solve?
can you just modify the generated code to include the attribute you want?
-D
"Developer" <lf@nospam.nospam> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl... The problem is that these classes are not Serializable across AppDomains (Although XmlSerializer can serialize them just fine). And creating a class that derives from these classes doesn't help either. Because even if you mark derived class to be [Serializable] remoting this type still fails because base class is not [Serializable]. So, one is forced into creating exact duplicate classes with same fields and then copying data.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:ea**************@TK2MSFTNGP12.phx.gbl... no, I don't think so. what is the problem you are trying to solve? Are there ill-effects from this?
-D
"Developer" <lf@nospam.nospam> wrote in message news:e2**************@TK2MSFTNGP09.phx.gbl... > Hi, > > How can one tell wsdl.exe/VS.NET web service proxy generatioon to to > put > [Serializable] on imported classes? > For example, i fin your web service you use a class: > [Serializable] > class Data > { > } > > and in your method you return this data, the automatically generated client > side proxy will not have the [Serializable] > attribute set. Is there anything that controls this behavior? > > > >
Al, Why don't you inherit from the proxy class and use attributes in this
class?
That wouldn't work. He probably needs the Serializable attribute on the
message classes, not on the proxy itself.
--
Tomas Restrepo to****@mvps.org
I need Serializable attribute on the various structs that are pulled in with
web service proxy.
i.e.:
public class Service1 : System.Web.Services.Protocols.SoapHttpClientProtoc ol
{}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespac e=http://tempuri.org/)]
<<<-------------I want [Serializable] here
public class Data {}
And you can't do the following when remoting the type:
[Serializable]
class Data2: Data{}
Not going to work.
"Al" <Al@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com... Why don't you inherit from the proxy class and use attributes in this class?
"Developer" wrote:
> can you just modify the generated code to include the attribute you > want?
Of course, but it will get reset with next update of the file. What's the reason for proxy generators not to include [Serialzable] attribute or to provide some control over it.
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message news:O2**************@TK2MSFTNGP09.phx.gbl... > what is the problem you are trying to solve? > > can you just modify the generated code to include the attribute you > want? > > -D > > "Developer" <lf@nospam.nospam> wrote in message > news:eu***************@TK2MSFTNGP10.phx.gbl... >> The problem is that these classes are not Serializable across >> AppDomains >> (Although XmlSerializer can serialize them just fine). And creating a >> class >> that derives from these classes doesn't help either. Because even if >> you >> mark derived class to be [Serializable] remoting this type still fails >> because base class is not [Serializable]. So, one is forced into >> creating >> exact duplicate classes with same fields and then copying data. >> >> "Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in >> message >> news:ea**************@TK2MSFTNGP12.phx.gbl... >>> no, I don't think so. >>> what is the problem you are trying to solve? >>> Are there ill-effects from this? >>> >>> -D >>> >>> "Developer" <lf@nospam.nospam> wrote in message >>> news:e2**************@TK2MSFTNGP09.phx.gbl... >>>> Hi, >>>> >>>> How can one tell wsdl.exe/VS.NET web service proxy generatioon to to >>>> put >>>> [Serializable] on imported classes? >>>> For example, i fin your web service you use a class: >>>> [Serializable] >>>> class Data >>>> { >>>> } >>>> >>>> and in your method you return this data, the automatically generated >>> client >>>> side proxy will not have the [Serializable] >>>> attribute set. Is there anything that controls this behavior? >>>> >>>> >>>> >>>> >>> >>> >> >> >> > >
> I need Serializable attribute on the various structs that are pulled in
with web service proxy. i.e.: public class Service1 :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {}
/// <remarks/> [System.Xml.Serialization.XmlTypeAttribute(Namespac e=http://tempuri.org/)] <<<-------------I want [Serializable] here public class Data {}
I'm happy to report that the latest version of WSContract First from
Christian Weyer can do this for you :) http://weblogs.asp.net/cweyer/archiv...30/222725.aspx
--
Tomas Restrepo to****@mvps.org This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Erik Klein |
last post by:
I have a WebService whose WSDL contains the following snippet:
<complexType abstract="true" name="Type">
<sequence>
<element name="localId" nillable="true" type="xsd:string"/>
<element...
|
by: joewhitehair |
last post by:
Using the XSD.exe tool, I created a number of classes from my XSD file.
When I generate the WSDL for my web service, the schema does not have
the proper Occurance constraints for the attributes. In...
|
by: Benne Smith |
last post by:
hi all,
i have a webservice with some public classes in it. These classes are
visible from my proxy class, generated from wsdl.exe. The problem is, that
when i look in the generated proxy class,...
|
by: Jigar.Patel |
last post by:
I have simple remoting server exposing following simple method. When I try to
add webreference to this server in another project by serveraddresss?wsdl,
it gives me following error:
Custom tool...
|
by: Jigar.Patel |
last post by:
I have simple remoting server exposing following simple method. When I try to
add webreference to this server in another project,
it gives me following error:
Custom tool error: Unable to import...
|
by: bbalet.free.fr |
last post by:
The “Add Web Reference” Visual tool generates bad classes (from WSDL schema)
for ComplexType containing only one element (wsdl.exe and wseWsdl3.exe tools
have the same problem) : if a...
|
by: Francisco Garcia |
last post by:
Hi!
I have developed both a Web Service and a client application, and they work
fine.
All classes used in the Web Service interface are declared in an assembly
named Entities, that is...
|
by: Arpan |
last post by:
Web Services make use of proxy classes whose methods & properties are
accessed in exactly the same way as how a normal class' methods &
properties are accessed. So what for does ASP.NET generate...
|
by: shreya |
last post by:
Hi,
I am new to wsdl.I am using weblogic server to generate a wsdl.
I am writting my own inner abstract classes using schemas and then generating a wsdl file.In my schema I have a value as...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |