473,387 Members | 1,798 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.

Accessing Soap Header

Hi All,

I have added a SoapHeader in my websevice, which is exposed as a variable
from my webservice. Whenver I access the header form my client I see the
name of variable being changed to <VaribaleName>Value.

public class MyClass: System.Web.Services.WebService

{

public Header RequestHeader;

[WebMethod]

[SoapHeader("RequestHeader")]

public String Method1(ref String Data)

{

}

In the Client we access as follows

Header header = new Header();

MyClass m = new MyClass();

m.HeaderValue = header;

Why it suffixed the it with value or is this the right way to access it.
--
Regards,

Debasish Pramanik
Assetlink India.
Phone: +91 20 26119531 (226)
Sep 13 '06 #1
5 1403
"Debasish Pramanik" <de***************@Assetlink.comwrote in message
news:e3**************@TK2MSFTNGP02.phx.gbl...
Hi All,

I have added a SoapHeader in my websevice, which is exposed as a variable
from my webservice. Whenver I access the header form my client I see the
name of variable being changed to <VaribaleName>Value.

public class MyClass: System.Web.Services.WebService

{

public Header RequestHeader;

[WebMethod]

[SoapHeader("RequestHeader")]

public String Method1(ref String Data)

{

}

In the Client we access as follows

Header header = new Header();

MyClass m = new MyClass();

m.HeaderValue = header;

Why it suffixed the it with value or is this the right way to access it.
If it works, then why ask why?

John
Sep 13 '06 #2
Why can't I access it as RequestHeader of the Service Object ?????

--
Regards,

Debasish Pramanik
Assetlink India.
Phone: +91 20 26119531 (226)

"John Saunders" <john.saunders at trizetto.comwrote in message
news:Ok**************@TK2MSFTNGP02.phx.gbl...
"Debasish Pramanik" <de***************@Assetlink.comwrote in message
news:e3**************@TK2MSFTNGP02.phx.gbl...
Hi All,

I have added a SoapHeader in my websevice, which is exposed as a
variable
from my webservice. Whenver I access the header form my client I see the
name of variable being changed to <VaribaleName>Value.

public class MyClass: System.Web.Services.WebService

{

public Header RequestHeader;

[WebMethod]

[SoapHeader("RequestHeader")]

public String Method1(ref String Data)

{

}

In the Client we access as follows

Header header = new Header();

MyClass m = new MyClass();

m.HeaderValue = header;

Why it suffixed the it with value or is this the right way to access it.

If it works, then why ask why?

John


Sep 14 '06 #3
"Debasish Pramanik" <de***************@Assetlink.comwrote in message
news:uB****************@TK2MSFTNGP03.phx.gbl...
Why can't I access it as RequestHeader of the Service Object ?????
Sorry, I didn't notice that you were confusing the client and the server.
The service object does not exist on the client. What's on the client (in
your case) is a proxy class generated from the WSDL file which .NET produced
from the metadata on the server. .NET chose to create a proxy class with a
Header object called HeaderValue. That's not within your control.

So, don't worry about the name difference, as MyClass on the client and
MyClass on the server are two classes with almost no relationship between
them.

In other words, just use what works, HeaderValue, and don't expect the
client and server to be the same thing.

John
Sep 14 '06 #4
Hi John,

Thanks for the reply !!

I have seen some site whee they say it depend upon the namespace that you
can provide the attribute that controls the name. Do you have any idea about
that.

--
Regards,

Debasish Pramanik
Assetlink India.
Phone: +91 20 26119531 (226)

"John Saunders" <john.saunders at trizetto.comwrote in message
news:eI**************@TK2MSFTNGP06.phx.gbl...
"Debasish Pramanik" <de***************@Assetlink.comwrote in message
news:uB****************@TK2MSFTNGP03.phx.gbl...
Why can't I access it as RequestHeader of the Service Object ?????

Sorry, I didn't notice that you were confusing the client and the server.
The service object does not exist on the client. What's on the client (in
your case) is a proxy class generated from the WSDL file which .NET
produced
from the metadata on the server. .NET chose to create a proxy class with a
Header object called HeaderValue. That's not within your control.

So, don't worry about the name difference, as MyClass on the client and
MyClass on the server are two classes with almost no relationship between
them.

In other words, just use what works, HeaderValue, and don't expect the
client and server to be the same thing.

John


Sep 19 '06 #5
"Debasish Pramanik" <de***************@Assetlink.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi John,

Thanks for the reply !!

I have seen some site whee they say it depend upon the namespace that you
can provide the attribute that controls the name. Do you have any idea
about
that.
No, sorry, I've never heard of anything like that. As far as I know, if you
use a Microsoft-generated proxy class, then you have to put up with
Microsoft-generated names.

John
Sep 19 '06 #6

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

Similar topics

0
by: ramas | last post by:
Hi, I am new to PHP scripting and i am trying to connect to a soap server (as mentioned below) using the SOAP extension comesup with PHP. Now my requirement is to add my HTTP header fields along...
0
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
5
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the...
6
by: Peter van der veen | last post by:
Hi I have the following problem. I'm calling a webservice from within a VB.net 2005 Windows program. For this i got a WSDL file and loaded that in VB. Until now i just call the webservice and...
3
by: mirandacascade | last post by:
1) Is it correct that none of the examples in the ElementSOAP tutorial: http://effbot.org/zone/elementsoap-1.htm include an example in which the SOAP message that contains the request includes...
3
by: sean.j.gage | last post by:
We are building a web service for a client application that will need to send information in the Header of the web service responses. What's the best way to access this header information from the...
7
by: beachdog | last post by:
I'm using Visual Studio 2005/C# to build a web client. The web server is something I've written in a different framework, which does not support generating wsdl, so I have hand-built a wsdl file,...
0
by: nyathancha | last post by:
Hi, I am wondering if there is anyway of easily accessing the messageID that gets posted in the soap header with wse 3.0 I built a custom filter on the client for debugging purposes and I can...
0
by: broersen | last post by:
Hello, Does someone know how to create manually the header for an SOAP message, without having an WSDL? I also use an X509 certificate for connecting to the webservice. Can anyone help me to get...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.