473,503 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are XmlInclude and ResponseNamespace mutually exclusive?

Hello,
I have a method with these attributes:

[WebMethod(MessageName="GetCards",
EnableSession=true)]
[SoapHeader("mbiSessionHeader",
Direction=SoapHeaderDirection.In)]
[SoapHeaderAttribute("MessageIdHeader",
Direction=SoapHeaderDirection.Out)]
[SoapHeader("unknownHeaders")]
[SoapDocumentMethod(RequestNamespace=CardRequestNam espace.June2004,
RequestElementName=GetCardsRequest.REQUEST_ELEMENT _NAME,
ResponseNamespace=CardResponseNamespace.June2004,
ResponseElementName=GetCardsResponse.RESPONSE_ELEM ENT_NAME)]
public GetCardsResponse[] GetCards(GetCardsRequest getCardsRequest)
{
}

This works fine with a WebSphere client. Now, I've added another field
to the GetCardsResponse class and this breaks the client as their
existing client can't deserialize this new element without regenerating
their proxies.

We decided to create a derived class (GetCardsResponseV2) and return
the base or the derived class based on the request.

To this end, I added this attribute:
[System.Xml.Serialization.XmlInclude(typeof(GetCard sResponseV2))]

I preferred this over SoapInclude as I've read in other postings that
it doesn't work (contrary to Microsoft's advice to use either of
these).

But I was not able to see the derived class in the WSDL. A few trials
later, I realized that commenting out the ResponseNamespace element in
the SoapDocumentMethod attribute makes this work. Now, I can see the
base and derived classes in the WSDL, but I've lost the namespace and
this is essential to the existing clients.

The base and derived classes do not have any attributes on them, but
their fields have the XmlElement attributes on them.

Am I missing something something here? Is there another attribute that
I can place so that XmlInclude and ResponseNamespace can coexist?

Any insight you may have qould be useful. Thanks.
BG.

Feb 2 '06 #1
0 998

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

Similar topics

5
1861
by: wooks | last post by:
I have defined a schema with an xsd:choice element for 2 mutually exclusive fields. When both are present I get an error which is good, but what is not so good is the error message which says...
3
459
by: softengine | last post by:
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table. Can and how...
5
3701
by: WertmanTheMad | last post by:
Ive been playing with this for a few days and thought I might thow it out for seggestions. I have Several Queries that need counts returned The Queries are Mutually Exclusive meaning whatever...
2
3204
by: js | last post by:
I include a asp:RadioButton in an ItemTemplate of a DataGrid like the following. However, the radio buttons are not mutual exclusive where select one will deselect the rest of the radio buttons. I...
2
1909
by: Stimp | last post by:
I'm getting the error: 'SelectedIndex' and 'SelectedValue' attributes are mutually exclusive when I try to populate a series of dropdowns... any idea what I could be doing wrong here? ...
5
10085
by: Stimp | last post by:
Hi all, I've come back to this problem again and I've identified which part of my code is producing the error: "'SelectedIndex' and 'SelectedValue' attributes are mutually exclusive" I...
0
1829
by: urban011 | last post by:
I need to use XmlInclude to generate a description in the wsdl for a subtype for a given web method. I alos need to include the SoapRpcMethod directive and the use=literal attribute in order to...
2
3363
by: arun | last post by:
Hi Can any one suggest me how to access the mutually exclusive check box extender in a table of 7 rows by 14 columns. Only one can be selected in each row. Other than checking each one with if...
1
11044
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
7192
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,...
0
7064
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
7315
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...
0
7445
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...
0
5559
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,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4665
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...
0
3158
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...
0
1492
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 ...

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.