The short answer is that you can't. If you have:
Public Class MyClass
Public ReadOnly Property Name() As String
Get
Return m_name
End Get
End Property
End Class
Theoritically, this could be serialized into a SOAP message, but then what
happens on the other end? It would have to de-serialize this by creating an
instance of MyClass, and then try to set the Name property with data from
the SOAP message. However, it can't set the Name property on the client
side because it's read only.
You could make a "do nothing" set section for the property, and that would
let it serialize, but data would be lost when it's deserialized on the other
end. You could also make a Set section that throws an exception if it's
called. Then, it would be impossible to externally set the property on the
server side, but it would serialize and deserialize fine (the client side
wouldn't automatically have the Set that throws an exception). However, the
property on the client side would not be read-only.
HTH,
Scott Swigart