468,301 Members | 1,532 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

Soap and .net Web Service Types.

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
0 1095

Post your reply

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

Similar topics

6 posts views Thread by Glauco | last post: by
reply views Thread by chr | last post: by
reply views Thread by Cleo | last post: by
4 posts views Thread by Jit Prasad | last post: by
reply views Thread by Jigar.Patel | last post: by
1 post views Thread by Florian Grousset | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.