472,992 Members | 3,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

IXmlSerializable GetSchema Bug in wsdl.exe, Help ?

I have a skill object that implements the XmlSerializable interface
Implementing the getschema gives me some unwanted generations towards
the wsdl.exe Reference.cs generation.

skill is an object with properties name and code

public System.Xml.Schema.XmlSchema GetSchema()
string _namespace;
System.Xml.Schema.XmlSchema output;
System.Xml.Schema.XmlSchemaElement skill, name, code;
System.Xml.Schema.XmlSchemaComplexType skillType;
System.Xml.Schema.XmlSchemaSequence sequence;

_namespace = "http://tempuri.org/Skill";
output = new System.Xml.Schema.XmlSchema();
output.Namespaces.Add("xsd", "http://www.w3.org/2001/XMLSchema");
output.Namespaces.Add("tns", _namespace);
output.Id = "SkillShemaID";
output.TargetNamespace = _namespace;
skill = new System.Xml.Schema.XmlSchemaElement();
skill.Name = "Skill";
skillType = new System.Xml.Schema.XmlSchemaComplexType();

sequence = new System.Xml.Schema.XmlSchemaSequence();
name = new System.Xml.Schema.XmlSchemaElement();
name.Name = "Name";
name.SchemaTypeName = new System.Xml.XmlQualifiedName(
code = new System.Xml.Schema.XmlSchemaElement();
code.Name = "Code";
code.SchemaTypeName = new System.Xml.XmlQualifiedName(
skillType.Particle = sequence;
skill.SchemaType = skillType;

return output;


A Webservice is created, that only has a method GetSkill and this
returns the object Skill mentioned earlier.

The result in the wsdl is something like this:
<s:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tempuri.org/Skill" id="SkillShemaID">
<xsd:element name="Skill">
<xsd:element name="Name" type="xsd:string" />
<xsd:element name="Code" type="xsd:string" />

But using this wsdl by the wsdl.exe, so in my reference.cs file, this
will be generated as:

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.org/GetSkill",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
public SkillShemaID GetSkill(string SkillName, string code) {
object[] results = this.Invoke("GetSkill", new object[] {
return ((SkillShemaID)(results[0]));

where SkillShemaID is the schema id in getschema but no code is
implemented in the reference.cs file to indicate this object.

Any Solutions to avoid this problem?
Custom generation is my last option.
I know that implementing this interface is not recommended by
microsoft but the standard serializer doesn' t help me and I was told
that in version 2.0 framework this will be supported.

Nov 12 '05 #1
1 3780
I have written my custom WSDL proxy generator for Custom Objects
Looks like Getschema has to many problems in the 1.1 version.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: mattoc | last post by:
Happy new year to all. I have a strange error that I've been trying for a while now to fathom.. Basically I have a hierarchy of state classes that I need to serialize to XML. Some of them can...
by: Thomas D. | last post by:
Situation: --------------------------- I have an 'export'-wrapper to my regular objects. For each regular object there is also an export object. An export object derives from the regular object...
by: Thomas D. | last post by:
Hello all, I'm using the IXmlSerializable interface for a project and encounter some problems when testing my webservice in a client application. I know this interface is undocumented and not...
by: theburnetts | last post by:
I have a complex class heirarchy where all of my classes inherit from a single base class (BaseObject) and this BaseObject class inherits from XPBaseObject. XPBaseObject is a 3rd party base class...
by: Peter Nofelt | last post by:
Hey All, I am having issue with serializing a class and its base class using ..net 2.0. I am using IXmlSerializable I've provided code displaying my at the bottom of this post. Thanks ahead...
by: burningmidget | last post by:
I am having trouble using IXmlSerializable within a base class and having xsi:type work correctly when deserializing an xml file. Here is a very simplified version of the what is going on in the...
by: Ken | last post by:
I'm trying to run a loop to capture column property information from a table in my datasource. Can anybody see where this is going wrong? Dim tbl As New DataTable Dim col As DataColumn Dim x...
by: valentin tihomirov | last post by:
I wanted to transfer some binary data to my Web Service. There is an example: Yasser Shohoud -- "Web services and large content in .NET 2.0" @...
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
am trying to inherits membership class and implementing IXmlSerializable but it doesn't work. public class SSOMembershipUser : System.Web.Security.MembershipUser ,IXmlSerializable ...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.