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.
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.