custom datatypes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gibb

    #1

    custom datatypes

    Hi All.. i need help in this issue...
    Public Attributes & Properties for shared classes amoung webservice are
    accessible, but how can we call the methods.
    i have a webMethod that returns a custom datatype to the client, where i
    need to call a method of that returned class. here is an example :

    //Web Service Namespace
    public class Meeting
    {
    public string subject;
    private ArrayList attachments;

    public void AddAttachment( string fileName, byte[] data )
    {
    // Code to do manipulate the attachmentsand add it to my ArrayList
    }
    }

    // My Web Method
    [WebMethod()]
    public Meeting getMeeting( int meetID )
    {
    // code goes here to get the required meeting
    Meeting meeting = new Meeting();
    return meeting;
    }

    [WebMethod()]
    public void UpdateMeeting( Meeting meeting )
    {
    // Do any Operation Here
    }

    -----------------------------------------------------------------
    // Now Here it Goes My Client Code

    public void UpdateMeeting( int meetID )
    {
    //Call my Web Service
    MeetingWS proxy = new MeetingWS();
    //Here i Need to Define the Meeting Object
    MeetingWS.Meeti ng m = new MeetingWS.Meeti ng();
    m = proxy.getMeetin g( meetID );
    // here goes the problem
    m.AddAttachment ( "anything", myArrOfBytes ); // Can't Call this Methods
    where
    m.fileName = "MyFileName " // This is accessible
    // if this problem is solved then i want to update that meeting by calling
    the web method
    proxy.UpdateMee ting( m );

    }
    -----------------------------------------------------------

    Many Thanks.

    Gibb
Working...