Please help me with building SOAP ENVELOPE

Discussion in 'ASP .Net Web Services' started by kaush, Oct 11, 2005.

  1. kaush

    kaush Guest

    I am using WSE to send SOAP messages. I am very new to SOAP
    Actually I have a sample SOAP message from my client with envelope
    element, header and a big body. I am not sure how to construct an
    envelope using the SOAPENVELOPE class.

    Since I have this one sample message from my client which I want to
    send it across and test, I am just copying the header part and
    populating "envelope.Header.InnerText" and copying the body part and
    populating the "envelope.SetBodyObject()" method. I tried many other
    ways with other methods. This seems not to be working.
    Could someone please help me in constructing the SOAPENVELOPE ? Is
    there any way to load the sample SOAP message I have into a
    SOAPENVELOPE object?

    Please help me out. I am not able to find proper documentation for the
    SOAPENVELOPE methods or properties. Any links would really help.

    Thanks,
    kaush
     
    kaush, Oct 11, 2005
    #1
    1. Advertising

  2. kaush

    Nirosh Guest

    Hey,

    You don't have to manually contruct the SOAP envelop. it just created
    automatically what you have to do is construct the object you need to send
    in side your code and throw it out, and the system will automatically
    created the envelop for that.

    Soap envelop is some container that use to transfer your data via the SOAP
    protocol, let me give you a sample

    This is a soap envelop that send a string value

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <HelloWorld2Response xmlns="http://tempuri.org/">
    <HelloWorld2Result>string</HelloWorld2Result>
    </HelloWorld2Response>
    </soap:Body>
    </soap:Envelope>

    but you don't have to create this.. see the web method for this..

    [WebMethod]
    public string HelloWorld2()
    {
    return "hello";
    }

    Nirosh

    "kaush" <> wrote in message
    news:...
    >I am using WSE to send SOAP messages. I am very new to SOAP
    > Actually I have a sample SOAP message from my client with envelope
    > element, header and a big body. I am not sure how to construct an
    > envelope using the SOAPENVELOPE class.
    >
    > Since I have this one sample message from my client which I want to
    > send it across and test, I am just copying the header part and
    > populating "envelope.Header.InnerText" and copying the body part and
    > populating the "envelope.SetBodyObject()" method. I tried many other
    > ways with other methods. This seems not to be working.
    > Could someone please help me in constructing the SOAPENVELOPE ? Is
    > there any way to load the sample SOAP message I have into a
    > SOAPENVELOPE object?
    >
    > Please help me out. I am not able to find proper documentation for the
    > SOAPENVELOPE methods or properties. Any links would really help.
    >
    > Thanks,
    > kaush
    >
     
    Nirosh, Oct 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    0
    Views:
    535
  2. cxc
    Replies:
    0
    Views:
    6,400
  3. Replies:
    0
    Views:
    459
  4. GenxLogic
    Replies:
    3
    Views:
    1,289
    andrewmcdonagh
    Dec 6, 2006
  5. droesler
    Replies:
    2
    Views:
    511
    droesler
    Aug 31, 2010
Loading...

Share This Page