out parameter problem

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

    out parameter problem

    Hi,

    In my web service method (written in C#), I have a method like public string
    myMethod(out int[] test1, string test1)

    but when I use a web client to access this method, I got a run time
    exception: System.NullRefe renceException: object reference not set to an
    instatnce to an object. What could be the problem and how to fix it? Thank
    you very much.

    -May


  • Dino Chiesa [Microsoft]

    #2
    Re: out parameter problem

    if you showed us the code, and the full text of the exception message, we
    could tell you where the problem is.

    It is probably not related to webservices.

    "mei xiao" <mxiao@peerdire ct.com> wrote in message
    news:uORRcN1cEH A.3728@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hi,
    >
    > In my web service method (written in C#), I have a method like public[/color]
    string[color=blue]
    > myMethod(out int[] test1, string test1)
    >
    > but when I use a web client to access this method, I got a run time
    > exception: System.NullRefe renceException: object reference not set to an
    > instatnce to an object. What could be the problem and how to fix it? Thank
    > you very much.
    >
    > -May
    >
    >[/color]


    Comment

    • Da Yong
      New Member
      • Mar 2006
      • 1

      #3
      Have you tried to put this line in front of the method signature
      [WebMethod, System.Web.Serv ices.Protocols. SoapRpcMethod]

      Comment

      Working...