A little help

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

    A little help

    Up until now I have used MS Web Services which are fairly straight-forward.
    Now I am being asked to use some third party web services which I do not
    find nearly as intuitive.

    Questions:
    1. I have a URL for a wsdl file only no URL to an aspx page such as with
    MS. I have used this wsdl to make a proxy file. Do I still need to make a
    "Web Reference" such as with an aspx file or does the proxy stub suffice?
    2. I only see properties (not methods) in any of these classes. I am not
    sure how I am supposed to initiate any work?
    3 In their documentation they have examples of XML for making their SOAP
    calls (are they kidding me)? They want me to manually create all of the XML
    neccessary for the SOAP calls to their services? Why bother with web
    services?


  • Bruce Johnson [C# MVP]

    #2
    RE: A little help

    Perhaps the easiest thing for you to do will be the create a proxy class
    using the WSDL that they provide. The class should then have an interface
    that you can interact with more naturally. If all that you have is the WSDL
    file, then you can use the wsdl.exe command directly to generate the .cs or
    ..vb proxy class. This is the command that Add Web Reference calls under the
    covers and it takes either a URL or a local path as one of the parameters.
    Once the class is created, just add it to your project and use it like any
    other class. It should take care of creating all of the necessary XML to
    communicate with the web service.

    Hope that helps.

    Bruce Johnson [C# MVP]

    "aaa" wrote:
    [color=blue]
    > Up until now I have used MS Web Services which are fairly straight-forward.
    > Now I am being asked to use some third party web services which I do not
    > find nearly as intuitive.
    >
    > Questions:
    > 1. I have a URL for a wsdl file only no URL to an aspx page such as with
    > MS. I have used this wsdl to make a proxy file. Do I still need to make a
    > "Web Reference" such as with an aspx file or does the proxy stub suffice?
    > 2. I only see properties (not methods) in any of these classes. I am not
    > sure how I am supposed to initiate any work?
    > 3 In their documentation they have examples of XML for making their SOAP
    > calls (are they kidding me)? They want me to manually create all of the XML
    > neccessary for the SOAP calls to their services? Why bother with web
    > services?
    >
    >
    >[/color]

    Comment

    • Bruce Johnson [C# MVP]

      #3
      RE: A little help

      Probably the easiest thing to do will be to create the proxy class manually.
      This should solve the issues you describe in 2 and 3. The way to do this is
      to use the wsdl.exe command. There is documentation for it at
      http://msdn.microsoft.com/library/de...oolWsdlexe.asp.
      But the most important thing is that it can take either a URL or a file path
      from the command line and generate a proxy class in either vb.net or c#.
      This is the tool that the Add Web Reference uses under the covers. Once the
      class is generated, add it to your project and you should be good to go.

      Hope this helps.

      Bruce Johnson [C# MVP]


      "aaa" wrote:
      [color=blue]
      > Up until now I have used MS Web Services which are fairly straight-forward.
      > Now I am being asked to use some third party web services which I do not
      > find nearly as intuitive.
      >
      > Questions:
      > 1. I have a URL for a wsdl file only no URL to an aspx page such as with
      > MS. I have used this wsdl to make a proxy file. Do I still need to make a
      > "Web Reference" such as with an aspx file or does the proxy stub suffice?
      > 2. I only see properties (not methods) in any of these classes. I am not
      > sure how I am supposed to initiate any work?
      > 3 In their documentation they have examples of XML for making their SOAP
      > calls (are they kidding me)? They want me to manually create all of the XML
      > neccessary for the SOAP calls to their services? Why bother with web
      > services?
      >
      >
      >[/color]

      Comment

      • aaa

        #4
        Re: A little help

        True, I did do that and I have generated the appropriate classes
        But, the odd thing and this isn't MS related, there are no methods (other
        than the base methods for the ws) only properties and it appears that they
        want me to format abunch of XML (to their specs) and transmit to them the
        data that way. Does that sound appropriate to you? Is that standard with
        non-MS 3rd party web services? I thought the whole idea was make a web
        reference (like you would a local reference) and you have exposed properties
        and methods and you can go to town and everything is transparent.

        "Bruce Johnson [C# MVP]" <bruce@spammeno t.objectsharp.c om> wrote in message
        news:EA76DDBA-D582-4802-B374-9915130ED79F@mi crosoft.com...[color=blue]
        > Probably the easiest thing to do will be to create the proxy class[/color]
        manually.[color=blue]
        > This should solve the issues you describe in 2 and 3. The way to do this[/color]
        is[color=blue]
        > to use the wsdl.exe command. There is documentation for it at
        >[/color]
        http://msdn.microsoft.com/library/de...oolWsdlexe.asp.[color=blue]
        > But the most important thing is that it can take either a URL or a file[/color]
        path[color=blue]
        > from the command line and generate a proxy class in either vb.net or c#.
        > This is the tool that the Add Web Reference uses under the covers. Once[/color]
        the[color=blue]
        > class is generated, add it to your project and you should be good to go.
        >
        > Hope this helps.
        >
        > Bruce Johnson [C# MVP]
        > http://www.objectsharp.com/blogs/bruce
        >
        > "aaa" wrote:
        >[color=green]
        > > Up until now I have used MS Web Services which are fairly[/color][/color]
        straight-forward.[color=blue][color=green]
        > > Now I am being asked to use some third party web services which I do not
        > > find nearly as intuitive.
        > >
        > > Questions:
        > > 1. I have a URL for a wsdl file only no URL to an aspx page such as[/color][/color]
        with[color=blue][color=green]
        > > MS. I have used this wsdl to make a proxy file. Do I still need to make[/color][/color]
        a[color=blue][color=green]
        > > "Web Reference" such as with an aspx file or does the proxy stub[/color][/color]
        suffice?[color=blue][color=green]
        > > 2. I only see properties (not methods) in any of these classes. I am[/color][/color]
        not[color=blue][color=green]
        > > sure how I am supposed to initiate any work?
        > > 3 In their documentation they have examples of XML for making their[/color][/color]
        SOAP[color=blue][color=green]
        > > calls (are they kidding me)? They want me to manually create all of the[/color][/color]
        XML[color=blue][color=green]
        > > neccessary for the SOAP calls to their services? Why bother with web
        > > services?
        > >
        > >
        > >[/color][/color]


        Comment

        • Bruce Johnson [C# MVP]

          #5
          Re: A little help

          Yes and no. The yes is that formatting a bunch XML according to a spec is
          the defintion of SOAP without all of the nice supporting classes ;). The no
          is that if they want they're XML formatted based on a spec, they should have
          included a schema in the WSDL file. And if they did, then the generated
          proxy class should have classes defined that will serialize into the
          appropriate XML. If they didn't, they I'd have to extend my sympathies and
          suggest that the writers of the web service are a touch clueless when it
          comes to how to convey their web service's interface.

          Bruce Johnson [C# MVP]


          "aaa" wrote:
          [color=blue]
          > True, I did do that and I have generated the appropriate classes
          > But, the odd thing and this isn't MS related, there are no methods (other
          > than the base methods for the ws) only properties and it appears that they
          > want me to format abunch of XML (to their specs) and transmit to them the
          > data that way. Does that sound appropriate to you? Is that standard with
          > non-MS 3rd party web services? I thought the whole idea was make a web
          > reference (like you would a local reference) and you have exposed properties
          > and methods and you can go to town and everything is transparent.
          >
          > "Bruce Johnson [C# MVP]" <bruce@spammeno t.objectsharp.c om> wrote in message
          > news:EA76DDBA-D582-4802-B374-9915130ED79F@mi crosoft.com...[color=green]
          > > Probably the easiest thing to do will be to create the proxy class[/color]
          > manually.[color=green]
          > > This should solve the issues you describe in 2 and 3. The way to do this[/color]
          > is[color=green]
          > > to use the wsdl.exe command. There is documentation for it at
          > >[/color]
          > http://msdn.microsoft.com/library/de...oolWsdlexe.asp.[color=green]
          > > But the most important thing is that it can take either a URL or a file[/color]
          > path[color=green]
          > > from the command line and generate a proxy class in either vb.net or c#.
          > > This is the tool that the Add Web Reference uses under the covers. Once[/color]
          > the[color=green]
          > > class is generated, add it to your project and you should be good to go.
          > >
          > > Hope this helps.
          > >
          > > Bruce Johnson [C# MVP]
          > > http://www.objectsharp.com/blogs/bruce
          > >
          > > "aaa" wrote:
          > >[color=darkred]
          > > > Up until now I have used MS Web Services which are fairly[/color][/color]
          > straight-forward.[color=green][color=darkred]
          > > > Now I am being asked to use some third party web services which I do not
          > > > find nearly as intuitive.
          > > >
          > > > Questions:
          > > > 1. I have a URL for a wsdl file only no URL to an aspx page such as[/color][/color]
          > with[color=green][color=darkred]
          > > > MS. I have used this wsdl to make a proxy file. Do I still need to make[/color][/color]
          > a[color=green][color=darkred]
          > > > "Web Reference" such as with an aspx file or does the proxy stub[/color][/color]
          > suffice?[color=green][color=darkred]
          > > > 2. I only see properties (not methods) in any of these classes. I am[/color][/color]
          > not[color=green][color=darkred]
          > > > sure how I am supposed to initiate any work?
          > > > 3 In their documentation they have examples of XML for making their[/color][/color]
          > SOAP[color=green][color=darkred]
          > > > calls (are they kidding me)? They want me to manually create all of the[/color][/color]
          > XML[color=green][color=darkred]
          > > > neccessary for the SOAP calls to their services? Why bother with web
          > > > services?
          > > >
          > > >
          > > >[/color][/color]
          >
          >
          >[/color]

          Comment

          Working...