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 Newbie

SOAP Newbie

Scheduled Pinned Locked Moved XML / XSL
xmlcsharpsharepointwcfcom
3 Posts 2 Posters 10 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.
  • T Offline
    T Offline
    Tom Archer
    wrote on last edited by
    #1

    Being extremely comfortable with XML, I'm finally learning some SOAP. I know the following is a SOAP request, but can someone shed some light on what each part represents?

    POST /StockQuote HTTP/1.1
    Host: www.stockquoteserver.com
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 323
    SOAPAction: Some-Namespace-URI#GetLastTradePrice
    <SQ:Envelope
    xmlns:SQ="http://schemas.xmlsoap.org/soap/envelope/"
    SQ:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    SQ:Body
    <m:GetLastTradePrice xmlns:m="Some-Namespace-URI">
    <symbol>DIS
    </m:GetLastTradePrice>
    </SQ:Body>
    </SQ:Envelope>

    Here again with the response package, I could really use some help deciphering it:

    HTTP/1.1 200 OK
    Content-Type: text/xml; charset="utf-8"
    Content-Length: nnnn
    <SP:Envelope
    xmlns:SP="http://schemas.xmlsoap.org/soap/envelope/"
    SP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    SP:Body
    <m:GetLastTradePriceResponse
    xmlns:m="Some-Namespace-URI">
    <Price>34.5</Price>
    </m:GetLastTradePriceResponse>
    </SP:Body>
    </SP:Envelope>

    Thanks!! Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

    M 1 Reply Last reply
    0
    • T Tom Archer

      Being extremely comfortable with XML, I'm finally learning some SOAP. I know the following is a SOAP request, but can someone shed some light on what each part represents?

      POST /StockQuote HTTP/1.1
      Host: www.stockquoteserver.com
      Content-Type: text/xml; charset="utf-8"
      Content-Length: 323
      SOAPAction: Some-Namespace-URI#GetLastTradePrice
      <SQ:Envelope
      xmlns:SQ="http://schemas.xmlsoap.org/soap/envelope/"
      SQ:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      SQ:Body
      <m:GetLastTradePrice xmlns:m="Some-Namespace-URI">
      <symbol>DIS
      </m:GetLastTradePrice>
      </SQ:Body>
      </SQ:Envelope>

      Here again with the response package, I could really use some help deciphering it:

      HTTP/1.1 200 OK
      Content-Type: text/xml; charset="utf-8"
      Content-Length: nnnn
      <SP:Envelope
      xmlns:SP="http://schemas.xmlsoap.org/soap/envelope/"
      SP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      SP:Body
      <m:GetLastTradePriceResponse
      xmlns:m="Some-Namespace-URI">
      <Price>34.5</Price>
      </m:GetLastTradePriceResponse>
      </SP:Body>
      </SP:Envelope>

      Thanks!! Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #2

      First your soap request and responce is packaged as a standard HTTP request and responce that is the first set of data in both of your samples. Then internal to that you have a "data" section that is that meaningful part. POST /StockQuote HTTP/1.1 This line is a stock HTTP post Host: www.stockquoteserver.com Who is it to Content-Type: text/xml; what is the type of data text and xml charset="utf-8" how is the dataset being used Content-Length: 323 how much data is to be read from the socket being used. you have an error in your sample here. The header block should be terminated with a blank line (not a line with blanks ok) SOAPAction: Some-Namespace-URI#GetLastTradePrice define namespace to apply to the child data root element of the XML document being sent. it includes the version etc of the request. start of the body of data to be made available to the soap process What routine on the server is being called and the namespace to use DIS arguments to be made available to the routine processing the request. It will ask for them by name (like an envoriment variable). You only have one and it is not properly terminated. end of info for this process end of body end of data to make it a well formed document. Your responce is identical other than the header is that of a valid http responce vs request. Take Care and when should I start looking for your book a the stores? To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli

      T 1 Reply Last reply
      0
      • M Michael A Barnhart

        First your soap request and responce is packaged as a standard HTTP request and responce that is the first set of data in both of your samples. Then internal to that you have a "data" section that is that meaningful part. POST /StockQuote HTTP/1.1 This line is a stock HTTP post Host: www.stockquoteserver.com Who is it to Content-Type: text/xml; what is the type of data text and xml charset="utf-8" how is the dataset being used Content-Length: 323 how much data is to be read from the socket being used. you have an error in your sample here. The header block should be terminated with a blank line (not a line with blanks ok) SOAPAction: Some-Namespace-URI#GetLastTradePrice define namespace to apply to the child data root element of the XML document being sent. it includes the version etc of the request. start of the body of data to be made available to the soap process What routine on the server is being called and the namespace to use DIS arguments to be made available to the routine processing the request. It will ask for them by name (like an envoriment variable). You only have one and it is not properly terminated. end of info for this process end of body end of data to make it a well formed document. Your responce is identical other than the header is that of a valid http responce vs request. Take Care and when should I start looking for your book a the stores? To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #3

        Thanks Michael! Michael A. Barnhart wrote: Take Care and when should I start looking for your book a the stores? Inside C# should be in the stores next week!! Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

        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