473,778 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wsdl.exe -when elementFormDefa ult="qualified" elements have null n

Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy
May 13 '06 #1
5 4915
Hi
First of all i would like to know what RunTime Version are you using.
I am using version 1.1.4322.573 and its working perfectly fine. The schema
file is generated with elementformdefa ult="Qualified" value. Yes but you are
right. This is problem and this has been discussed many times on many groups.
I dont have KB number of this bug but what seems to me that this issue gets
resolved if you replace unqualified with qualified value. As solution i will
suggest that you use earlier version of WSDL to generate Stub. As I have seen
similar problem in VS 2005 too.

"CindyRob" wrote:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy

May 14 '06 #2
Though this problem is not coming on my side but i tried to regenerate this
case, the version i m using creates WSDL with the qualified value of
elementformdefa ult, instead if i tried to remove defaultnamespac e of my
webservice, it compiled with this messege

This web service is using http://tempuri.org/ as its default namespace.
Recommendation: Change the default namespace before the XML Web service is
made public.

So, I tempered the generated WSDL and changed value of elementformdefa ult
from qualified to unqualified, and I came up with the same proxy code as u
posted here. So it means that you need to change this value to Qualified and
use some earlier version Or use autogenerated proxy using .net IDE.

"Altaf Al-Amin Najwani" wrote:
Hi
First of all i would like to know what RunTime Version are you using.
I am using version 1.1.4322.573 and its working perfectly fine. The schema
file is generated with elementformdefa ult="Qualified" value. Yes but you are
right. This is problem and this has been discussed many times on many groups.
I dont have KB number of this bug but what seems to me that this issue gets
resolved if you replace unqualified with qualified value. As solution i will
suggest that you use earlier version of WSDL to generate Stub. As I have seen
similar problem in VS 2005 too.

"CindyRob" wrote:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy

May 14 '06 #3
Altaf,

Thank you for your response. My runtime version is 1.1.4322.2032. I cannot
go back to 523 as you suggest because of some other wsdl.exe bugs - you may
have noticed the hotfixes I pointed out as having installed. Our wsdl
includes 2 schemas, schema 1 and schema 2, and schema1 and schema2 both
include schema3. The elementFormDefa ult setting I am referring to is set in
schema1 and schema2 which are imported by the wsdl. Going back to the
runtime you suggest (which I have experimented with) causes a problem because
of the bug 892202 with including external schemas.

Yes, manually changing the proxy class to Qualified instead of unqualified
does work around the problem, but our customer does not want to have to
manually change their proxies. We are generating schemas based on their
datatype, and generating a version of our wsdl which is specific to their
datatype on the fly. However, just a change from unqualified to Qualified
doesn't seem to arduous to me, we'll see if they agree.

Thank you for your response
--
Cindy
"Altaf Al-Amin Najwani" wrote:
Though this problem is not coming on my side but i tried to regenerate this
case, the version i m using creates WSDL with the qualified value of
elementformdefa ult, instead if i tried to remove defaultnamespac e of my
webservice, it compiled with this messege

This web service is using http://tempuri.org/ as its default namespace.
Recommendation: Change the default namespace before the XML Web service is
made public.

So, I tempered the generated WSDL and changed value of elementformdefa ult
from qualified to unqualified, and I came up with the same proxy code as u
posted here. So it means that you need to change this value to Qualified and
use some earlier version Or use autogenerated proxy using .net IDE.

"Altaf Al-Amin Najwani" wrote:
Hi
First of all i would like to know what RunTime Version are you using.
I am using version 1.1.4322.573 and its working perfectly fine. The schema
file is generated with elementformdefa ult="Qualified" value. Yes but you are
right. This is problem and this has been discussed many times on many groups.
I dont have KB number of this bug but what seems to me that this issue gets
resolved if you replace unqualified with qualified value. As solution i will
suggest that you use earlier version of WSDL to generate Stub. As I have seen
similar problem in VS 2005 too.

"CindyRob" wrote:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy

May 15 '06 #4
IF you could try to find out the KB number of the bug you are referring to
that would be very helpful. Thanks
--
Cindy
"Altaf Al-Amin Najwani" wrote:
Hi
First of all i would like to know what RunTime Version are you using.
I am using version 1.1.4322.573 and its working perfectly fine. The schema
file is generated with elementformdefa ult="Qualified" value. Yes but you are
right. This is problem and this has been discussed many times on many groups.
I dont have KB number of this bug but what seems to me that this issue gets
resolved if you replace unqualified with qualified value. As solution i will
suggest that you use earlier version of WSDL to generate Stub. As I have seen
similar problem in VS 2005 too.

"CindyRob" wrote:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy

May 15 '06 #5
As an update, when I changed the wsdl include of the external schema to
specify elementFormDefa ult="qualified" explicitly, the problem went away.

I didn't realize it was necessary to re-define the elementFormDefa ult at
include time - I had thought it would pick it up from the definition in the
schema file. But, changing the include statement in the wsdl:types section
from this:

<xsd:schema
targetNamespace ="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema">
<xsd:include schemaLocation= "myschema.x sd"/>
</xsd:schema>

to this:

<xsd:schema elementFormDefa ult="qualified"
targetNamespace ="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema">
<xsd:include schemaLocation= "myschema.x sd"/>
</xsd:schema>

got rid of the problem. I had been changing the value of elementFormDefa ult
in the declaration of myschema.xsd, thinking that it would be picked up by
the include, not realizing that the implicit value for elementFormDefa ult in
the wsdl, which is of course unqualified by default, would override the
setting in the schema.
--
Cindy
"CindyRob" wrote:
IF you could try to find out the KB number of the bug you are referring to
that would be very helpful. Thanks
--
Cindy
"Altaf Al-Amin Najwani" wrote:
Hi
First of all i would like to know what RunTime Version are you using.
I am using version 1.1.4322.573 and its working perfectly fine. The schema
file is generated with elementformdefa ult="Qualified" value. Yes but you are
right. This is problem and this has been discussed many times on many groups.
I dont have KB number of this bug but what seems to me that this issue gets
resolved if you replace unqualified with qualified value. As solution i will
suggest that you use earlier version of WSDL to generate Stub. As I have seen
similar problem in VS 2005 too.

"CindyRob" wrote:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET
2003, hotfixes 892202 and 823639.

I create a proxy class using wsdl.exe, and in the serialized XML request, I
see that any elements that are nested elements in the schema (not global
elements) have their namespaces set to the null namespace. I can see that
the proxy classes have serialization attributes specifying these nested
elements as unqualified:
/// <remarks/>

[System.Xml.Seri alization.XmlEl ementAttribute( Form=System.Xml .Schema.XmlSche maForm.Unqualif ied)]
public AuthenticationD ataLoginData LoginData;

and so in the XML, the namespace is set to null:

<Authentication Data>
<LoginData xmlns="">
etc...

I expected that this was happening because in the schema file,
elementFormDefa ult="unqualifie d". Therefore, I would expect that if I
changed it to elementFormDefa ult="qualified" , I would see the proxy class
change and would get rid of the xmlns="" in the LoginData field. That didn't
happen - the generated proxy is exactly the same. In other words, no matter
what you set for elementFormDefa ult, wsdl.exe behaves as if the
elementFormDefa ult is "unqualifie d", and the namespace is set to null.
Is this a known bug in wsdl.exe - is there a fix available? I'd like to
minimize the changes to the schema if I can, and I have an external
requirement that no manual changes to the generated proxy class be needed.

Thanks,

--
Cindy

May 15 '06 #6

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

Similar topics

10
1825
by: Matthew Sims | last post by:
Python Newbie here. This is my first time learning object-oriented programming and trying to break out of the usual Korn/Perl/PHP style of programming. Having some difficulty understand some items. For lists, I understand this: C= print C some But I can't seem to do this:
3
6394
by: Charles Kline | last post by:
Hi all, I pretty much set a fields default value to NULL if it not a "required" field in my app. Just wondering if this is the way to go since I just sort of guessed at this method ;) - Charles --
1
2139
by: Jerry Collings | last post by:
I'm getting improperly nested xml when a column contains null. I modified the first row (customer ALFKI) to have a NULL Address column. I'm using the following XSD Annotated Schema against the NorthWind database: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <xs:element name="customer" sql:relation="Customers"
3
1772
by: Steven Blair | last post by:
Hi, Here is a small example function. What I would like to know is when I should be using null: private bool MyTestFunc(string Message) { StreamWriter sw=null; string str=null;
8
2110
by: Brad Wood | last post by:
When I do this: foreach( Button btn in myForm.Controls ) An exception is raised when no buttons exist. I would simply expect execution to continue after the foreach loop (just as would be the case with a regular for loop when the second expression is false when the loop begins). Is there an explanation for this?
12
4142
by: Miles Keaton | last post by:
PG peeps: What's the prevailing wisdom & best-practice advice about when to let a varchar (or any) column be NULL, and when to make it NOT NULL DEFAULT '' (or '0000-00-00' or whatever) - in PostgreSQL?
19
3761
by: PengYu.UT | last post by:
I see some code use static_cast<some_pointer_type>(0) instead of NULL to describe null pointer. I'm wondering what is the pros and cons of each way. Is there any reason why we should one verses the other.
5
8386
by: Web learner | last post by:
while (dr.Read()) //dr is an instance of sqlDataReader { double minAirTemp = (double)(Single)dr; // minAirTemp is column in SQLExpress table (data type: real, allows nulls) } The above code works. But when there are NULL, I get the following error System.InvalidCastException: Specified cast is not valid
17
4534
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are selected into 2 different SP variables and compared for equal. They are both NULL, but do not compare as equal. When the Not NULL columns (SALARY) are compared, they do compare as equal.
2
2411
by: blixit | last post by:
I have a WSDL: <?xml version="1.0" encoding="utf-8"?> <!-- edited with XMLSpy v2008 sp1 (http://www.altova.com) by me --> <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://***/directory/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"...
0
9629
marktang
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...
0
9470
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10298
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10127
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
tracyyun
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...
0
8957
agi2029
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...
0
6723
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();...
0
5370
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...
1
4033
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 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.