473,508 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAPHeader

Hi,

I have a WebService client. All the code is generated by VS.NET 2003.
The problem is that some attributes are not generated.
All the attributes in the base class are generated.
But the attribute in the inherited class RFCSending are not.

Is it not possible to use this class structure for a SOAP header?
Thanks
Eric
Definition:
----------------------------------------------------------------------------
------------------
public RFCSending RFCSendingValue;

[System.Web.Services.Protocols.SoapHeaderAttribute( "RFCSendingValue",
Direction=System.Web.Services.Protocols.SoapHeader Direction.In,
Required=true)]

----------------------------------------------------------------------------
------------------
RFCSending is defined like that:

----------------------------------------------------------------------------
------------------
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://www.xxx")]
[System.Xml.Serialization.XmlRootAttribute(Namespac e="http://www.xxx",
IsNullable=false)]
public class RFCSending : sendingType {
[System.Xml.Serialization.XmlAttributeAttribute("gr oupe-id")]
public int groupeid;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://www.xxx")]
[System.Xml.Serialization.XmlIncludeAttribute(typeo f(EFCSending))]
[System.Xml.Serialization.XmlIncludeAttribute(typeo f(RFCSending))]
public class sendingType : System.Web.Services.Protocols.SoapHeader {

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute("se nding-date")]
public System.DateTime sendingdate;
}
----------------------------------------------------------------------------
------------------


Nov 21 '05 #1
1 2060
I am going to guess here that the 'groupeid' attribute is defined in the
schema with use="optional" and type="xs:int", the schema type "int" will be
mapped to CLR primitive type System.Int32, which is a ValueType, so after
an instance of RFCSending is deserialized there is no way to tell if the
groupeid=".." attribute was present in the instance. XmlSerializer employs
xxxSpecified pattern to determine if the satellite xxx member was set or
not. When reading an instance of RFCSending, the groupeidSpecified member
will be set to "true" if the xml instance had the groupeid=".." attribute,
otherwise the value of the groupeidSpecified will be false. Unfortunately
this means that user is burdened with responsibility of setting the
groupeidSpecified to true if he/she want is to be serialized:

MyProxy x = new MyProxy();
x.RFCSendingValue = new RFCSending();
x.RFCSendingValue.groupeid = 555;
x.RFCSendingValue. groupeidSpecified = true;
Nov 21 '05 #2

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

Similar topics

1
1672
by: justin_sun | last post by:
All the sample code that I can find on SoapHeader is at least one level down within a root node. However, I'm working on a project needs to create a soap header like this: <SOAP-ENV:Header>...
0
1378
by: justin_sun | last post by:
I'm working on a project needs to create a soap header like this: <SOAP-ENV:Header> <MessageID> uuid:6B29FC40-CA47-1067-B31D-00DD010662DA </:MessageID> <To>http://abc.example</To>...
7
7042
by: Michael Peters | last post by:
I wish to change/set the namespace for a header in my web service. I have found the following code and it does not appear to work and my assumption is because I am using RPC encoding... ...
0
936
by: Peter Morris [Droopy eyes software] | last post by:
I'm not sure what my problem is so I thought I'd post here to see if anyone can shed some light onto my problem. 1) I have a SoapHeader descendant called AuthenticateUserHeader that has UserName...
0
1102
by: Mannfred | last post by:
I've written a complex web service in C# to be used by SmartDevices and I'm trying to reduce size of the message to the absolute minimum to save on cost, every byte counts etc. Is there any way...
10
2198
by: Andy Kendall | last post by:
I have a problem accessing my custom SoapHeader from a SoapExtension. My extension has no compile time reference to the class derived from SoapHeader, so how can cast it into a SoapHeader of the...
0
1870
by: Fred | last post by:
I am trying to build a consumer to a webservice which use soapheader. I am using Visual Studio 2003. Please see the wsdl-file below. Why is it that the SOAPHEADER is empty when I use it int the...
1
1390
by: Joseph Geretz | last post by:
Given the following Web Service method definition: public DataTable GetData() { ... } If GetData throws an exception, obviously the functional return is toast.
4
2379
by: Rasika WIJAYARATNE | last post by:
Hi everyone, We have a web method that accepts a type of AuthHeader containing credentials for validating WS calls, which is shown below: public class AuthHeader : SoapHeader { public string...
0
7135
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...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
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
5650
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
5060
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
4729
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
3215
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
1570
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 ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.