473,399 Members | 3,603 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,399 software developers and data experts.

SoapHeader class

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>
<Action>http://abc.example/SubmitPO</Action>
</SOAP-ENV:Header>

However, all the sample code that I can find on SoapHeader is at least
one
level down within a root node, i.e the generated header is like:

<SOAP-ENV:Header>
<MySoapHeader>
<MessageID>
uuid:6B29FC40-CA47-1067-B31D-00DD010662DA
</:MessageID>
<To>http://abc.example</To>
<Action>http://abc.example/SubmitPO</Action>
</MySoapHeader>
</SOAP-ENV:Header>

I finally figure out how to create the needed header by using
SoapHeaderCollection, but the implementation looks awkward. Is there a
easier way to get rid of the root node by using SoapHeader class?

Thanks in advance for any help.

Yuwen
Nov 21 '05 #1
0 1373

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

Similar topics

1
by: Eric | last post by:
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...
1
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>...
2
by: Mike Fiedler | last post by:
On a client web services request, I have a SoapExtension that is adding a header to the message in the BeforeSerialize stage. If the Web Service request is for an operation with...
7
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
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
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
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
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...
4
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.