By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

Soap and .net Web Service Types.

P: 2
Ok I have created a VB .net WEb Service. and from VB 6.0 I would like to use this web service.


My web service looks like this in .net
<WebMethod(), SoapHeader("AccountInfo"), System.Web.Services.Protocols.SoapRpcMethod(), SoapInclude(GetType(Individual))> _
Public Function InsertIndividual(ByVal MYPerson As Individual) As Individual
Dim a As String
Dim b As String
Dim c As String
Dim d As New Individual


a = MYPerson.Address1
c = MYPerson.FirstName
b = MYPerson.LastName
d.FirstName = "bob"
d.LastName = "henderson"
d.Address1 = "myplaza"
InsertIndividual = d
End Function

End Class
Public Class Individual
Public ID As Int64
Public FirstName As String
Public LastName As String
Public Address1 As String


End Class
Public Class AccountInfoHeader
Inherits System.Web.Services.Protocols.SoapHeader

Public BuilderCode As String
Public UserName As String
Public Password As String
End Class




now from VB 6 I need to access the types AccountInfoHeader and Type individual.

How do i access those using the Soap Tool Kit without getting down the XML level. and using the Serializer to look at everything. Is there any way in VB 6 I can create a VB6 compatible Individual object and pass that to the web service?

I would like to do something like the following. How possible is this?

Const WEB_SERVICE = "http://localhost/WebService1/Sample.asmx?wsdl"
Private Sub Command1_Click()
Dim rtnValue
Dim x As Object
Dim soapclient As MSSOAPLib30.SoapClient30


Dim y As Object
'Set soapclient = CreateObject("MSSOAP.SoapClient30")

soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.MSSoapInit (WEB_SERVICE)


x = New soapclient.Individual
x.firstname = "Rico"



Set y = soapclient.InsertIndividual(x)
MsgBox y.firstname
End Sub
Oct 30 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.