473,400 Members | 2,145 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,400 software developers and data experts.

XmlInclude and ParameterStyle.Bare

hi,

I'm using ParameterStyle.Bare and have a Request Object as an in
parameter for my web method. The Request object holds a BaseObject.

I have many different WebServices all using this single RequestObject
but intended that depending on which service you call, you send in a
specific derived class of object. So in each of these web services I
use an XmlInclude statement for the particular derived class so you can
send in objects of that class.

The trouble I have is that as soon as I do that the WSDL seems to show
2 versions of my BaseObject and the DerivedClass1 that I want to send
in my request object is not compatible - it is derived from BaseObject1
NOT BaseObject - doh!. Now it probably has something to do with
namespaces but I'm not entirely sure what and I don't actually have
control of the BaseObject or the DerivedClass1 as they have been
provided to me (though I might be able to get them to put an XmlType
statement on the class or similar)

Any ideas?

TIA
Phil

Oct 6 '06 #1
1 1575
de**@2bytes.co.uk wrote:
hi,

I'm using ParameterStyle.Bare and have a Request Object as an in
parameter for my web method. The Request object holds a BaseObject.

I have many different WebServices all using this single RequestObject
but intended that depending on which service you call, you send in a
specific derived class of object. So in each of these web services I
use an XmlInclude statement for the particular derived class so you can
send in objects of that class.

The trouble I have is that as soon as I do that the WSDL seems to show
2 versions of my BaseObject and the DerivedClass1 that I want to send
in my request object is not compatible - it is derived from BaseObject1
NOT BaseObject - doh!. Now it probably has something to do with
namespaces but I'm not entirely sure what and I don't actually have
control of the BaseObject or the DerivedClass1 as they have been
provided to me (though I might be able to get them to put an XmlType
statement on the class or similar)

Any ideas?

TIA
Phil
don't worry - it was namespaces. I had put XmlType statements
specifying namespace on top of my Request objects. As soon as I removed
those it worked fine - though I guess the namespaces should be
coordinated?

Oct 6 '06 #2

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

Similar topics

1
by: yuriy_zubarev | last post by:
Greetings, Simple scenario: I have objects that need to be persisted in XML. The declaration is as follows: public class Zoo { protected Animal animals;
1
by: Bob Rock | last post by:
Hello, I have a web method that serializes a class that includes among its public fields a System.Object field to which, at runtime, I assign instances of various different classes. When...
1
by: R.A. | last post by:
Hi I have a web service that returns a custom class in one of the service methods. public class MyClass { public string Name; public string Street; }
0
by: Matthias De Ridder | last post by:
Hello, I have a Web service method who's returning an ArrayList of a custom class Tender: public ArrayList GetTenders(string user, string password){ // code}
0
by: Andrew Kidd | last post by:
Has anyone got the XmlInclude attribute working in VS 2005? I've done some Googling & there seems to be very little in the way of replies to questions out there. I basically want to expose my...
0
by: goteti | last post by:
Hello, I have a method with these attributes: public GetCardsResponse GetCards(GetCardsRequest getCardsRequest) {
0
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...
1
by: deja | last post by:
hi, i have 2 web services each with some of the same types but also each with their own xmlincludes to include types specific to them. I want to share the types that are common so I used wsdl...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...

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.