title: Consume ASMX Webservice From Classic ASP Using SOAP Client 3.0
body: <p>I made a webservice in VB.Net with a method returning a custom class or object.</p>
  
  <pre><code>&lt;WebMethod()&gt; _
  Public Function CreatePerson(ByVal LastName As String, ByVal FirstName As String) As Person
      Return New Person(LastName, FirstName)
  End Function
  
  Public Class Person
  
      Public Sub New()
  
      End Sub
  
      Public Sub New(ByVal LastName As String, ByVal FirstName As String)
          _LastName = LastName
          _FirstName = FirstName
      End Sub
  
      Private _LastName As String
      Public Property LastName() As String
          Get
              Return _LastName
          End Get
          Set(ByVal value As String)
              _LastName = value
          End Set
      End Property
  
      Private _FirstName As String
      Public Property FirstName() As String
          Get
              Return _FirstName
          End Get
          Set(ByVal value As String)
              _FirstName= value
          End Set
      End Property
  
  End Class
  </code></pre>
  
  <p>I can consume it from another ASP.NET Application but the problem is when i try to consume it from Classic ASP through SOAP Client 3.0</p>
  
  <pre><code>&lt;% 
  
  Dim Result, oSoapClient
  
  Set oSoapClient = Server.CreateObject("MSSOAP.SoapClient30")
  
  oSoapClient.ClientProperty("ServerHTTPRequest") = True
  
  Call oSoapClient.mssoapinit ("http://MyServer/MyWebService/MyWebService.asmx?WSDL")
  
  Result = oSoapClient.CreatePerson("Sassaroli", "Rinaldo")
  
  Response.Write(Result.LastName) 
  
  %&gt;
  </code></pre>
  
  <p>I get an error:</p>
  
  <p>Microsoft VBScript runtime  error '800a01a8'</p>
  
  <p>Object required </p>
  
  <p>at "Response.Write(Result.LastName)" Line.</p>
  
  <p>I can see Result is a string array with no elements</p>