-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: VishalRJoshi
Message 46 in Discussion

 SoapInclude Attribute

In case of webservice programming you can allow SoapInclude Attribute on
your webmethod to make sure that the specific type gets passed by... You use
this attribute on your webmethod when in normal circumstances that type
would not get passed...
For instance, if you have a class inheriting for a base class and a member
is declared of the type base class and later instantiated as derieved, then
the derieved class will not get passed across in that scenario on your
webmethod you would apply this attribute...

Look at the example below...

     <WebMethod(), SoapInclude(GetType(Circle)),
XmlInclude(GetType(Circle))> _
        Public Function ReturnSomething(ByVal key As String) As Shape
            If (key = "Circle") Then
                Dim circl As Shape = New Circle()
                circl.area = 2
                Return circl
            End If
        End Function

        <Serializable()> _
        Public Class Shape
            Public area As Double
        End Class

        <Serializable()> _
        Public Class Circle
            Inherits Shape
            Public radius As Double
        End Class

Vishal Joshi
Microsoft MVP .Net
       If You Think YOU CAN... You Can...
http://VishalJoshi.Blogspot.com
http://www.microsoft.com/india/mvp/indiamvp.aspx
http://groups.msn.com/ChennaiNetUserGroup
http://groups.msn.com/CNUG-DAM 
http://groups.msn.com/NetBloomingtonUserGroup 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to