Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. SOAP C# Tutorial/Example

SOAP C# Tutorial/Example

Scheduled Pinned Locked Moved XML / XSL
tutorialhelpcsharpwcfsysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ffowler
    wrote on last edited by
    #1

    Hello All, It's about 4:25 EST and I got in around 7:30am EST. I have scoured the Web for a SIMPLE tutorial or example to send and receive(process) SOAP messages in C#. At this moment, I have not found any full descriptive examples/tutorials to satisfy my goal. My goal is simple and not in need of anything fancy. I have a web service that requires a SOAP message to be passed to it and I require a response. The closet I have come is to recreate an app that get's the time off of EBay's server which was a paramount step. But when I try the same for my WebService, I receive an error "Malformed SOAP request, SOAP-ENV:Envelope element not found in root". My sniffer, did show that SOAP-ENV was not included in the message, indicating to me that I have to find a way to edit the message. So, I am now forced to you, my last hope to assist me with accessing my goal. What I am looking for is a tutorial or code example (mostly complete) that would show me how to create a soap message (manually would be better in this case) send it and read the response. Simple (to you) but a monster to me. Any and I mean any help will be greatly appreciated.

    S 1 Reply Last reply
    0
    • F ffowler

      Hello All, It's about 4:25 EST and I got in around 7:30am EST. I have scoured the Web for a SIMPLE tutorial or example to send and receive(process) SOAP messages in C#. At this moment, I have not found any full descriptive examples/tutorials to satisfy my goal. My goal is simple and not in need of anything fancy. I have a web service that requires a SOAP message to be passed to it and I require a response. The closet I have come is to recreate an app that get's the time off of EBay's server which was a paramount step. But when I try the same for my WebService, I receive an error "Malformed SOAP request, SOAP-ENV:Envelope element not found in root". My sniffer, did show that SOAP-ENV was not included in the message, indicating to me that I have to find a way to edit the message. So, I am now forced to you, my last hope to assist me with accessing my goal. What I am looking for is a tutorial or code example (mostly complete) that would show me how to create a soap message (manually would be better in this case) send it and read the response. Simple (to you) but a monster to me. Any and I mean any help will be greatly appreciated.

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Hi, how did you created the client? Could you post the code? I guess the problem is the namespace. SOAP-ENV is the prefix for the soap namespace in your message. Does the message contain a "xmlns:SOAP-ENV=..." in the first element (which should have the local name 'envelope'). Or better, post the request message from your sniffer. Regards Sebastian

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      F 1 Reply Last reply
      0
      • S SeMartens

        Hi, how did you created the client? Could you post the code? I guess the problem is the namespace. SOAP-ENV is the prefix for the soap namespace in your message. Does the message contain a "xmlns:SOAP-ENV=..." in the first element (which should have the local name 'envelope'). Or better, post the request message from your sniffer. Regards Sebastian

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        F Offline
        F Offline
        ffowler
        wrote on last edited by
        #3

        Thanks Sebastian for the time: Below is a snippet of the code that creates and calls the service (simply). Below the code is the sniffer section that shows that there is no SOAP-ENV namespace. So I guess my guestion is, how can I create a user specified SOAP message. O    int rprocess;                   int rErrors;                   int sampAdded;                   int sampMod;                   int sampDeleted;                   int aliAdded;                   int aliModified;                   int aliDeleted;                   int[] recSent = {'1'};                   string[] reqNum = {"C0772014121"};                   string[] sampType = {"BLOOD"};                   string[] sampID = {"07720141210"};                   DateTime[] inputDate = {Convert.ToDateTime("2009-10-15")};                   DateTime[] inputTime = {Convert.ToDateTime("17:12")};                   int[] aliID = {100050};                                     WebReference.Freezerworks service = new WebReference.Freezerworks();                   service.Url = @"http://172.32.2.102:8081/Freezerworks/Update/";                   try                   {                         service.TestUpdate("ffowler",

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups