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?