Loading ...
Sorry, an error occurred while loading the content.

Re: Value not change

Expand Messages
  • sormui_yee
    Sorry i know where my mistake liao. Haha~ too noob... ... from ... make ... help!!! ... ( http://www.cookcomputing.com/xmlrpcsamples/math.rem ) ... Integer)
    Message 1 of 2 , May 8, 2005
    View Source
    • 0 Attachment
      Sorry i know where my mistake liao. Haha~ too noob...



      --- In XMLRPCNET@yahoogroups.com, "sormui_yee" <sormui_yee@y...>
      wrote:
      > Hello, this example which i modify(into vb.net manually proxy)
      from
      > your MathApp sample.
      >
      > But i miss something. Because the value won't be change since i
      make
      > the second methond call continuouly. First time method call is no
      > problem but second time ---- >>> (the value won't update).
      >
      > But the your MathApp sample won't happen such problem. Please
      help!!!
      >
      > -----------------------------------------------------------------
      > Module/Class
      > -----------------------------------------------------------------
      >
      > Module Module1
      > <XmlRpcUrl
      ("http://www.cookcomputing.com/xmlrpcsamples/math.rem")
      > > _
      > Public Class IMathProxy
      > Inherits XmlRpcClientProtocol
      >
      > <XmlRpcMethod("math.Add")> _
      > Public Function Add(ByVal a As Integer, ByVal b As
      Integer)
      > As Integer
      > Return Invoke("Add", New Object() {a, b})
      >
      > End Function
      >
      > <XmlRpcMethod("math.Subtract")> _
      > Public Function Subtract(ByVal a As Integer, ByVal b As
      > Integer) As Integer
      > Return Invoke("Add", New Object() {a, b})
      > End Function
      > <XmlRpcMethod("math.Multiply")> _
      > Public Function Multiply(ByVal a As Integer, ByVal b As
      > Integer) As Integer
      > Return Invoke("Add", New Object() {a, b})
      > End Function
      > <XmlRpcMethod("math.Divide")> _
      > Public Function Divide(ByVal a As Integer, ByVal b As
      > Integer) As Integer
      > Return Invoke("Add", New Object() {a, b})
      > End Function
      > End Class
      > End Module
      >
      > -------------------------------------------------------------------
      -
      > Method Call
      > -------------------------------------------------------------------
      -
      >
      > Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
      > System.EventArgs) Handles btnAdd.Click
      >
      > proxy.Url = "http://www.cookcomputing.com/xmlrpcsamples/math.rem"
      > Cursor = Cursors.WaitCursor
      > Try
      > labResult.Text = ""
      > Dim a As Integer = Convert.ToInt32(txtArg1.Text)
      > Dim b As Integer = Convert.ToInt32(txtArg2.Text)
      > Dim result As Integer = proxy.Add(a, b)
      > labResult.Text = txtArg1.Text + " + " + txtArg2.Text
      + "
      > = " + result.ToString
      > Catch ex As Exception
      > HandleException(ex)
      > End Try
      > Cursor = Cursors.Default
      >
      > End Sub
      >
      >
      ====================================================================
      > The rest like subtract, mutilply, and devide are the same as "Add"
      > method call
      >
      =====================================================================
    Your message has been successfully submitted and would be delivered to recipients shortly.