Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2006

Tip: Looking for answers? Try searching our database.

customize soap request

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christina Androne - 03 Apr 2006 21:38 GMT
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
Josh Twist - 05 Apr 2006 11:45 GMT
I think this is what you're looking for:

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

Josh
http://www.thejoyofcode.com/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.