Where is Web Method

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

    Where is Web Method

    Dear all,

    I have add a web service reference named service1 in VS
    2008. Then I have following
    dim fih2 As New service1.OpInHU BInHouseDeleteR equest.
    dim fih2 As New service1.OpInHU BInHouseDeleteR esponse

    But what I want is dim fih2 As New service1.OpInHU BInHouseDelete. But
    I cannot find this method in service1. All available are request and
    response. So how can I call the web method of
    service1. All the methods cannot be seen in New service1. So where is
    the web method?

    Thanks
  • rowe_newsgroups

    #2
    Re: Where is Web Method

    On Jun 2, 5:03 am, hon123456 <peterhon...@ya hoo.com.hkwrote :
    Dear all,
    >
    I have add a web service reference named service1 in VS
    2008. Then I have following
    dim fih2 As New service1.OpInHU BInHouseDeleteR equest.
    dim fih2 As New service1.OpInHU BInHouseDeleteR esponse
    >
    But what I want is dim fih2 As New service1.OpInHU BInHouseDelete. But
    I cannot find this method in service1. All available are request and
    response. So how can I call the web method of
    service1. All the methods cannot be seen in New service1. So where is
    the web method?
    >
    Thanks
    You do have the <WebMethod()att ribute on that method don't you?

    Thanks,

    Seth Rowe [MVP]

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: Where is Web Method

      Hi,
      dim fih2 As New service1.OpInHU BInHouseDeleteR equest.
      dim fih2 As New service1.OpInHU BInHouseDeleteR esponse
      This code should defintitly give an error, it would be more likely

      dim fih2 as New service1

      dim fih2.OpInHupInH oudeDeleteReque st(whatever parameter)
      etc

      Cor

      Comment

      • hon123456

        #4
        Re: Where is Web Method

        On 6$B7n(B3$BF| (B, $B>e8a(B1$B; ~(B01$BJ,(B, "Cor Ligthert[MVP]" <notmyfirstn... @planet.nl>
        wrote:
        Hi,
        >
        dim fih2 As New service1.OpInHU BInHouseDeleteR equest.
        dim fih2 As New service1.OpInHU BInHouseDeleteR esponse
        >
        This code should defintitly give an error, it would be more likely
        >
        dim fih2 as New service1
        >
        dim fih2.OpInHupInH oudeDeleteReque st(whatever parameter)
        etc
        >
        Cor
        But Service1 is a name of web reference, it is a namespace. And what I
        want
        is OpInHupInHouseD elete but not OpInHupInHoudeD eleteRequest

        Please help thanks.

        Comment

        • Steve Gerrard

          #5
          Re: Where is Web Method

          hon123456 wrote:
          But Service1 is a name of web reference, it is a namespace. And what I
          want
          is OpInHupInHouseD elete but not OpInHupInHoudeD eleteRequest
          >
          Please help thanks.
          When you do Dim fih2 As New ..., you will get a list of classes, not methods.

          So you want something like
          Dim fih2 As New Service1

          then call the method of fih2:
          x = fih2.OpInHupInH ouseDelete(y)

          I have no knowledge of what params the method takes, or what it returns, if
          anything.
          I think this is what Cor meant to say as well.


          Comment

          Working...