473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

REPOST: <Obsolete tag causing server to barf

In the class declaration of a web service that I've just picked up for
maintenance:

<Obsolete("Superseded by OrderPaymentElements")Public PaymentType
As OrderPaymentType
Public OrderPaymentElements As OrderPaymentList

Apparently there's a problem with the generated SOAP. This is what
the client said:

"Server was unable to read request. --There is an error in XML
document (1, 1553). --'0' is not a valid value for OrderPaymentType"

Looking at the request that is the position of the PaymentType element
in the soap document."

Can anyone tell me what possible purpose the <Obsolete tag has? Are
there any reasons not to use <XmlIgnore()instead? More worryingly,
why is the server barfing?

DISCLAIMER: I'm new to this and it's a pretty complex, and completely
undocumented application. Aren't I the lucky one?

Thanks

Edward

Dec 6 '06 #1
5 1260
<te********@hotmail.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
In the class declaration of a web service that I've just picked up for
maintenance:

<Obsolete("Superseded by OrderPaymentElements")Public PaymentType
As OrderPaymentType
Public OrderPaymentElements As OrderPaymentList

Apparently there's a problem with the generated SOAP. This is what
the client said:

"Server was unable to read request. --There is an error in XML
document (1, 1553). --'0' is not a valid value for OrderPaymentType"

Looking at the request that is the position of the PaymentType element
in the soap document."

Can anyone tell me what possible purpose the <Obsolete tag has? Are
there any reasons not to use <XmlIgnore()instead? More worryingly,
why is the server barfing?

DISCLAIMER: I'm new to this and it's a pretty complex, and completely
undocumented application. Aren't I the lucky one?

Thanks

Edward
XmlIgnore and Obsolete are two very different attributes, the former says do
not include this property in XML serialisation, the latter is marking the
property as obsolete.
Sound to me like the WSDL schema has payment type down as an enumeration or
the like with 0 an invalid choice.
Can you show the schema?
--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name
Dec 6 '06 #2

Joe Fawcett wrote:
XmlIgnore and Obsolete are two very different attributes, the former says do
not include this property in XML serialisation, the latter is marking the
property as obsolete.
Sound to me like the WSDL schema has payment type down as an enumeration or
the like with 0 an invalid choice.
Can you show the schema?
What is the point of an obsolete property? Why not just delete it?

I *can* show the schema, I think, but I'm not in the office. I'll do
my best to dig it out tomorrow.

Edward

Dec 6 '06 #3
Because deleting it might break existing applications. Obsolete is one step
up from Deprecated.
--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name

<te********@hotmail.comwrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...
>
Joe Fawcett wrote:
>XmlIgnore and Obsolete are two very different attributes, the former says
do
not include this property in XML serialisation, the latter is marking the
property as obsolete.
Sound to me like the WSDL schema has payment type down as an enumeration
or
the like with 0 an invalid choice.
Can you show the schema?

What is the point of an obsolete property? Why not just delete it?

I *can* show the schema, I think, but I'm not in the office. I'll do
my best to dig it out tomorrow.

Edward

Dec 7 '06 #4

Joe Fawcett wrote:
[...]
XmlIgnore and Obsolete are two very different attributes, the former says do
not include this property in XML serialisation, the latter is marking the
property as obsolete.
Sound to me like the WSDL schema has payment type down as an enumeration or
the like with 0 an invalid choice.
Can you show the schema?
Here's part of it: it's 3,100 lines long or I'd post the lot!

<s:complexType name="Order">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GrandTotal"
type="s:decimal" />
<s:element minOccurs="0" maxOccurs="1" name="IndividualKey"
type="tns:IndividualKey" />
<s:element minOccurs="0" maxOccurs="1" name="InvoiceAddress"
type="tns:Address" />
<s:element minOccurs="0" maxOccurs="1"
name="OrderItemGroupList" type="tns:ArrayOfOrderItemGroup" />
<s:element minOccurs="1" maxOccurs="1" name="SubTotal"
type="s:decimal" />
<s:element minOccurs="1" maxOccurs="1" name="Vat"
type="s:decimal" />
<s:element minOccurs="1" maxOccurs="1" name="PostageAmount"
type="s:decimal" />
<s:element minOccurs="0" maxOccurs="1" name="InvoiceNumber"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="OrderReference"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="IndividualName"
type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="DiscountAmount"
type="s:decimal" />
<s:element minOccurs="1" maxOccurs="1" name="OverrideTotal"
type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="OverrideReason"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="OrderPaymentElements" type="tns:ArrayOfOrderPayment" />
</s:sequence>
</s:complexType>
<s:complexType name="OrderPayment">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="PaymentAmount"
type="s:decimal" />
<s:element minOccurs="1" maxOccurs="1" name="PaymentType"
type="tns:OrderPaymentType" />
<s:element minOccurs="0" maxOccurs="1" name="OrderReference"
type="s:string" />
</s:sequence>
</s:complexType>
<s:simpleType name="OrderPaymentType">
<s:restriction base="s:string">
<s:enumeration value="None" />
<s:enumeration value="DataCash" />
<s:enumeration value="ManualCash" />
<s:enumeration value="ManualCheque" />
<s:enumeration value="CreditCard" />
</s:restriction>
</s:simpleType>

Thanks

Edward

Dec 7 '06 #5
<te********@hotmail.comwrote in message
news:11**********************@j44g2000cwa.googlegr oups.com...
>
Joe Fawcett wrote:
[...]
>XmlIgnore and Obsolete are two very different attributes, the former says
do
not include this property in XML serialisation, the latter is marking the
property as obsolete.
Sound to me like the WSDL schema has payment type down as an enumeration
or
the like with 0 an invalid choice.
Can you show the schema?

Here's part of it: it's 3,100 lines long or I'd post the lot!

The payment order type is defined below:
<s:simpleType name="OrderPaymentType">
<s:restriction base="s:string">
<s:enumeration value="None" />
<s:enumeration value="DataCash" />
<s:enumeration value="ManualCash" />
<s:enumeration value="ManualCheque" />
<s:enumeration value="CreditCard" />
</s:restriction>
</s:simpleType>

So 0 is not a valid option, looks like it should be the string None.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
Dec 8 '06 #6

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

Similar topics

5
by: Thomas Brathans | last post by:
Hi, when I try to execute the obove mentioned to synchronise the servertime by a php-script, it doesn't work. Other shell-commands work fine. Executing ntpdate <server> directly in the shell...
12
by: Shawn Lindsay | last post by:
Hi. I'm trying to write a plugin for some blogging software (blosxom), and I wanted to make use of the <au> aka <author> tag. Apparently that element is in html 3.x, but not in the specs for...
3
by: Les Juby | last post by:
I am trying to adjust the window/table size of a website (www.worklaw.co.za) which has made use of DIV tags with its settings embedded in an CSS file. The client wants its width and height to...
1
by: Jeremy Ames | last post by:
Ok, I was wrong. It pains me to say that, but it does happen occasionally. LOL It is not actually a Server.Transfer that is causing that problem but some javascript that I have tied to some...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
1
by: John | last post by:
Hi all, I did post this about 10 hours ago thinking I would have received an answer now but it is quite urgent. How do I add a COM object to a web form? I notice there's a primary interop...
2
by: gndzkdr | last post by:
hi all, i m new on Sql and i have a project related to C# and Sql. i have to do a project which must work on LAN, and there must be only one database file on main computer(Server Computer) and...
2
by: Yuv | last post by:
Hi, When one of my users are navigating my ASP website, and click on submit type button to move from Page1.asp to another ASP page, Page2.asp, they are getting message like "Internet explorer...
2
by: =?Utf-8?B?U1VOTlk=?= | last post by:
Hi I have a web application(website) from which i generate reports. I code behind used is asp.net. When i give a small date range to generate reports it works fine, but when i give a big date range...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
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...
1
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...
0
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...
0
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,...
0
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...

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.