Type re-definitions in WebServices + Auto Generated Proxy Stubs

A

Arthur Mnev

I'm a little confused about autogenerated stub for web service (If i
create manual one everything works great) the automatic one creates
XML structures (object stubs) corresponding to messages/schema used to
transport XML; However the objects that I really need to deserialize
data to are far more complex then what XML represents.


to bring in a simple example:
class AComplexClass
{
private int v1; private int v2;
public string v3
{
get { v1.ToString() + "::" + v2.ToString(); }
set { parse INT::INT string and place it into v1 & v2 };
}

during serialization Web Service represents this object as
AutoComplexClass
<v3 type=string>string data</v3>


When WSDL is transformed into Proxy Class proxy class will contain sub
Class Called AutoComplexClass and the only propery of it wlll be v3.

This is perfectly legal for as long as only one side knows what the
object really is. In my case I have a library distributed to both, a
web service and a client; therefore both a server and a client have
access to the object and web service is only a way to deliver data.

The question I guess is: is there anything special about proxy stubs
and are they required by some internal mechanism to verify incoming
data or can i just get rid of them and reference my real objects (this
is what i have been doing thus far)

part two of a question is there any way tell AutoGenerating process to
use my REAL object types instad of creating its own half backed stubs
when creating all WebService calls? Manually editing 200 functions is
quite annoying:)

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top