Soap Headerhandler

S

SingLoke

I'm going to migrate a vb6 soap client application to .net (C#) but I have a
problem on headerhandler:

In VB6, I employ the following code to connect to a webservice:

Set mySoapClient = New SoapClient
Set mySoapHeader = New soapHeader
....
'Set the header
mYSoapHeader.SoapURN = SoapURN
mYSoapHeader.data = myClientData
....

'Attache the header to the SoapClient
Set mySoapClient.HeaderHandler = m_SoapHeader

'Run the webservice
result = mySoapClient.Runsomething(abc,def...)

In .Net, I added the web reference in my project and can access the
functions/members of the webservice, but, I cannot found a properity call
"headerhandler" in the webservice.

I read through the doc "Using SOAP Headers" on MSDN, but it seems that I
have to define a header (like MyHeader) in the server-side webservice first,
but in my case, the service is create by other company, I cannot change it.
how can use the old method (like soapclient.headerhandler = something) to
pass the header to the webservice? Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top