all groups > dotnet web services > february 2007 >
You're in the

dotnet web services

group:

Passing Custom Object


Passing Custom Object css
2/20/2007 7:55:27 AM
dotnet web services: I am new to ASP.net webservice and have a quesiton.

Is is possible to pass custom object to a web service (using VB 2005)? My
custom object will look like this
Public Class Myclass

Public Property1 As String
Public Property2 As Integer

Public Property myCollection1 As Arraylist (Actually, it will be a strongly
type collection)

Public Property MyCollection2 AS Arraylist (Another strongly type collection)

End Class

My concern is more towards my object is having custom collection as its
RE: Passing Custom Object Manish Bafna
2/20/2007 10:16:05 PM
Hi,
You will find following Link useful:
www1bpt.bridgeport.edu/~mahmood/cs555/csharp_webservices1.doc

Search for "Using Custom Data Types in WebMethods" in the doc document that
you download.
Hope this helps you out.

Thanks and regards,
Manish Bafna.
MCP and MCTS.


[quoted text, click to view]
RE: Passing Custom Object Mark Nelson
2/21/2007 6:38:52 AM
css,

Your concern is valid. We need to be cautious while passing custom
collections back and forth between the webservices. We can pass the Basic
Types and the even Custom Objects back and forth between webservice.
CustomCollections are not transmitted directly as as a CustomCollection
across the wire. Let's say you have the EmployeeCollection
(hastable/ArrayList), this would not be transmitted directly as
EmployeeCollection across the wire.
Rather this would be transmitted as the arry of Employee objects across the
wire.
In such case your SOAP Message size also get's increases.

Passing CustomCollections may have slight impact on the
performance. Please decide whether to really to PassCustomCollections
--
Thanks & Regards,
Mark Nelson


[quoted text, click to view]
AddThis Social Bookmark Button