title: Logging XML from external web service
body: <p>I have been provided an WSDL file for a VB 2005 .NET application and I generated a .vb file using the wsdl command using Visual Studio Command Prompt.  I can connect to this web service and send it data using a complex type provided by the WSDL through several methods.  Any of the methods that return a int or string type work fine.  </p>
  
  <p>Any of the methods that return a complex type is returning XML errors when the serialization occurs.  I can't figure out how to actually see the XML that the web service is returning since it will not let me step through.</p>
  
  <p>System.InvalidOperationException = {"There is an error in XML document (10, 53)."}</p>
  
  <p>This is the call:</p>
  
  <pre><code>    '''&lt;remarks/&gt;
  &lt;System.Web.Services.Protocols.SoapRpcMethodAttribute("http://www.sample.com/RetrieveUsersStatuses", RequestNamespace:="http://www.sample.com", ResponseNamespace:="http://www.sample.com")&gt;  _
  Public Function RetrieveUsersStatus(ByVal authToken As String, ByVal ids() As String) As &lt;System.Xml.Serialization.SoapElementAttribute("statuses")&gt; Userstatus()
      Dim results() As Object = Me.Invoke("RetrieveUsersStatus", New Object() {authToken, ids})
      Return CType(results(0),Userstatus())
  End Function
  </code></pre>
  
  <p>EDIT: I can step further into the project after unchecking 'Enable Just My Code' where leads me to this error</p>
  
  <pre><code>Cannot assign object of type System.Xml.XmlNode[] to an object of type ...
  </code></pre>
  
  <p>It seems that a lot of people are having a similar problem when they try to consume a PHP WSDL into a webservice using .NET.</p>