WebService and CSharp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ckkwan@my-deja.com

    #1

    WebService and CSharp

    Dear All,

    I have been given a Soap Request in XMl form for a WebService (Which I
    don't know whether it is developped using C# or Java, or any other
    language).

    I need to call this WebService using CSharp. How can I do it? Any
    example?

    Thanks in advance.

  • =?UTF-8?B?QXJuZSBWYWpow7hq?=

    #2
    Re: WebService and CSharp

    ckkwan@my-deja.com wrote:
    >
    I have been given a Soap Request in XMl form for a WebService (Which I
    don't know whether it is developped using C# or Java, or any other
    language).
    >
    I need to call this WebService using CSharp. How can I do it? Any
    example?
    Do you have a URL for the WSDL ?

    If yes then generate a stub from that with the wsdl utility (called
    adding a web service reference inside VS).

    Arne

    Comment

    • ckkwan@my-deja.com

      #3
      Re: WebService and CSharp

      Once you get that information, then there are plenty of code examples using
      Google on how to consume a SOAP/XML Web Service using C# .Net.

      Arnold,

      Yes, I have been given the Request XMl which tells me exactly what I
      need. And also the Response XML which will be returned from the
      WebService.

      But I can't find an example In CSharp on how to use the
      SoapHttpClientP rotocol to send the exact XML that I wish to the
      Server.

      Can you please point to me an example?

      Thanks in advance.

      Comment

      • Mr. Arnold

        #4
        Re: WebService and CSharp


        <ckkwan@my-deja.comwrote in message
        news:1193544359 .631131.153920@ e9g2000prf.goog legroups.com...
        >Once you get that information, then there are plenty of code examples
        >using
        >Google on how to consume a SOAP/XML Web Service using C# .Net.
        >
        >
        Arnold,
        >
        Yes, I have been given the Request XMl which tells me exactly what I
        need. And also the Response XML which will be returned from the
        WebService.
        >
        But I can't find an example In CSharp on how to use the
        SoapHttpClientP rotocol to send the exact XML that I wish to the
        Server.
        >
        Can you please point to me an example?
        >



        The Code Project and DevX are sites where you can find code examples. Review
        the projects, put the projects together, and see how things work first, so
        that you can come-up with a plan before you try to tackle the task.

        Those examples above are not the only ones -- use Google.

        HTH


        Comment

        • ckkwan@my-deja.com

          #5
          Re: WebService and CSharp

          Those examples above are not the only ones -- use Google.
          >
          HTH- -
          >
          - -
          Thanks Arnold,

          I have actually found the answer just now. I made a big mistakes by
          focusing on SoapHttpClientP rotocol.

          in fact the solution is to use HttpWebRequest.

          And a very simple to follow example is there:

          Sometimes it's really nice to be able to make a raw call to a web service by manaully putting together your own SOAP envelope. The System.Ne...


          Anyway, really appreciate your help.

          Thanks

          Comment

          Working...