Home All Groups Group Topic Archive Search About
Author
15 Jun 2009 2:44 AM
Harry
Hi all

While this is essentially a VB6 question it involves calling a VB.Net Web
Service and anything .Net seems to get the VB6 group very riled up. Seems a
pity because this stuff is so simple in .Net.

We have a client that wants to utilise one of our web services but they
still develop in VB6.

Oure test service has the following authentication (Basic):

Public Class InterLinkCredentials
Inherits SoapHeader

Public Account_ID As Integer

Public Password As String

End Class

Public Credentials As New InterLinkCredentials

and methods are like the following:

<WebMethod(Description:="Test user credentials in SOAP header"),
SoapHeader("Credentials")> _

Public Function Test_Connection() As Boolean

Can anyone help me with putting the above credentials into a SOAP3 header in
vb6? I have searched for several days and cannot find an example that works.

Thank you

Author
15 Jun 2009 3:56 PM
Gregory A. Beamer
Show quote Hide quote
"Harry" <harryNoSpam@ffapaysmart.com.au> wrote in
news:#p70wMW7JHA.3304@TK2MSFTNGP06.phx.gbl:

> Hi all
>
> While this is essentially a VB6 question it involves calling a VB.Net
> Web Service and anything .Net seems to get the VB6 group very riled
> up. Seems a pity because this stuff is so simple in .Net.
>
> We have a client that wants to utilise one of our web services but
> they still develop in VB6.
>
> Oure test service has the following authentication (Basic):
>
> Public Class InterLinkCredentials
> Inherits SoapHeader
>
> Public Account_ID As Integer
>
> Public Password As String
>
> End Class
>
> Public Credentials As New InterLinkCredentials
>
> and methods are like the following:
>
> <WebMethod(Description:="Test user credentials in SOAP header"),
> SoapHeader("Credentials")> _
>
> Public Function Test_Connection() As Boolean
>
> Can anyone help me with putting the above credentials into a SOAP3
> header in vb6? I have searched for several days and cannot find an
> example that works.
>
> Thank you


The SOAP 3 Toolkit, no longer supported, is the easiest way to work from
VB6 against web services. I am not sure if there is anything in the
documentation on adding credentials, as it has been so long since I
worked in VB6.

The other way to add items is by altering the headers for the envelope
yourself. If you go this route, you will completely customize the call.
It is very hard to find any Google information on this, as most of the
bits surrounding this space are deprecated.

For third party, I would try this:
http://www.clevercomponents.com/products/inetsuiteax/suiteax.asp

There are plenty of samples for VB and it looks like there are a few
security samples.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
Show quoteHide quote
|      Think outside the box!             |
*******************************************
Author
15 Jun 2009 8:36 PM
Harry
Show quote Hide quote
"Gregory A. Beamer" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message
news:Xns9C2B6F41D4E74gbworld@207.46.248.16...
> "Harry" <harryNoSpam@ffapaysmart.com.au> wrote in
> news:#p70wMW7JHA.3304@TK2MSFTNGP06.phx.gbl:
>
>> Hi all
>>
>> While this is essentially a VB6 question it involves calling a VB.Net
>> Web Service and anything .Net seems to get the VB6 group very riled
>> up. Seems a pity because this stuff is so simple in .Net.
>>
>> We have a client that wants to utilise one of our web services but
>> they still develop in VB6.
>>
>> Oure test service has the following authentication (Basic):
>>
>> Public Class InterLinkCredentials
>> Inherits SoapHeader
>>
>> Public Account_ID As Integer
>>
>> Public Password As String
>>
>> End Class
>>
>> Public Credentials As New InterLinkCredentials
>>
>> and methods are like the following:
>>
>> <WebMethod(Description:="Test user credentials in SOAP header"),
>> SoapHeader("Credentials")> _
>>
>> Public Function Test_Connection() As Boolean
>>
>> Can anyone help me with putting the above credentials into a SOAP3
>> header in vb6? I have searched for several days and cannot find an
>> example that works.
>>
>> Thank you
>
>
> The SOAP 3 Toolkit, no longer supported, is the easiest way to work from
> VB6 against web services. I am not sure if there is anything in the
> documentation on adding credentials, as it has been so long since I
> worked in VB6.
>
> The other way to add items is by altering the headers for the envelope
> yourself. If you go this route, you will completely customize the call.
> It is very hard to find any Google information on this, as most of the
> bits surrounding this space are deprecated.
>
> For third party, I would try this:
> http://www.clevercomponents.com/products/inetsuiteax/suiteax.asp
>
> There are plenty of samples for VB and it looks like there are a few
> security samples.
>
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> Twitter: @gbworld
> Blog: http://gregorybeamer.spaces.live.com
>
> *******************************************
> |      Think outside the box!             |
> *******************************************

Thanks for your help. I have looked at the documentation of the SOAP3
Toolkit and it does not appear to cover what is required. Further to this,
all the VB6 stuff is late bound, which makes it difficult to work with.

I think I will go down the road of building a .Net dll that they can call
from VB6
Author
16 Jun 2009 2:26 PM
Gregory A. Beamer
"Harry" <harryNoSpam@ffapaysmart.com.au> wrote in
news:OwvI3jf7JHA.1432@TK2MSFTNGP02.phx.gbl:

> Thanks for your help. I have looked at the documentation of the SOAP3
> Toolkit and it does not appear to cover what is required. Further to
> this, all the VB6 stuff is late bound, which makes it difficult to
> work with.
>
> I think I will go down the road of building a .Net dll that they can
> call from VB6

Just make sure they understand they will need .NET installed to run it. 
But since it is easy to make a COM callable wrapper, and you do not have to
deal with the COM headaches, it will be a much easier road.

You can, in COM, set up the headers yourself, using the XML libraries, but
it is painful to get right. If you have to go that route ("we will not
install .NET on our machines" for example), examine the SOAP from the .NET
libs as a roadmap.

have fun!


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
Show quoteHide quote
|      Think outside the box!             |
*******************************************