Hi Tim,
Have you got any further ideas on this question or does my suggestion helps
you 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: 61740691
References: <0A**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_4EDA4676"
Content-Transfer-Encoding: 7bit
From:
st*****@online.microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Fri, 28 Oct 2005 03:36:25 GMT
Subject: RE: Using REF for parmater in web service
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Message-ID: <1e**************@TK2MSFTNGXA01.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 189
Path: TK2MSFTNGXA01.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8398
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Hi Tim,
Welcome here.
As for the webservice parameters defining question when there're multiple
input and output parameters, IMO , I'd strongly recommend you use a single
class to encapsulate all the output parameters (if possible , also input
parameters:)). The reason is mainly considered from webservice's
Interoperablitiy. For webservice which will be exposed to external system,
it is possible to be called by multiple heterogenous client platform.
Though Byref parameters are supported by many programming platform well, it
is not quite interop friendly. However, using Single class to encapsualte
mutliple parameters can let us using .net's XML serizliation attribute to
conveniently control the class's output XML format (the final generated
type schema in wsdl...) which can help improve interoperability of our
webservice.
In addition, generally speaking , using a class to encapsulate mulitple
parameters will somewhat hurt the performance(since the output xml's size
will increase), but I think that worth it and from real world perspective,
the overall performance will be consist of many other facts(such as total
message size, network condition...).
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.)
--------------------
Thread-Topic: Using REF for parmater in web service
thread-index: AcXbHyqpSwk9Ha5eQIOaNLIyCgK43A==
X-WBNR-Posting-Host: 192.76.82.90
From: =?Utf-8?B?VGltIFJleW5vbGRz?= <ti**********@online.nospam>
Subject: Using REF for parmater in web service
Date: Thu, 27 Oct 2005 10:52:15 -0700
Lines: 24
Message-ID: <0A**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8391
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Team,
We need some guidance here. We are developing a web service to expose to
external system. We are not sure which is the best path to take. We have
multiple input fields required and a few output fields. We are thinking to
either 1) Make all input fields one class and have one parameter for our
web
service of this object type and make all output fields a second class and
have return type of our web method return an object of this type ----- or
----- 2) Put all fields (in & out) in one class and use 'ref' before our
parm
of one object. Then our code would simply update the output fields that are
in this input object and the calling party could interrogate the object
upon
return.
Does REF negatively impact web service performance?
What are thoughts we should consider in making this decsion?
1) [WebMethod]
public outputclass testservice(inputclass1 inputobject)
2) [WebMethod]
public void testservice(ref inputclass1 inputobject)
Thank you,
Tim