all groups > dotnet web services > january 2008 >
You're in the

dotnet web services

group:

Include additional data in Body? Multiple objects in body?


Include additional data in Body? Multiple objects in body? Spam Catcher
1/31/2008 7:32:55 PM
dotnet web services:
Hi all,

I have a customer requirement to include additional data in the SOAP
body, i.e. like the W3C example:

<env:Body>
<p:itinerary
xmlns:p="http://travelcompany.example.org/reservation/travel">
<p:departure>
<p:departing>New York</p:departing>
<p:arriving>Los Angeles</p:arriving>
<p:departureDate>2001-12-14</p:departureDate>
<p:departureTime>late afternoon</p:departureTime>
<p:seatPreference>aisle</p:seatPreference>
</p:departure>
<p:return>
<p:departing>Los Angeles</p:departing>
<p:arriving>New York</p:arriving>
<p:departureDate>2001-12-20</p:departureDate>
<p:departureTime>mid-morning</p:departureTime>
<p:seatPreference/>
</p:return>
</p:itinerary>
<q:lodging
xmlns:q="http://travelcompany.example.org/reservation/hotels">
<q:preference>none</q:preference>
</q:lodging>
</env:Body>


The body has itinerary and lodging, is this possible with standard web
services?

Thanks.

--
Re: Include additional data in Body? Multiple objects in body? Spam Catcher
1/31/2008 9:26:45 PM
Spam Catcher <spamhoneypot@rogers.com> wrote in
news:Xns9A36940615888usenethoneypotrogers@127.0.0.1:

[quoted text, click to view]


Shoot, my post was backwards - the customer is going to include a multiple
elements inside the SOAP body, but my web service needs to parse it out -
is this possible with .NET web services?

Thansk!


--
Re: Include additional data in Body? Multiple objects in body? John Saunders [MVP]
2/1/2008 7:09:52 AM
[quoted text, click to view]

I've never done it before, but take a look at the ParameterStyle property of
the SoapDocumentServiceAttribute class. Setting it to Bare may do what you
want.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

AddThis Social Bookmark Button