Using response As WebResponse = request.GetResponse()
            Using rd As New StreamReader(response.GetResponseStream())
                Dim soapResult As String = rd.ReadToEnd()
                SerializeCollection(soapResult)
the soapResult generate the following :
  <?xml version="1.0" encoding="UTF-8"?>
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
  <createShipmentResponse xmlns="http://www.royalmailgroup.com/api/ship/V2">
     <integrationHeader>
        <dateTime xmlns="http://www.royalmailgroup.com/integration/core/V1">2016-03-23T06:55:32</dateTime>
        <version xmlns="http://www.royalmailgroup.com/integration/core/V1">2</version>
        <identification xmlns="http://www.royalmailgroup.com/integration/core/V1">
           <applicationId>RMG-API-G-01</applicationId>
           <transactionId>730222611</transactionId>
        </identification>
     </integrationHeader>
     <integrationFooter>
        <errors xmlns="http://www.royalmailgroup.com/integration/core/V1">
           <error>
              <errorCode>E1105</errorCode>
              <errorDescription>The countryCode specified is not valid</errorDescription>
           </error>
           <error>
              <errorCode>E1001</errorCode>
              <errorDescription>Postcode AA9 0AA invalid</errorDescription>
           </error>
        </errors>
        <warnings xmlns="http://www.royalmailgroup.com/integration/core/V1">
           <warning>
              <warningCode>W0036</warningCode>
              <warningDescription>E-mail option not selected so e-mail address will be ignored</warningDescription>
           </warning>
           <warning>
              <warningCode>W0035</warningCode>
              <warningDescription>SMS option not selected so Telephone Number will be ignored</warningDescription>
           </warning>
        </warnings>
     </integrationFooter>
      </createShipmentResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
i am using this method to serialize this response :
Private Sub SerializeCollection(filename As String)
    Dim Emps As createShipmentResponse = New createShipmentResponse()
    ' Note that only the collection is serialized -- not the 
    ' CollectionName or any other public property of the class.
    Dim x As XmlSerializer = New XmlSerializer(GetType(createShipmentResponse))
    Dim writer As TextWriter = New StreamWriter(filename)
    x.Serialize(writer, Emps)
    writer.Close()
End Sub
but i am having this error : Illegal characters in path what does that mean ? and how can i fix this ?
 
    