473,473 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

document/literal/wrapped or document/literal/bare

What's the general opinion on which of these to choose?

I see that the SoapDocumentServiceAttribute defaults to literal/wrapped, but
this article -
http://msdn.microsoft.com/msdnmag/is...erviceStation/ - says "it
probably makes the most sense to use document/literal/bare".

In a BasicProfile1_1 compliant web service should one definitely be chosen
over the other?


Nov 23 '05 #1
2 6736
Hi Phil,

Welcome.
As for the "wrapped" or "bare" parameter style for the ASP.NET webservice,
I think both of them are OK, it is something related to the ASP.NET
webservice implementation rather than the WS-I BP or Contract-First
concept....

Actually, myself also prefer the "bared" since bared is more helpful for us
to define SOAP message's structure and format according to our custom Class
Types and XSD schemas. e.g:

=============
[WebMethod()]
[SoapDocumentMethod(
ParameterStyle=SoapParameterStyle.Bare
)]
public VariantOperationResponse VariantOperation(VariantOperationRequest
request)
{
.............
===========

==========
[XmlRoot("variantOperationRequest")]
public class VariantOperationRequest
{
public VariantOperationRequest()
{
}

[XmlElement("itemType")]
public string ItemType;
}
[XmlRoot("variantOperationResponse")]
public class VariantOperationResponse
{
public VariantOperationResponse()
{
}
[XmlElement("intValue",typeof(int))]
[XmlElement("stringValue",typeof(string))]
[XmlElement("boolValue",typeof(bool))]
public object Item;

}
===================
While we can also define the WebMethod with SoapParameterStyle.Wrapped and
let it output the same SOAP message format as the above "Bare" style one,
but that'll need us to specify some ASP.NET specific Attributes/ properties
such as RequestElementName, ResponseElementName, namespace.....

So in short, if you're following the Contract First approach and want best
control on the SOAP message of your webservice(with your custom
classes...), "Bare" should be the best choice...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Phil Lee" <ph******@newsgroups.nospam>
Subject: document/literal/wrapped or document/literal/bare
Date: Tue, 15 Nov 2005 10:22:32 -0000
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <eR**************@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: host86-132-84-190.range86-132.btcentralplus.com
86.132.84.190
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
microsoft.public.dotnet.framework.webservices:1272 9
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

What's the general opinion on which of these to choose?

I see that the SoapDocumentServiceAttribute defaults to literal/wrapped,
but
this article -
http://msdn.microsoft.com/msdnmag/is...erviceStation/ - says "it
probably makes the most sense to use document/literal/bare".

In a BasicProfile1_1 compliant web service should one definitely be chosen
over the other?

Nov 23 '05 #2
Hi Phil,

Does my last reply helps a little? If there're anything else we can help,
please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
X-Tomcat-ID: 37131942
References: <eR**************@TK2MSFTNGP15.phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_B051D3FF"
Content-Transfer-Encoding: 7bit
From: st*****@online.microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Wed, 16 Nov 2005 01:50:22 GMT
Subject: RE: document/literal/wrapped or document/literal/bare
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Message-ID: <c8**************@TK2MSFTNGXA02.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 174
Path: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.webservices:1274 0
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Phil,

Welcome.
As for the "wrapped" or "bare" parameter style for the ASP.NET webservice,
I think both of them are OK, it is something related to the ASP.NET
webservice implementation rather than the WS-I BP or Contract-First
concept....

Actually, myself also prefer the "bared" since bared is more helpful for us
to define SOAP message's structure and format according to our custom Class
Types and XSD schemas. e.g:

=============
[WebMethod()]
[SoapDocumentMethod(
ParameterStyle=SoapParameterStyle.Bare
)]
public VariantOperationResponse VariantOperation(VariantOperationRequest
request)
{
.............
===========

==========
[XmlRoot("variantOperationRequest")]
public class VariantOperationRequest
{
public VariantOperationRequest()
{
}

[XmlElement("itemType")]
public string ItemType;
}
[XmlRoot("variantOperationResponse")]
public class VariantOperationResponse
{
public VariantOperationResponse()
{
}
[XmlElement("intValue",typeof(int))]
[XmlElement("stringValue",typeof(string))]
[XmlElement("boolValue",typeof(bool))]
public object Item;

}
===================
While we can also define the WebMethod with SoapParameterStyle.Wrapped and
let it output the same SOAP message format as the above "Bare" style one,
but that'll need us to specify some ASP.NET specific Attributes/ properties
such as RequestElementName, ResponseElementName, namespace.....

So in short, if you're following the Contract First approach and want best
control on the SOAP message of your webservice(with your custom
classes...), "Bare" should be the best choice...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Phil Lee" <ph******@newsgroups.nospam>
Subject: document/literal/wrapped or document/literal/bare
Date: Tue, 15 Nov 2005 10:22:32 -0000
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <eR**************@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: host86-132-84-190.range86-132.btcentralplus.com
86.132.84.190
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
microsoft.public.dotnet.framework.webservices:1272 9
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

What's the general opinion on which of these to choose?

I see that the SoapDocumentServiceAttribute defaults to literal/wrapped,
but
this article -
http://msdn.microsoft.com/msdnmag/is...erviceStation/ - says "it
probably makes the most sense to use document/literal/bare".

In a BasicProfile1_1 compliant web service should one definitely be chosen
over the other?



Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: brian | last post by:
how does document.write interpret "" and '' (double quotes and single quotes) what is the significance of &Url (does it signify the current url) colon : is it represented as %3A ? and...
0
by: NancyASAP | last post by:
In case anyone hasn't seen this problem, just sharing the info.... I created a dotnet 1.1 page with a literal control. I used a streamreader to open a text file to fill the control. I filled the...
1
by: lawrence | last post by:
This PHP function prints out a bunch of Javascript (as you can see). This is all part of the open source weblog software of PDS (www.publicdomainsoftware.org). We had this javascript stuff...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
3
by: Yolande | last post by:
Hi there, In the document I fount on web sit http://download.microsoft.com/download/1/b/b/1bb6e11f-8e8c-46bf-a2d7-9a16976d4526/NETConnectedLogoTechnicalSpec020904.doc, it says that “To be .NET...
1
by: Rodrigo C. Souza | last post by:
Hello all, I´m trying to create a simple web service to be called by a J2ME application, but when I call the tool to create the stub classes it give me following error: java.lang.Exception: Soap...
5
by: jhurrell | last post by:
I have been having some trouble getting my XSL style sheet to parse correctly. I have some XML outputted from an SQL-Server, that I then need to turn into multiple HTML files. This I have done...
6
by: Greg Esres | last post by:
I have some text lines to print that are much longer than the width of the paper, maybe as much as 6 times. For a given page, I'd like everything that doesn't fit to print on a second page, and...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.