customize soap request

Discussion in 'ASP .Net Web Services' started by Christina Androne, Apr 3, 2006.

  1. Hello everybody

    I'm making an webservice in .net which has a method like this one:


    [WebMethod]
    public MyType MyMethod(MyType myParam)
    {
    ....
    }


    At this point, the webservice understands requests like this one:

    <soap-env:Envelope ....

    <soap-env:Body>
    <m:MyMethod ...
    <m:myParam>
    .......
    </m:MyParam>
    </m:MyMethod>
    <soap-env:Body>

    or, if I set the Action of the SoapMethodAttribute to MyMethod,

    <soap-env:Body>
    <m:myParam xmlns="...>
    .......
    </m:MyParam>
    <soap-env:Body>


    Someone else is developing the application which will make requests to
    my webservice.

    Now, this someone else would be very happy if my web service would
    understand requests liek this one:

    <soap-env:Body>
    .......
    <soap-env:Body>

    meaning that the request should contain the parameter value directly in
    the body tag (which to me seems out of the RFC spec for SOAP, but...)
    Is there a way to configure through the use of attributes or with some
    other way the webserver to accept this sort of requests? (I would really
    really want some other that wrting a custom soap extension method).

    Any help would be kindly appreciated.

    Best,
    Christina
     
    Christina Androne, Apr 3, 2006
    #1
    1. Advertising

  2. Christina Androne

    Josh Twist Guest

    I think this is what you're looking for:

    [WebMethod]
    [SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare)]

    Josh
    http://www.thejoyofcode.com/
     
    Josh Twist, Apr 5, 2006
    #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. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,475
    Sham Ramakrishnan
    Jul 1, 2003
  2. Brian Birtle
    Replies:
    2
    Views:
    2,183
    John Saunders
    Oct 16, 2003
  3. comp.text.xml
    Replies:
    0
    Views:
    543
    comp.text.xml
    Sep 20, 2006
  4. Ivan S
    Replies:
    0
    Views:
    557
    Ivan S
    Aug 13, 2008
  5. Frederik Vanderhaegen

    Soap Extension problem (seems that soap request is not sent to server)

    Frederik Vanderhaegen, Oct 20, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    296
    Frederik Vanderhaegen
    Oct 20, 2006
Loading...

Share This Page